New VFD comms timeout -12
- btvpimill
- Offline
- Elite Member
- Posts: 229
- Thank you received: 3
I needed a new spindle, so hooked everything up and expected it should work . Of course it did not. I have double checked the registers for COMMs as well as baud rate.
The VFD says it is a H100 Series VFD. All the registers seem to be the same as the other. Honestly I just don't know where to go troubleshooting this. When I load from halrun, then setp vfd.enable 1 I just geet comm error (-12)
Does this mean there is no response or the response is not correct?
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
- Posts: 3947
- Thank you received: 1705
linuxcnc.org/docs/html/man/man1/hy_vfd.1.html
- make sure you have the vfd set up to accept serial communications (see doc above)
- it's important to share the _exact_ error message you get, otherwise it's just simply impossible to even try to find out where it is comming from.
Please Log in or Create an account to join the conversation.
- btvpimill
- Offline
- Elite Member
- Posts: 229
- Thank you received: 3
attached is the error I get when I try to use it in halrun per Andy example found somewhere around here. This is the response to:
setp vfd.enable 1
I do not know how to see any errors from when I try to run it from within Axis. I assume there is the same error.
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
- Posts: 3947
- Thank you received: 1705
Tried using -g in the loadusr command, told me invalid option for g. So not sure how to get into debug mode.
this seems to work for me:
loadusr hy_vfd -g
I do not know how to see any errors from when I try to run it from within Axis. I assume there is the same error.
open a terminal and run:
linuxcnc
This will bring up the config picker, pick your machine config and all debug messages will be printed to the terminal window.
Please Log in or Create an account to join the conversation.
- btvpimill
- Offline
- Elite Member
- Posts: 229
- Thank you received: 3
I was using
loadusr -Wn -hy_vfd -g
It didn't like that. Had to drop the -Wn as you did.
Now I have debugging info. Please see attachment.
I did re-confirm my settings in the vfd, they are set to comm and 8n1 RTU at 9600. I am also loading hy_vfd at 9600 as well.
Does that response mean it is receiving something but not what it expected, or it expects 8 bytes and got nothing?
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
- Posts: 3947
- Thank you received: 1705
1. The component is sending a request to the vfd starting with '[01] [01] ..'
ie it's calling device with address '01' and the function code '01' (ie read coil status) ....
2. In modbus protocol a response starts with echoing the device address ie '01' followed by the functionn code, ie also '01' in your case.
3. Note that the response does not start with [01],[01] but [01], [81]. The '81' tells you that the device has sent you an exception response to your 01 query. The next byte in the response, ie [02], is the exception code (which would indicate that you requested and illegal data address ).
www.simplymodbus.ca/exceptions.htm
Not sure but it seems a bit odd to me to read coil status [01] from address [03] [05] but then have the total number of coils [00] [00]
www.simplymodbus.ca/FC01.htm
Please Log in or Create an account to join the conversation.
- btvpimill
- Offline
- Elite Member
- Posts: 229
- Thank you received: 3
Comms are happening in both directions, and are understood by each side.
MAYBE the actrual issue here is the register to say enable spindle is the incorrect register in my drive, so the response is illegal data address?
Not sure about the coil observation yet.
Is it odd that there is only 6 bytes received then a time out occurs? Could I have some type of issue with the comms and data is getting corrupt? Again I want to point out this is the same setup I had before on a different VFD and worked fine. I literally disconnected the wires from 1 and connected them to the other.
Please Log in or Create an account to join the conversation.
- btvpimill
- Offline
- Elite Member
- Posts: 229
- Thank you received: 3
If thats true, I think that address does not exist in my controller.
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
- Posts: 3947
- Thank you received: 1705
Note that it says that it is 'reading setup parameters:' which fails. Enabling the spindle would not be a read function.MAYBE the actrual issue here is the register to say enable spindle is the incorrect register in my drive, so the response is illegal data address?
The component does not handle exception responses (which are only 5 bytes), I guess.Is it odd that there is only 6 bytes received then a time out occurs?
I'm afraid I cannot help much more as I have no information about the vfd or the setup values for the component.
Please Log in or Create an account to join the conversation.
- Aciera
- Offline
- Administrator
- Posts: 3947
- Thank you received: 1705
No, modbus uses a crc checksum (ie the last two bytes of the messages). If your request got corrupted the crc would be wrong and the vfd would then ignore the request and you would not receive any response.Could I have some type of issue with the comms and data is getting corrupt?
Please Log in or Create an account to join the conversation.