QtDragon was designed to communicate with a VFD via modbus. A Linuxcnc native HAL component provides the modbus interface between QtDragon and a Huanyang GT Series VFD.
To implement modbus communication, the following HAL connections must be added to the qtdragon_postgui.hal file:
loadusr -Wn hy_gt_vfd hy_gt_vfd.py -S 24000 -F 400 -f 120 -d /dev/ttyUSB0 [other options]
net spindle-on hy_gt_vfd.spindle-on <= spindle.0.on
net spindle-fb hy_gt_vfd.speed-fb => spindle.0.speed-in
net spindle-cmd hy_gt_vfd.speed-cmd <= spindle.0.speed-out-abs
net spindle-amps hy_gt_vfd.output-current => qtdragon.spindle-amps
net spindle-volts hy_gt_vfd.output-voltage => qtdragon.spindle-volts
net spindle-fault hy_gt_vfd.fault-info-code => qtdragon.modbus-fault
net modbus-errors hy_gt_vfd.modbus-errors => qtdragon.modbus-errors
Other optional arguments for hy_gt_vfd.py are:
-b | --bits | number of bits in a byte |
-r | --rate | baud rate |
-p | --parity | odd, even or none |
-s | --stopbits | 1 or 2 |
-t | --slave | modbus slave address (address of VFD) |
The spindle gauge widget is connected with:
net spindle-cmd qtdragon.gauge_spindle_setpoint
net spindle-fb qtdragon.gauge_spindle_value