Chengdu Ebyte Electronic Technology Co.,Ltd
command:
01
Device ModBus
Function code
address
Return data value:
01
Device ModBus
Function code
address
Send instructions: 01 05 00 00 FF 00 8C 3A
Return data: 01 05 00 00 FF 00 8C 3A
In the send instruction, the write value FF 00 represents ON, i.e. the relay is closed, and the write value of 00 00 represents OFF, i.e.
the relay is off.
Example 3: Use the 0F function code to write two output coils, for example, let the N02 relay output close, N01 relay output
disconnect, send the command as follows:
01
0F
Device ModBus
Function code
address
Return data value:
01
Device ModBus
Function code
address
Send command: 01 0F 00 00 00 02 01 02 5F 56
Return data: 01 0F 00 00 00 02 D4 0A
In the sending instruction, write the value 02, corresponding to binary 0000 0010, bit0 is 0, representing OFF, that is, relay N01 is
disconnected; bit1 is 1, representing ON, that is, relay N02 is closed.
8.2.2
Discrete address table
address
parameter
10001
D AND 1
10002
D and 2
Copyright ©2012–2020,Chengdu Yibaite Electronic Technology Co., Ltd
05
05
address
00 00
Start address
0F
Start address
Discrete address table (function code: 0x02H)
Read/Write
minimum
read only
0
read only
0
00 00
address
Write the value
00 00
Write the value
00 02
01
Number of coils
Data length
00 00
Number of coils
maximum
1
Read the status of digital input channel 1
1
Read the status of digital input channel 2
E830-DTU(2R2-433L)-V8 User Manual
FF 00
8C 3A
CRC checksum
FF 00
8C 3A
CRC checksum
02
Write the value
CRC checksum
00 02
D4 0A
CRC checksum
illustrate
5F 56
16