01-19-2025, 01:12 AM
This is CODE-15 command:
Set ON/OFF multi channel of digital output Function code: 0F
send:01 0F 00 00 00 40 00 00 00 00 00 00 00 05 0F 4E
receive:01 0F 02 00 00 BB 14
Send message: register address 0x0000 register number:0x40 = 64 channel digital output
data length=8 bytes, D7,D6,D5,D4,D3,D2,D1,D0
D0=(bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0)b=output8-1 bit7=output8 …… bit0=output1
D1=(bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0)b=output16-9 bit7=output16 …… bit0=output9
D2=(bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0)b=output24-17 bit7=output16 …… bit0=output17
D3=(bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0)b=output32-25 bit7=output32 …… bit0=output25
D4=(bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0)b=output40-33 bit7=output40 …… bit0=output33
D5=(bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0)b=output48-41 bit7=output48 …… bit0=output41
D6=(bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0)b=output56-49 bit7=output49 …… bit0=output49
D7=(bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0)b=output64-57 bit7=output64 …… bit0=output57
Every bit=1: ON bit=0: OFF
D7=0x00=(00000000)binary means: output64-57:OFF
D6=0x00=(00000000)binary means: output56-49:OFF
D5=0x00=(00000000)binary means: output48-41:OFF
D4=0x00=(00000000)binary means: output40-33:OFF
D3=0x00=(00000000)binary means: output32-25:OFF
D2=0x00=(00000000)binary means: output24-17:OFF
D1=0x00=(00000000)binary means: output16-9:OFF
D0=0x05=(00000101)binary means: output1,3:ON others:OFF
Receive message: data length=2 bytes “00 00” means successful control.
--------------------------------------------------------------------------
what command you have sent?
1-wire gpio port not support read by modbus, unless you can write your own arduino code to esp32.
Set ON/OFF multi channel of digital output Function code: 0F
send:01 0F 00 00 00 40 00 00 00 00 00 00 00 05 0F 4E
receive:01 0F 02 00 00 BB 14
Send message: register address 0x0000 register number:0x40 = 64 channel digital output
data length=8 bytes, D7,D6,D5,D4,D3,D2,D1,D0
D0=(bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0)b=output8-1 bit7=output8 …… bit0=output1
D1=(bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0)b=output16-9 bit7=output16 …… bit0=output9
D2=(bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0)b=output24-17 bit7=output16 …… bit0=output17
D3=(bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0)b=output32-25 bit7=output32 …… bit0=output25
D4=(bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0)b=output40-33 bit7=output40 …… bit0=output33
D5=(bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0)b=output48-41 bit7=output48 …… bit0=output41
D6=(bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0)b=output56-49 bit7=output49 …… bit0=output49
D7=(bit7 bit6 bit5 bit4 bit3 bit2 bit1 bit0)b=output64-57 bit7=output64 …… bit0=output57
Every bit=1: ON bit=0: OFF
D7=0x00=(00000000)binary means: output64-57:OFF
D6=0x00=(00000000)binary means: output56-49:OFF
D5=0x00=(00000000)binary means: output48-41:OFF
D4=0x00=(00000000)binary means: output40-33:OFF
D3=0x00=(00000000)binary means: output32-25:OFF
D2=0x00=(00000000)binary means: output24-17:OFF
D1=0x00=(00000000)binary means: output16-9:OFF
D0=0x05=(00000101)binary means: output1,3:ON others:OFF
Receive message: data length=2 bytes “00 00” means successful control.
--------------------------------------------------------------------------
what command you have sent?
1-wire gpio port not support read by modbus, unless you can write your own arduino code to esp32.