Need help connecting vfdmod and Qtdragon_HD

More
4 years 6 months ago #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
Code:
# 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
4 years 6 months ago #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
The following user(s) said Thank You: oficinerobotica

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

More
4 years 6 months ago #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
4 years 6 months ago #239792 by persei8
I never tried it as I wasn't aware it existed. image missing /media/kunena/emoticons/whistling.png

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

More
4 years 6 months ago #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
4 years 6 months ago - 4 years 6 months ago #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: 4 years 6 months ago by oficinerobotica.

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

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