Instruction Manual

5. Modbus RTU
78
Modbus
(4) Query sample
A sample query that reads the current position (addresses 9000
H
to 9001
H
) of a controller with axis
No. 0 is shown below.
z Query (silent intervals are inserted before and after the query)
01 03 90 00 00 02 E9 0B
Field RTU mode
8-bit data
Start Silent interval
Slave address [H] 01
Function code [H] 03
Start address [H] 9000
Number of registers [H] 0002
Error check [H] E90B (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 0B FE 7C 83
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] 0B FE
Error check [H]
7C83 (in accordance with CRC calculation)
End Silent interval
The current position is “00000BFE
H
o Convert into decimal number o 3070 (x 0.01 mm) o
The current position is 30.7 mm.
Example 2) : If the current position is read “FFFFFFF5
H
” (negative position) o
FFFFFFFF
H
– FFFFFFF5
H
+ 1 (make sure to add 1) o
Convert into decimal number o 11 (x 0.01 mm) o
The current position is -0.11 mm
Note The data of the response example is simply an example and will vary depending on
various conditions.