Modbus – IAI America ROBO Cylinder Series User Manual

Page 79

Advertising
background image

5. Modbus RTU

71

Modbus

(4) Query sample

A sample query that reads the total moving distance (addresses 8402

H

to 8403

H

) of a controller

with axis No. 0 is shown below.

z

Query (silent intervals are inserted before and after the query)

01 03 84 02 00 02 4D 3B

Field

RTU mode

8-bit data

Start

Silent interval

Slave address [H]

01

Function code [H]

03

Start address [H]

8402

Number of registers [H] 0002

Error check [H]

4D3B (in accordance with

CRC calculation)

End

Silent interval

The response to the query is as follows.

z

Response (silent intervals are inserted before and after the response)

01 03 04 00 00 40 9E 4A 5B

Field

RTU mode

8-bit data

Start

Silent interval

Slave address [H]

01

Function code [H]

03

Number of data bytes [H] 04 (4 bytes = 2 registers)

Data 1 [H]

00 00

Data 2 [H]

40 9E

Error check [H]

4A5B (in accordance with CRC calculation)

End

Silent interval

The Total moving distance is “0000409E

H

” o Convert into decimal number o 16542 m

Note The data of the response example is simply an example and will vary depending on

various conditions.

Advertising