
1-8 BE1-851 Modbus™ Protocol 9289900992 Rev F
ASCII Character Data Format (ASC (1))
The Modbus™ ASCII character data format uses a single holding register to represent a single character
value. The holding register high byte will always be zero with the ASCII character code in the low byte.
Example
: The character ‘D’ represented in ASCII character format is hexadecimal 44. This number will
read from a holding register as follows:
Holding Register
Value
K (Hi Byte) hex 00
K (Lo Byte) hex 44
The same byte alignments are required to write.
ASCII String Data Format (ASC (x))
The Modbus™ ASCII string data format uses one or more holding registers to represent a sequence or
string, of character values. If the string contains a single character, the holding register high byte will
contain the ASCII character code and the low byte will be zero.
Example
: The string “PASSWORD” represented in ASCII string format will read as follows:
Holding Register
Value
K (Hi Byte) ‘P’
K (Lo Byte) ‘A’
K+1 (Hi Byte) ‘S’
K+1 (Lo Byte) ‘S’
K+2 (Hi Byte) ‘W’
K+2 (Lo Byte) ‘O’
K+3 (Hi Byte) ‘R’
K+3 (Lo Byte) ‘D’
Example
: If the above string is changed to “P,” the new string will read as follows:
Holding Register
Value
K (Hi Byte) ‘P’
K (Lo Byte) hex 00
K+1 (Hi Byte) hex 00
K+1 (Lo Byte) hex 00
K+2 (Hi Byte) hex 00
K+2 (Lo Byte) hex 00
K+3 (Hi Byte) hex 00
K+3 (Lo Byte) hex 00
The same byte alignments are required to write.
Bit Mapped Data Format (BM (x))
The bit mapped data format uses two or more holding registers to represent a sequence of bit values.
The Modbus™ Bit Map data format can represent an 8 bit, 16 bit, 32 bit, or 64 bit value.
Example
: The Bit Map value of the hexadecimal number 0x123456789ABCDEF0 using a BM64 format
will read as follows:
Holding Register
Value
K (Hi Byte) 0x12
K (Lo Byte) 0x34
K+1 (Hi Byte) 0x56
K+1 (Lo Byte) 0x78
K+2 (Hi Byte) 0x9A
Komentáře k této Příručce