Download SmartAXIS Pro/Lite Users Manual
Transcript
11: MODBUS COMMUNICATION Function Code 16 (Preset Multiple Registers) Function code 16 changes word device data of D (data register). One through 64 consecutive words can be changed. Communication Frame Request from Modbus Master Slave No. Function Code Address No. of Words Quantity of Data First High Byte First Low Byte Last Low Byte xxh 10h xxxxh xxxxh xxh xxh xxh xxh ACK Reply from Modbus Slave Slave No. Function Code Address No. of Words xxh 10h xxxxh xxxxh NAK Reply from Modbus Slave Slave No. Function Code Error Code xxh 90h xxh Communication Example Write the following data to four data registers D1708 through D1711. D1708 (1234h) Purpose D1709 (5678h) D1710 (ABCDh) D1711 (EF01h) D1708 (1708 – 0) + 400001 = 401709 Modbus address: 401709 Extract lower 5 digits 1709 1709 – 1 = 1708 = 6ACh Communication frame address: 06ACh Condition Slave No. 8 RTU Mode Request from Modbus Master 08 10 06AC 0004 08 12 34 56 78 AB CD EF 01 (CRC) ACK Reply from Modbus Slave 08 10 06AC 0004 (CRC) NAK Reply from Modbus Slave 08 90 xx (CRC) SMARTAXIS PRO/LITE USER'S MANUAL FT9Y-B1378 11-17