- Posts: 6
- Thank you received: 2
[ Vfdmod ] An easy VFD control over MODBUS RTU
- s_volenszki
- Offline
- New Member
-
What else can I check?
Please Log in or Create an account to join the conversation.
- aekhv
- Offline
- Senior Member
-
- Posts: 49
- Thank you received: 18
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4793
- Thank you received: 1480
Please Log in or Create an account to join the conversation.
- s_volenszki
- Offline
- New Member
-
- Posts: 6
- Thank you received: 2
I had no time on the week just tonight and I fired up the logic analyser. The result was surprising, actually all response CRC are invalid checksum. I used Saleae Logic analyzer software with Modbus RTU analyzer. After I started to read the VFD documentation again and I found something:
"At the time of transmission, the low bytes are in CRC CHK high bit front and the high bytes are in the back. When CRC is added to the message, low bytes are added first, and then high bytes."
This is a command to read the VFD current frequency:
01 03 10 00 00 01 80 CA
This is the answer from the VFD:
01 03 00 02 09 C4 E3 C9
And if I calculate the 01 03 00 02 09 C4 CRC value:
CRC-16/MODBUS => 0xC9E3
So this is absolutely clear the VFD answering the CRC in reverse. Now only one question left, how can I reverse the CRC before the Vfdmod start to compare with the pre calculated CRC?
Please Log in or Create an account to join the conversation.
- Todd Zuercher
- Offline
- Platinum Member
-
- Posts: 4793
- Thank you received: 1480
Please Log in or Create an account to join the conversation.
- aekhv
- Offline
- Senior Member
-
- Posts: 49
- Thank you received: 18
I can't believe CRC works normally in writing mode, but needs to swap a pair of bytes in reading mode. It's insane!vfdmod: setting command speed value to 2500 (0x09C4)...
[01][06][10][00][09][C4][8A][C9]
Waiting for a confirmation...
<01><06><10><00><09><C4><8A><C9> <<< OK! Response is valid!
vfdmod: setting control word value to 6 (0x0006)...
[01][06][20][00][00][06][02][08]
Waiting for a confirmation...
<01><06><20><00><00><06><02><08> <<< OK! Response is valid!
vfdmod: reading 'spindle.rpm-out' from address 4096 (0x1000)...
[01][03][10][00][00][01][80][CA]
Waiting for a confirmation...
<01><03><00><02><09>
ERROR CRC received 0x209 != CRC calculated 0x20F0
Please Log in or Create an account to join the conversation.