Generic packet construction – Rockwell Automation 1403-NSC Smart Communication Card Instruction Sheet User Manual
Page 46

C–2
Serial Communication Protocol Tutorial
Publication 1403-5.1
Generic Packet Construction
Polling Packet
[ DLE / ENQ / STN / BCC ]
Slave Message Link Packet
[ DLE / STX / APP_DATA / DLE / ETX / CRC ]
APP_DATA = [ DST / SRC / CMD / STS / TNS / TNS /
Response_Data ]
Read
Response_Data = [ 1st_dataword_lo / 1st_dataword_hi /
... / last_dataword_lo / last_dataword_hi ]
Write
Response_Data = [ Ext Status (if error) ]
Master Message Link Packet
[ DLE / SOH / STN / DLE / STX / APP_DATA / DLE /
ETX / CRC]
APP_DATA = [ DST / SRC / CMD / STS / TNS / TNS /
Command_Block ]
Read
Command_Block = [ FNC_byte / Byte_size /
File_number / File_type / Element_number /
Sub-element_number ]
FNC_byte = 0xA2
byte_size = size/ID of data table being requested in bytes
(words X 2)
file_number = 0x00
file_type = 0x89
element_number = 0x00
sub-element_number = 0x00
Write
Command_Block = [ FNC_byte / Byte_size /
File_number / File_type / Element_number /
Sub-element_number / 1st_dataword_lo /
1st_dataword_hi / ... / last_dataword_lo /
last_dataword_hi ]
FNC_byte = 0xAA
byte_size = size/ID of data table being requested in bytes
(words X 2)
file_number = 0x00
file_type = 0x89
element_number = 0x00
sub-element_number = 0x00