Rockwell Automation 1770, D17706.5.16 Ref Mnl DF1 Protocol Command User Manual
Page 124

7–37
Communication Commands
Publication 1770Ć6.5.16 - October 1996
Example 2: Type/data parameter for writing or reading integer data
This example shows the type/data parameter for reading an array (ID = 9).
The array data type includes an additional byte called the descriptor byte,
located after the ID byte. The descriptor byte is a second flag byte which
describes the type of data in the array. You include the descriptor byte as part of
the data field size.
Bit 76543210
Bits 4 - 7: Data Type ID in next one byte
Integer 1, (LS)
Integer descriptor, size = 2 bytes each
flag byte
Bits 0 - 3: bytes per data type equals seven
(6 data bytes plus 1 descriptor)
ID Value = 9 (array)
Integer 0, (LS)
Value = 0
(MS)
Value = Ć2
(MS)
Integer 2, (LS)
(MS)
Value = 255
10010111
00001001
01000010
00000000
11111110
11111111
00000000
11111111
00000000
Not all sizes are legal for all formats. The “B” data type always has
a size value of one. The “F” data type has either a size value of four
(single precision) or eight (double precision). Each of the
Allen-Bradley predefined structures has a fixed size.
Example 3: PLCĆ5 processor requesting I0 integer words
Bits 4 - 7: Data Type ID in next byte
Bits 0 - 3: Size encoded in next two bytes after type
ID Value = 9 (array)
10011010
00001001
00010101
00000000
01000010
Extended size = 15
hex
= 21
First byte of extended size (LS)
21 = one byte for type and twenty bytes of data to follow
Second byte of extended size (MS)
Bits 4 - 7: Data Type = 4 = integer
BIts 0 - 3: Size = two bytes per element