4 Modbus protocol description
26
Strings (texts) Character strings are transmitted in the ASCII format.
Example Text inquiry from address 0x1000, if the
character string "LS NT"
(ASCII code: 0x4C, 0x53, 0x20, 0x4E, 0x54, 0x00) is entered under this
address.
Request: 01031000000440C9
Response: 0103084C53204E540000AA0D96
To mark the end, the last character to be transmitted can be a "\0"
(ASCII code 0x00). Characters after this mark are without
significance.
Knowing that the transmission of texts takes place word by word (16
bits), 0x00 is additionally appended where an odd number of
characters is used (incl. "\0").
The maximum length specified in the address tables (see “Address
tables” on page 47. ff) for strings also includes the terminating "/0".
This means, in the case of "char 11", the text can consist of max. 10
readable characters.
Instead of "AA" in front of the CRC sum, there could be any value,
because it is behind "/0" and will be ignored.