Herunterladen Inhalt Inhalt Diese Seite drucken

Character Strings (Texts) - ECOLAB Versatronic Modbus Beschreibung

Mehrkanalmessgerät
Inhaltsverzeichnis

Werbung

Verfügbare Sprachen

Verfügbare Sprachen

3.6.3

Character strings (texts)

NOTICE!
Character strings are transmitted in ASCII format.
A "\0" (ASCII code 0x00) must always be transmitted as the terminating
code. Characters after this mark are without significance.
Knowing that the transmission of texts takes place word by word
(16-bit register), 0x00 is additionally appended where an odd number of
bytes is used (incl. "\0").
The maximum length specified in the address table for strings also includes
the terminating "\0". This means that, in the case of "Char 60", the text,
including "\0", must not be longer than 60 bytes.
In the case of 19 Unicode characters having a length of 3 bytes each, only
2 bytes remain for the 20th character. 1 byte is needed for the terminating
code.
Example
Querying the text from address 0x1000, this address holds the character string for the
device name 'North system'
(ASCII code: 0x41 0x6E 0x6C 0x61 0x67 0x65 0x20 0x4E 0x6F 0x72 0x64).
Hex code for the query:
01
Slave
Hex code for the response:
01
Slave
NOTICE!
The value (here: AA) before the CRC sum (here: C5DF) is not considered,
since it follows the terminating code "\0".
03
10 00
function
Address 1st word
03
00 0E
function
Bytes read
23
Modbus protocol description
00 07
00 C8
Number of words
CRC
41 6E 6C 61 67 65
20 4E 6F 72 64 00
C5 DF
00 AA
Word values (ASCII
CRC
characters)
417102397 Rev. 1-10.2019

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis