5 description of rtu codes – TOHO ELECTRONICS TTX-700 User Manual

Page 23

Advertising
background image

Single

a) Slave address

03H

b) Function code

06H

High level

00H

c) Register address

Low level

C0H

First register address

High level

00H

g)

Data for the first register
(a low-level word)

Low level

6FH

High level

C4H

e) CRC-16

Low level

5AH


6.4.3 Response message in the case of an error

a) Slave address

1BH

b) Function code

83H

h) Error code

02H

High level

E1H

e) CRC-16

Low level

36H

In the case of an error, the function

code for the request message +
80H is entered.



6.5 Description of RTU codes

n The codes from a) slave address to b) function code to h) error code shown below are expressed

in 8-bit binary numbers.

a) Slave address

This is the address of the party (this product) with which the high-level computer
communicates. The address in the response message from this product represents the source
of the response message. Note that, when CH2 is used, 2 addresses are occupied. (When the
ADR is set to 1, addresses 1 and 2 are occupied.)

b) Function code

Enter a code 03H, 06H, or 10H.

03H: To read data from this product
06H: To write or store data in this product (multiple)
10H: To write or store data in this product (single)

c) Register address

The locations of the data to be read or that to be written are specified in 2 bytes.

The data is written in the holding register.

For the addresses of the commands, see "10. Table of identifiers (codes)."

d) Number of registers

This specifies the number of registers to be written in. Since this product has a fixed number
of registers (which is 2), specify 0002H.


23

Advertising