Need help connecting vfdmod and Qtdragon_HD
- oficinerobotica
- Topic Author
- Offline
- Senior Member
- Posts: 47
- Thank you received: 12
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.
- persei8
- Offline
- Platinum Member
- Posts: 386
- Thank you received: 121
Jim
Please Log in or Create an account to join the conversation.
- andypugh
- Offline
- Moderator
- Posts: 23537
- Thank you received: 4852
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 ?
Please Log in or Create an account to join the conversation.
- persei8
- Offline
- Platinum Member
- Posts: 386
- Thank you received: 121
Please Log in or Create an account to join the conversation.
- oficinerobotica
- Topic Author
- Offline
- Senior Member
- Posts: 47
- Thank you received: 12
Please Log in or Create an account to join the conversation.
- oficinerobotica
- Topic Author
- Offline
- Senior Member
- Posts: 47
- Thank you received: 12
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
Please Log in or Create an account to join the conversation.
- ikkuh
- Offline
- Elite Member
- Posts: 272
- Thank you received: 46
A google search on YL620 VFD linuxcnc gets me loads of usefull information.
Edit. Itmust of been the hour I have responded but mine is a YL620 VFD so the hy_vfd mod won't work
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.
- cmorley
- Away
- Moderator
- Posts: 7757
- Thank you received: 2043
It you got this working and could describe what information would have helped yo do so, I would add the docs.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.
Please Log in or Create an account to join the conversation.
- MarkoPolo
- Away
- Elite Member
- Posts: 259
- Thank you received: 71
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)
Please Log in or Create an account to join the conversation.
- oficinerobotica
- Topic Author
- Offline
- Senior Member
- Posts: 47
- Thank you received: 12
Please Log in or Create an account to join the conversation.