New VFD comms timeout -12

More
28 Oct 2024 15:14 #313371 by btvpimill
New VFD comms timeout -12 was created by btvpimill
I hate to be another VFD post, but Haven't cracked this yet. I had a VFD that just worked as it should. USB converter, hy_vfd hal component.
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.

More
29 Oct 2024 07:08 #313413 by Aciera
Replied by Aciera on topic New VFD comms timeout -12
- hy_vfd component has an option for debug mode, which may help:
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.

More
29 Oct 2024 13:28 - 29 Oct 2024 13:29 #313428 by btvpimill
Replied by btvpimill on topic New VFD comms timeout -12
Tried using -g in the loadusr command, told me invalid option for g. So not sure how to get into debug mode.
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. 
Attachments:
Last edit: 29 Oct 2024 13:29 by btvpimill.

Please Log in or Create an account to join the conversation.

More
29 Oct 2024 13:51 #313429 by Aciera
Replied by Aciera on topic New VFD comms timeout -12

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.

More
29 Oct 2024 14:49 - 29 Oct 2024 14:50 #313434 by btvpimill
Replied by btvpimill on topic New VFD comms timeout -12
Thanks for the help,
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?
Attachments:
Last edit: 29 Oct 2024 14:50 by btvpimill.

Please Log in or Create an account to join the conversation.

More
29 Oct 2024 15:17 - 29 Oct 2024 15:19 #313439 by Aciera
Replied by Aciera on topic New VFD comms timeout -12
This tells you the following:

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

 
Last edit: 29 Oct 2024 15:19 by Aciera.

Please Log in or Create an account to join the conversation.

More
29 Oct 2024 16:53 #313444 by btvpimill
Replied by btvpimill on topic New VFD comms timeout -12
So what I am taking away from your wonderful description is this :
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.

More
29 Oct 2024 17:12 #313445 by btvpimill
Replied by btvpimill on topic New VFD comms timeout -12
If I understand this correctly, it is trying to read the data starting at address 0305h?
If thats true, I think that address does not exist in my controller.

Please Log in or Create an account to join the conversation.

More
29 Oct 2024 19:26 #313452 by Aciera
Replied by Aciera on topic New VFD comms timeout -12

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?

Note that it says that it is 'reading setup parameters:' which fails. Enabling the spindle would not be a read function.

Is it odd that there is only 6 bytes received then a time out occurs?

The component does not handle exception responses (which are only 5 bytes), I guess.

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.

More
29 Oct 2024 19:32 #313453 by Aciera
Replied by Aciera on topic New VFD comms timeout -12

Could I have some type of issue with the comms and data is getting corrupt?

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.

Please Log in or Create an account to join the conversation.

Time to create page: 0.082 seconds
Powered by Kunena Forum