SMAX MODBUS®
8.4 Using the 16 Write Multiple Registers function code
EXAMPLE 1
Request to write the value 00 0A hex (= 10 dec) next to the
parameter (register 5) and the value 00 01 hex (= 1 dec = baud rate
9600 bit/s, parity bit Even) next to the parameter
(register 6) of the Slave having currently the node address 1.
Request PDU
(in hexadecimal notation)
[01][10][00][04][00][02][04][00][0A][00][01][13][9E]
where:
[01] = Slave address
[10] =
function code
[00][04] = starting address (
parameter, register 5)
[00][02] = number of requested registers
[04] = number of bytes (2 bytes for each register)
[00][0A] = value to be set in the register 5, 00 0A hex = 10 dec
[00][01] = value to be set in the register 6, 00 01 hex = 1 dec
[13][9E] = CRC
Response PDU
(in hexadecimal notation)
[0A][10][00][04][00][02][01][72]
where:
[0A] = new Slave address
[10] =
function code
[00][04] = starting address (
parameter, register 5)
[00][02] = number of written registers
[01][72] = CRC
The values 00 0A hex, i.e. 10 in decimal notation, is set in the register 5
; while the value 00 01 hex, i.e. 1 in decimal notation =
baud rate 9600 bit/s, parity bit Even, is set in the register 6
. Thus the encoder is programmed to have node address 10 and
data transmission rate = 1 = baud rate 9600 bit/s, parity bit Even.
MAN SMAX MB E 1.2
Programming examples
80 of 84
Содержание SMAX-AI1-PRG-L2
Страница 82: ...This page intentionally left blank...
Страница 83: ...This page intentionally left blank...