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

14–7
Line Monitor Examples
Publication 1770Ć6.5.16 - October 1996
Command
Field
Value
Function
DLE STX (2 bytes) 10 02
Indicates the start of a message
DST (destination)
09
Indicates the remote node address that the computer is communicating to. 09 hex equals 011 octal,
the address of the 1771ĆKA2.
SRC (source)
00
Indicates the DH node address that is the source of the message. In this example, the computer uses an
SRC byte of 00 (hex). The asynchronous interface (1770ĆKF2) automatically inserts the correct SRC value
before sending the message across the DH link to the 1775ĆKA.
CMD (command)
0F
Indicates the type of command. In this example, the CMD byte has the value 0F (hex) which points to a
group of PLCĆ3 commands. The FNC byte specifies which command in the group is sent.
STS
00
Indicates the status of the message. A command message should always set this field to 00 (hex).
TNS (transaction)
(2 bytes)
02 00
Indicates a specific transaction value for each message. The TNS value increments for each message
packet. This value makes each message uniquely different, which helps you check for duplicate message
packets. In this example, there are three commands, and each must have a different TNS value.
FNC (function)
01
Used with the CMD byte, this byte determines which command is sent. The CMD byte specifies a group of
commands, and the FNC byte specifies a command within that group of commands. In this example,
the FNC byte specifies command 01 of command group 0F. (This is the word range read command.)
PACKET OFFSET
(2 bytes)
00 00
Contains the offset from the address in the address field. In this example, the computer sends three
commands for one transaction. Each command reads 114 words. The first command starts at the address
in the ADDR field with no offset. The second command has an offset of 72 00 (00 72 hex = 114 decimal).
This means that the second command begins reading after the 114 words that were read by the first
command. Likewise, the third command has an offset of E4 00 (00 E4 hex = 228 decimal).
TOTAL TRANS
(total transaction)
(2 bytes)
56 01
Indicates the total amount of PLCĆ3 data table words (low byte first) that are transferred for the entire
transaction. In this example, there are three commands to complete the single transaction. The TOTAL
TRANS equals 56 01 (01 56 hex = 342 words decimal or 684 bytes). If a file does not contain as many bytes
as the TOTAL TRANS field, the transaction is rejected and you receive an error code in the status and
extended status fields.
ADDRESS
(variable number
of bytes)
2C 08
0A 00
Specifies the PLCĆ3 data table address where the word range read will start. The combination of these
bytes specifies the address flag, data table area, context, section, file, structure, and word location where the
command will be executed. Not all commands need to specify all six levels. (For information on converting
a PLCĆ3 address, see page
13-4
.) In our example, we read PLCĆ3 binary file 10, word 0 which converts to
2C 08, 0A 00.
SIZE
E4
Specifies how many bytes of PLCĆ3 data table information you read in this transaction. The word range read
command reads a maximum of 244 bytes per message packet. In this example, each of the three
commands reads 228 bytes (E4 hex).
DLE ETX (2 bytes) 10 03
Indicates the termination of the message.
BCC (block check
character)
6C
Used to check the accuracy of the message transmission. You can optionally use CRC bytes here.
The BCC value must equal the 2's compliment of the 8Ćbit sum of all data bytes between DLE STX and
DLE ETX. (For more information on BCC and CRC error checking, see page
5-4
.)
DLE ACK
10 06
Sent from the module (1770ĆKF2) back to the computer to indicate that the module successfully received the
message. If the BCC value calculated by the module does not match the BCC value in the message packet,
the module sends a DLE NAK (10 15 hex) instead of the DLE ACK (hex).