USING A VFD

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--bitsnumber of bits in a byte
-r--ratebaud rate
-p--parityodd, even or none
-s--stopbits1 or 2
-t--slavemodbus 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

Default Parameters

If no optional arguments are included when loading the hy_gt_vfd HAL module, the following defaults will be used: