Need help connecting vfdmod and Qtdragon_HD

More
06 Apr 2022 17:05 #239453 by oficinerobotica
Hi to all, I'm hoping I'm posting this in the right place. I need help controlling a YL-620 vfd over modbus. I managed to make it work under Axis using this config github.com/xsnoopy/LinuxCNC-Yalang-yl620...s485-Modbus---VFDmod but now I would like to use it with qtdragon_hd. The problem is that I'm completlly lost on how to connect the hal pins. Yes, I'm a total noob with hal.

Till now I am able to control start spindle-cw and spindle-ccw and stop spindle but I can't control it's speed or get a reading of the vfd error count or error code.
I also a reading of spindle rpm's in the range of 200.000 rpm. I have a slight feeling that the reading might be wrong

Just to be clear, All works correctly in axis but I don't know how to properly connect the vfdmod pins to qtdragon.

Perhaps if someone guids me with this I might learn a thing or two. Till now, the quantity of information is so overwhelming triyng to figure out the docks.

This is my vfd.hal called by postgui_call_list.hal
# Spindle output speed
#net spindle-rpm-out vfdmod.spindle.rpm-out => pyvcp.rpm-out
#net spindle-at-speed vfdmod.spindle.at-speed <= spindle.0.at-speed

net spindle-forward  vfdmod.control.run-forward spindle.0.forward
net spindle-reverse  vfdmod.control.run-reverse spindle.0.reverse
net spindle-speed-in   vfdmod.spindle.rpm-in  spindle.0.speed-out-abs
net spindle-speed-out  vfdmod.spindle.rpm-out spindle.0.speed-in #pyvcp.rpm-out

# Communication
#net pyvcp-is-connected vfdmod.rs485.is-connected => pyvcp.is-connected
#net modbus-errors vfdmod.rs485.error-count => qtdragon.spindle-modbus-errors
#net pyvcp-last-error vfdmod.rs485.last-error => pyvcp.last-error

# Status
#net TargetFrequency             vfdmod.parameters.TargetFrequency             pyvcp.TargetFrequency
net OutputCurent                vfdmod.parameters.OutputCurent                qtdragon.spindle-amps
net OutputVoltage               vfdmod.parameters.OutputVoltage               qtdragon.spindle-volts
#net MainLineVoltage             vfdmod.parameters.MainLineVoltage             pyvcp.MainLineVoltage
#net CurrentAccelerationTime     vfdmod.parameters.CurrentAccelerationTime     pyvcp.CurrentAccelerationTime
#net CurrentDeAccelerationTime   vfdmod.parameters.CurrentDeAccelerationTime   pyvcp.CurrentDeAccelerationTime

# User parameters
net P00.00  vfdmod.parameters.P00.00 #pyvcp.P00.00
net P00.01  vfdmod.parameters.P00.01 #pyvcp.P00.01
net P00.24  vfdmod.parameters.P00.24 #pyvcp.P00.24
net P06.00  vfdmod.parameters.P06.00 #pyvcp.P06.00
net P06.01  vfdmod.parameters.P06.01 #pyvcp.P06.01
net P06.02  vfdmod.parameters.P06.02 #pyvcp.P06.02
net P11.00  vfdmod.parameters.P11.00 #pyvcp.P11.00
net P11.01  vfdmod.parameters.P11.01 #pyvcp.P11.01
net P11.02  vfdmod.parameters.P11.02 #pyvcp.P11.02
net P11.03  vfdmod.parameters.P11.03 #pyvcp.P11.03
net P11.04  vfdmod.parameters.P11.04 #pyvcp.P11.04

As you can see I am triyng to modify the pyvcp axis config.
Thank you so much for your help.

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

More
09 Apr 2022 14:52 #239739 by persei8
You could use  MB2HAL  or you could use a VFD driver HAL component. In my case, I created a custom HAL driver written in python for use with a Huanyang GT series VFD. The qtdragon HAL pins were specifically created for this custom component. This isn't much help for your particular problem, but maybe you could use it as a template in finding a solution. I have attached the source code for the VFD driver and the corresponding postgui hal file. You may also need some modifications to the qtdragon_handler file, depending on the specifics of your VFD.
Jim
Attachments:
The following user(s) said Thank You: oficinerobotica

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

More
09 Apr 2022 22:58 #239790 by andypugh

In my case, I created a custom HAL driver written in python for use with a Huanyang GT series VFD.



Did the built-in hy-gy-vfd comp not work for you? linuxcnc.org/docs/stable/html/man/man1/hy_gt_vfd.1.html ?
The following user(s) said Thank You: oficinerobotica

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

More
09 Apr 2022 23:39 #239792 by persei8
I never tried it as I wasn't aware it existed. 

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

More
11 Apr 2022 00:53 #239873 by oficinerobotica
@persei8 Thank you so much. Having a working example helps piecing it all together. I will try to understand a bit more and get back here.

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

More
11 Apr 2022 01:33 - 11 Apr 2022 07:11 #239876 by oficinerobotica
@andypugh Thank you for that reference. I discovered this way that there is a hy_vfd module as well linuxcnc.org/docs/html/man/man1/hy_vfd.1.html
I will give it a try


Edit. Itmust of been the hour I have responded but mine is a YL620 VFD so the hy_vfd mod won't work
Last edit: 11 Apr 2022 07:11 by oficinerobotica.

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

More
02 May 2022 12:20 #241845 by ikkuh

Edit. Itmust of been the hour I have responded but mine is a YL620 VFD so the hy_vfd mod won't work
 

A google search on YL620 VFD linuxcnc gets me loads of usefull information.
FYI, I have a Huyang vfd and that works out of the box with qtDragon, all the pins are standard and even the power bar works. So if you have the same signals with your YL620 then everything will start working soon.

(Not trying to be pedantic... But I always look first on the LinuxCNC fora for supported hardware before buying, works better for me.)

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

More
02 May 2022 12:52 #241847 by cmorley

oficinerobotica post=239873 userid=29769@persei8 Thank you so much. Having a working example helps piecing it all together. I will try to understand a bit more and get back here.

It you got this working and could describe what information would have helped yo do so, I would add the docs.

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

More
03 May 2022 11:27 #241905 by MarkoPolo
I have the same kit, vfdmod, qtdragon and yl620 inverter.
Right and left turns work for me, I can change the speed on the slider, reads errors in qtdragon.
To read errors correctly I changed in handler.py in lines
pin = QHAL.newpin ("spindle-fault", QHAL.HAL_U32, QHAL.HAL_IN)
pin = QHAL.newpin ("spindle-modbus-errors", QHAL.HAL_U32, QHAL.HAL_IN)
I changed U32 to S32 so that the data type matches.

The speed is displayed incorrectly (x60) but if it displays it in the "amps" field for the test then the speed is correct.
(in the file vfd.hal  net spindle-rpm vfdmod.spindle.rpm-out spindle.0.speed-in qtdragon.spindle-amps)
The following user(s) said Thank You: oficinerobotica

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

More
03 May 2022 16:00 - 03 May 2022 16:12 #241927 by oficinerobotica
@cmorley Yes , I got it working :) .... I'm putting together a pseudo guide of what I have done hoping it might help someone else with the same setup. The only thing I still have to get working is the power display and error report underneath the spindle gauge but it seems that @MarkoPolo has a solution for that problem also.
Last edit: 03 May 2022 16:12 by oficinerobotica.

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

Moderators: cmorley
Time to create page: 0.094 seconds
Powered by Kunena Forum