[ Vfdmod ] An easy VFD control over MODBUS RTU

More
5 years 2 months ago #219248 by pinsyd1
I notice  aekhv hasn't replied to this forum in many months, is this still the official forum for english support, or is this dead (I really hope not)?  I'd like to add functionality to this code (to support Bosch Rexroth VFD) but I'd like to know how to setup the dev environment on a stock linuxcnc build so I can compile.  It looks like QT and some other things are needed but I haven't got it compile in it's stock form.

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

More
5 years 1 month ago #221949 by aekhv

I'd like to add functionality to this code (to support Bosch Rexroth VFD) but I'd like to know how to setup the dev environment on a stock linuxcnc build so I can compile.  It looks like QT and some other things are needed but I haven't got it compile in it's stock form.

All you need is Qt4/Qt5 and LinuxCNC sources. When Qt is installed, run Qt Creator and open the project ("vfdmod.pro" file).
The following user(s) said Thank You: Roguish

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

More
4 years 9 months ago #230567 by s_volenszki
Replied by s_volenszki on topic [ Vfdmod ] An easy VFD control over MODBUS RTU
Hi, today I started to implement your Vfdmod to my LinuxCNC with a Sako SKI780 VFD. First I checked all the commands and addresses with a serial console app, following the VFD documentation. I can start, stop the VFD, I can change and read the frequency.

After all I installed the vfdmod package on my Debian 10, generated the config file and did all the steps according the documentation.

When I start LinuxCNC I can see, the VFD frequency is changing to the MinSpeedRPM, but on the Pyvcp panel the RS485 is connected remains red and the error count rising.

I turned on the debug and I can see this in terminal (full debug log attached):
Code:
... Request for slave 76 ignored (not 1) The responding slave 76 isn't the requested slave 1 ...

and this:
Code:
... Waiting for a confirmation... <01><03><00><02><1D> ERROR CRC received 0x21D != CRC calculated 0x20F0 ...

It seems the returning data is not from the slave 1, or it has some corruption, and this is why vfdmod has different CRC.

If you look at the full log, you can see, the frequency change to default value was successful for the second attempt. The first failed with the The responding slave 76 isn't the requested slave 1 message. If I change the IsConnectedDelay to 1, than the connected indicator flashing green and read constantly.

How to resolve this issue? I tried to change the delays but nothing changed. Any advice will be very helpful, thank you!
Attachments:

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

More
4 years 9 months ago #230735 by aekhv

It seems the returning data is not from the slave 1, or it has some corruption, and this is why vfdmod has different CRC.

If no other slaves are connected then only one device (it's your VFD) can/must reply. Are you shure your VFD has slave address "1"? Also try to increase ProtocolDelay in RS485 section. Something around 5...50 should be enough.

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

More
4 years 9 months ago #230801 by s_volenszki
Replied by s_volenszki on topic [ Vfdmod ] An easy VFD control over MODBUS RTU
Thank you aekhv for your answer. I tried to rise the delay, but nothing changed. I tried to analyse the communication and I think, there is some timing problem, but I don't know what. I attached an image, if you take a look on it, you can see the response data contains the correct answer, but it chunked strangely. And also if you notice the image, you can see, the same data sometimes has good response, sometimes not. Example: the 0106 commands.

I ordered an RS485 data analyser, If I get it, I will check what is going on the wire. And also ordered high quality RS485 cable and USB cable. I will be back with the results.
Attachments:

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

More
4 years 9 months ago #230849 by aekhv
It looks like some kind of noise on the RS485 bus. I agree, it's good idea to test with another adapter. Also make sure your PC, VFD and spindle motor have common ground wire.

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

Time to create page: 0.625 seconds
Powered by Kunena Forum