01) Read Coils - ICP DAS USA IR-310-RM User Manual

Ir controlled 10-ch high power relay module
Table of Contents

Advertisement

ГК Атлант Инжиниринг – официальный представитель в РФ и СНГ
+7(495)109-02-08 sales@bbrc.ru www.bbrc.ru
5.1 FC01 (0x01) Read Coils
This FC01 can read multiple relay states (ON/OFF, i.e. NO/NC). It is necessary to
append 2 bytes of CRC16 to the tail of each Modbus command.
‧Request
Byte order
Item
00
Address
01
Function code
02 ~ 03
Starting channel
numbers
04 ~ 05
Output channel
quantity
‧Response
Byte order
Item
00
Address
01
Function code
02
Byte count
03
Relay status (low
byte)
04
Relay status (high
byte)
* It depends on start channel number and output channel quantity.
Bit 0 is the ON/OFF state of the relay 0 where value = 1 means ON and value = 0
means OFF.
Example:
Read the state of the RL0 ~ RL9.
Request (hex): 01 01 00 00 00 0A BC 0D ("BC 0D" is CRC16)
where 00 00: Starting channel number is relay 0.
00 0A: Output channel quantity is 10. Get states of 10 relays.
Response (hex): 01 01 02 D5 00 E7 6C ("E7 6C" is CRC16)
where 02: Byte count is 2. 10 relay states need 2 bytes to get back the states.
D5 00: Relay status. D5 is the low byte for RL0 to RL7. 00 is the high byte for
RL8 and RL9.
IR-310-RM, IR Controlled 10-ch High Power Relay Module (Ver. 1.1, Jul/02/2013) 30
Size
Value
1 Byte
1 ~ 247
1 Byte
0x01
2 Bytes
0x0000 ~ 0x000A
2 Bytes
0x0000 ~ 0x000A
Size
Value
1 Byte
1 ~ 247
1 Byte
0x01
1 Bytes
1 or 2
1 Byte
0x00 ~ 0xFF. (*)
1 Byte
0x00 ~ 0x03. (*)

Advertisement

Table of Contents
loading

Table of Contents