CHAPTER 13 RS-485 COMMUNICATIONS
Modbus RTU Communications 13-9
13
FC 01h (Read out coil data)
(1) Query from the master
Station No. 1 byte
FC 1 byte
・・・
01h
(H)
Address
2 bytes
(L)
・・・
Specify the coil address.
* For the addresses, refer to the table 13-4.
(H)
Information
No. of coil data
2 bytes
(L)
・・・
Specify the number of coils n.
* Up to 16 pcs.
(L)
CRC check
16 bits
(2 bytes)
(H)
(2) Response message form the amplifier
Station No. 1 byte
FC 1 byte
・・・
01h
No. of data bytes
1 byte
・・・
The value (N) obtained from n/8 and by
rounding up decimal
Data 1
1 byte (8 bits)
~
~
Information
Data N
1 byte (8 bits)
・・・
n pcs data read out from a specified address.
* 1 pcs = 1 bit (1 byte by 8 pcs)
* Allocated from LSB in order.
(L)
CRC check
16 bits
(2 bytes)
(H)
(3) Message examples
Shows a message example to read out ten pieces of coil data from OUT6 signal.
<Query example>
Station No. 1 byte
01
・・・
When the amplifier station no. is "1".
FC 1 byte
01
03
Address
2 bytes
05
・・・
Specify 0305h as the OUT6 signal address.
00
Information
No. of coil data
2 bytes
0A
・・・
Specify 10 = 000Ah as the number of coils.
AC
CRC check
16 bits
(2 bytes)
48
<Response message example>
Station No. 1 byte
01
FC 1 byte
01
No. of data bytes
1 byte
02
・・・
The value obtained from 10 pcs/8 and by
rounding up decimal
Data 1
1 byte
A5
Information
Data 2
1 byte
02
・・・
See below.
43
CRC check
16 bits
(2 bytes)
6D
Data are allocated from LSB in order starting from the smaller address.
The corresponding bit indicates ON with "1" and OFF with "0". The rest of bits are all fixed to "0."