AH500 Programming Manual The ASCII mode (SM210/SM212 is OFF): The communication protocol in the Modbus ASCII mode: Every byte is composed of two ASCII characters. For example, the value 16#64 is represented by ‘64’, which consists of the ASCII characters ‘6’ (16#36) and ‘4’ (16#34). Every hexadecimal value corresponds to an ASCII code. Start-of-text character (STX):The start-of-text character is fixed to be ‘ : ’ (16#3A). Communication address: ‘0’ ‘0’: Broadcasting to all drives ‘0’ ‘1’: Broadcasting to the drive at address 01 ‘0’ ‘F’: Broadcasting to the drive at address 15 ‘1’ ‘0’: Broadcasting to the drive at address 16 … ‘F’ ‘F’: Broadcasting to the drive at address 255 Function code:
‘0’ ‘3’: Reading the data from several registers ‘0’ ‘6’: Writing the one-bit data into the register ‘1’ ‘0’: Writing the data into several registers Data: The data which users send LRC check code: The values starting from the communication address to the data are added up. The two’s complement of the sum gotten is the LRC check code. Example: 16#01+16#03+16#21+16#02+16#00+16#02=16#29 The two’s complement of 16#29 is 16#D7. End-of-text character: The end-of-text character is composed of CR (16#0D) and LF (16#0A). 6-387 STX The start-of-text character is ‘:’ (16#3A). Address Hi Communication address: The 8-bit address is composed of two ASCII codes. Address Lo Function Hi Function code:
The 8-bit function code is composed of two ASCII codes. Function Lo Data (n-1) Data: The n×8-bit data is composed of 2n ASCII codes. ……. Data 0 LRC CHK Hi LRC check code: The 8-bit check code is composed of two ASCII codes. LRC CHK Lo END Hi End-of-text character: END Hi=CR (16#0D), END Lo=LF (16#0A) END Lo Character ‘0’ ‘1’ ‘2’ ‘3’ ‘4’ ‘5’ ‘6’ ‘7’ ASCII code 16#30 16#31 16#32 16#33 16#34 16#35 16#36 16#37 Character ‘8’ ‘9’ ‘A’ ‘B’ ‘C’ ‘D’ ‘E’ ‘F’ ASCII code 16#38 16#39 16#41 16#42 16#43 16#44 16#45 16#46