Smart Home Automation Forum
Modbus CRC mistake - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1)
+--- Forum: Development (https://www.kincony.com/forum/forumdisplay.php?fid=4)
+--- Thread: Modbus CRC mistake (/showthread.php?tid=7370)

Pages: 1 2 3


Modbus CRC mistake - jltluc57 - 01-14-2025

Hello,

I think there is an error in the Modbus document

The CRC is reversed, in the document is FA 3D for me is 3D FA

My tests for this example give me this

Regards
JL


RE: Modbus CRC mistake - admin - 01-14-2025

if you want your command to board, whether have correct feedback?


RE: Modbus CRC mistake - jltluc57 - 01-14-2025

Yes I have un good feed back
With my software the request 01 01 00 00 00 40 3D FA

the answer is good, for all interface DI DO, ADDC

The mistake is only on the document, Friday I will send you a screen copy


RE: Modbus CRC mistake - admin - 01-14-2025

which kincony board model you are using? we will have a test.


RE: Modbus CRC mistake - jltluc57 - 01-15-2025

KC868-A16


RE: Modbus CRC mistake - admin - 01-15-2025

ok, sorry, we will update it. thanks for feedback.


RE: Modbus CRC mistake - jltluc57 - 01-17-2025

No probleme

first picture the software ok with 8 input --> calculation CRC ok by my soft .
second the same software with 64 input --> calcul crc ok , mistake on the documentation.

Regards


RE: Modbus CRC mistake - admin - 01-18-2025

ok


Error Modbus CF15 - jltluc57 - 01-18-2025

Hello,

Sorry but I think there is a problem with function code 15
the protocol is not respected.
The "Byte Count" onctet is missing

I rely on the example in your modbus documentation.
this function code does not work for me.

(board A16)

Exemple for protocole :  https://ozeki.hu/p_5882-mobdbus-function-code-15-write-multiple-coils.html

Can you check and let me know.


Regards

With which function code can we read the 3 GPIO inputs (onWire)?


RE: Modbus CRC mistake - admin - 01-19-2025

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.