Qt_Dragon

USING A VFD

QtDragon was designed to interface to a VFD, but will work without one for simulation purposes. There are a number of VFD drivers included in the linuxcnc distribution, including hy_gt_vfd and mb2hal. A custom HAL component has been created for use with QtDragon, called hy_gt_vfd.py (same name as the linuxcnc version)

The following HAL connections must be added to the qtdragon_postgui.hal file:

loadusr -Wn gt_vfd ./hy_gt_vfd.py -d /dev/ttyUSB0
net spindle-on       gt_vfd.spindle-on <= spindle.0.on
net spindle-fb       gt_vfd.speed-fb => spindle.0.speed-in
net spindle-cmd      gt_vfd.speed-cmd <= spindle.0.speed-out-abs
net spindle-amps     gt_vfd.output-amps => qtdragon.spindle_amps
net spindle-volts    gt_vfd.output-volts => qtdragon.spindle_volts
net spindle-fault    gt_vfd.fault-info => qtdragon.spindle_fault
net modbus-errors    gt_vfd.modbus-errors => qtdragon.modbus-errors
net spindle-fwd      spindle.0.forward => and2.0.in1
net at-speed-fwd     spindle.0.at-speed <= and2.0.out
net at-speed-fwd     qtdragon.hal_led_atspeed

The spindle gauge widget is connected with:

net spindle-cmd      qtdragon.gauge_spindle_setpoint
net gauge_value      qtdragon.gauge_spindle_value <= gt_vfd.speed-rpm

NOTE: The hy_gt_vfd.py module requires the python pymodbus library.

sudo apt install python3-pymodbus