snap ethernet-based i/o units protocols and programming guide
snap ethernet-based i/o units protocols and programming guide
snap ethernet-based i/o units protocols and programming guide
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
CHAPTER 2: OVERVIEW OF PROGRAMMING<br />
The 32-bit integer for this reading would be 16 BB 18 87 (most significant byte at lowest<br />
address). This hex figure correlates to the decimal value 381,360,263.<br />
Remember that if you are processing this data using a Little Endian computer (such as an<br />
Intel ® -<strong>based</strong> PC), you must convert the data from the Big Endian format in order to use it. Little<br />
Endian format is the opposite of Big Endian; Little Endian places the most significant byte at the<br />
highest address.<br />
Digital Point Data<br />
For consistency in starting addresses, data for individual digital points has a length of four bytes.<br />
However, only the least significant bit contains the data you’re looking for.<br />
For example, to read the state of point 0, you would start with address FFFFF0800000. Data would<br />
be returned as follows:<br />
To read this information: Point 0: Point State<br />
Use these addresses: FFFFF0800000 FFFFF0800001 FFFFF0800002 FFFFF0800003<br />
These bits: 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0<br />
Contain this data (binary): 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1<br />
(hex): 0 0 0 0 0 0 0 1<br />
IEEE Float Data<br />
For individual analog points, values, counts, <strong>and</strong> minimum <strong>and</strong> maximum values for one point are<br />
located next to each other in the memory map. All are four bytes <strong>and</strong> are IEEE 754 floats.<br />
For example, individual analog point data for points 0 <strong>and</strong> 1 appears in these addresses:<br />
Beginning Address Ending Address Module Point Data<br />
FFFF F0A0 0000 FFFF F0A0 0003<br />
Scaled <strong>units</strong><br />
FFFF F0A0 0004<br />
FFFF F0A0 0008<br />
FFFF F0A0 0007<br />
FFFF F0A0 000B<br />
0<br />
Counts<br />
Minimum value (E.U.*)<br />
FFFF F0A0 000C<br />
FFFF F0A0 0040<br />
FFFF F0A0 000F<br />
FFFF F0A0 0043<br />
0<br />
Maximum value (E.U.*)<br />
Scaled <strong>units</strong><br />
FFFF F0A0 0044<br />
FFFF F0A0 0048<br />
FFFF F0A0 0047<br />
FFFF F0A0 004B<br />
1<br />
Counts<br />
Minimum value (E.U.*)<br />
FFFF F0A0 004C<br />
* Engineering Units.<br />
FFFF F0A0 004F Maximum value (E.U.*)<br />
IEEE 754 float format is as follows:<br />
1 bit 8 bits 23 bits<br />
x xxxxxxxx xxxxxxxxxxxxxxxxxxxxxxx<br />
Sign Exponent Signific<strong>and</strong><br />
Ignore these bits. Point state is ON.<br />
SNAP Ethernet-Based I/O Units Protocols <strong>and</strong> Programming Guide 43