ES58 • EM58 MODBUS®
8 Programming examples
Hereafter are some examples of both reading and writing parameters. All values
are expressed in hexadecimal notation.
8.1 Using the 03 Read Holding Registers function code
EXAMPLE 1
6) to the Slave having the node address 1.
Request PDU
(in hexadecimal notation)
[01][03][00][04][00][02][85][CA]
where:
[01] = Slave address
[03] =
function code
[00][04] = starting address (
5)
[00][02] = number of requested registers
[85][CA] = CRC
Response PDU
(in hexadecimal notation)
[01][03][04][00][00][05][DC][F8][FA]
where:
[01] = Slave address
[03] =
function code
[04] = number of bytes (2 bytes for each register)
[00][00] = value of register 5, 00 00 hex = 0 dec
[05][DC] = value of register 6, 05 DC hex = 1500 dec
[F8][FA] = CRC
parameter (registers 5 and 6) contains the
value 00 00 hex and 05 DC hex, i.e. 1500 in decimal notation; in other words the
value that is set in the
parameter is 1500 dec.
MAN ESx58x_EMx58x MB E 1.3
Programming examples
85 of 92
Содержание EM58 MB
Страница 90: ...This page intentionally left blank...
Страница 91: ...This page intentionally left blank...