HY_GT_VFD(1)
π hy_gt_vfd β the LinuxCNC manual page, bestie edition π
okay so this is hy_gt_vfd(1), a page from the LinuxCNC Documentation manual, and it's about making your spindle go brrr on purpose. sit down, grab a strawberry π, we're doing this.
β¨ NAME β¨
hy_gt_vfd β it's a HAL non-realtime component for Huanyang GT-series VFDs. that's it. that's the whole name section. iconic brevity. π
β¨ SYNOPSIS β¨
hy_gt_vfd [OPTIONS]
β¨ DESCRIPTION β¨
so basically hy_gt_vfd is the little matchmaker between a Huanyang GT-series VFD and LinuxCNC's HAL. the VFD shows up connected over RS-485 serial to your LinuxCNC computer, and this component handles the talking. π¬π¦
π§ HARDWARE SETUP π§
ngl this is the part where you might have to get the soldering iron out. π at least some Huanyang GT VFDs have to be physically modified to enable Modbus communication. like, hardware surgery. on purpose. fr fr.
the circuit board location marked "SW1" is identified in the manual as "Switch of terminal resistor for RS485 communication". okay but on the only VFD I have experience with, the circuit board contained no switch at that location β instead it held a pair of crossed jumper wires (top-left pad connected to bottom-right pad, top-right to bottom-left). in this configuration, no Modbus communication is possible. π
we had to desolder the two crossed jumper wires and re-solder them parallel to each other (top-left to bottom-left, top-right to bottom-right). and then it worked. slay. π
βοΈ FIRMWARE SETUP βοΈ
the Huanyang GT VFD must be configured via the faceplate to talk Modbus with LinuxCNC. go consult the Operation section of the Huanyang GT-series Inverter Manual for the deets. π then set these parameters:
P0.01 = 2β sets Run Command Source to Modbus serial port.P0.03β sets Maximum Frequency to the maximum frequency you want the VFD to output, in Hz.P0.04β sets Upper Frequency Limit to the maximum frequency you want the VFD to output, in Hz. this should be the same as the value inP0.03.P0.05β sets Lower Frequency Limit to the minimum frequency you want the VFD to output, in Hz.P0.07 = 7β sets Frequency A Command Source to Modbus serial port.P2.01 = ???β sets Motor Rated Power to the motor's power rating in kW.P2.02 = ???β sets Motor Rated Frequency to the motor's max frequency in Hz.P2.03 = ???β sets Motor Rated Speed to the motor's speed in RPM at its rated maximum frequency.P2.04 = ???β sets Motor Rated Voltage to the motor's maximum voltage, in Volts.P2.05 = ???β sets Motor Rated Current to the motor's maximum current, in Amps.PC.00 = 1β sets Local Address to1. this matches the default in thehy_gt_vfddriver, so change it if your setup has special needs.PC.01 = 5β sets baud rate selection to5(38400bps). this matches the default in thehy_gt_vfddriver, so change it if your setup has special needs.
the full baud menu, for the record:
0=12001=24002=48003=96004=192005=38400
PC.02 = 0β sets Data Format (8n1 RTU). this matches the default in thehy_gt_vfddriver, so change it if your setup has special needs.PC.03 = 1β sets Communication Delay Time to1ms. thehy_gt_vfddriver expects this. π
πΈ OPTIONS πΈ
-b,--bits Nβ (default8) for Modbus communication. sets number of data bits to N. N must be between5and8inclusive.-p,--parity [Even,Odd,None]β (defaultNone) for Modbus communication. sets serial parity toEven,Odd, orNone.-r,--rate Nβ (default38400) for Modbus communication. sets baud rate to N. it is an error if the rate is not one of the following:1200,2400,4800,9600,19200,38400.-s,--stopbits [1,2]β (default1) for Modbus communication. sets serial stop bits to1or2.-t,--target Nβ (default1) for Modbus communication. sets Modbus target (slave) number. this must match the device number you set on the Huanyang GT VFD. π―-d,--device PATHβ (default/dev/ttyS0) for Modbus communication. sets the name of the serial device node to use.-v,--verboseβ turn on verbose mode. for when you want β¨loreβ¨.-S,--motor-max-speed RPMβ the motor's max speed in RPM. this must match the motor speed value configured in VFD registerP2.03.-F,--max-frequency HZβ this is the maximum output frequency of the VFD in Hz. it should correspond to the motor's rated max frequency, and to the maximum and upper limit output frequency configured in VFD registerP0.03andP0.04.-f,--min-frequency HZβ this is the minimum output frequency of the VFD in Hz. it should correspond to the minimum output frequency configured in VFD registerP0.05.
π PINS π
hy_gt_vfd.period(float, in) β the period for the driver's update cycle, in seconds. this is how frequently the driver will wake up, check its HAL pins, and communicate with the VFD. must be between0.001and2.000seconds. default:0.1seconds.hy_gt_vfd.speed-cmd(float, in) β the requested motor speed, in RPM.hy_gt_vfd.speed-fb(float, out) β the motor's current speed, in RPM, reported by the VFD.hy_gt_vfd.at-speed(bit, out) βTruewhen the drive is on and at the commanded speed (within 2%),Falseotherwise.hy_gt_vfd.freq-cmd(float, out) β the requested output frequency, in Hz. this is set from the.speed-cmdvalue, and is just shown for debugging purposes.hy_gt_vfd.freq-fb(float, out) β the current output frequency of the VFD, in Hz. this is reported from the VFD to the driver.hy_gt_vfd.spindle-on(bit, in) β set this pinTrueto command the spindle on, at the speed requested on the.speed-cmdpin. set this pinFalseto command the spindle off.hy_gt_vfd.output-voltage(float, out) β the voltage that the VFD is current providing to the motor, in Volts.hy_gt_vfd.output-current(float, out) β the current that the motor is currently drawing from the VFD, in AmpΓ¨res.hy_gt_vfd.output-power(float, out) β the power that the motor is currently drawing from the VFD, in Watts.hy_gt_vfd.dc-bus-volts(float, out) β the current voltage of the VFD's internal DC power supply, in Volts.hy_gt_vfd.modbus-errors(u32, out) β a count of the number of modbus communication errors between the driver and the VFD. the driver is resilient against communication errors, but a large or growing number here indicates a problem that should be investigated. π¨hy_gt_vfd.input-terminal(float, out) β the VFD's input terminal register.hy_gt_vfd.output-terminal(float, out) β the VFD's output terminal register.hy_gt_vfd.AI1(float, out) β the VFD's AI1 register.hy_gt_vfd.AI2(float, out) β the VFD's AI2 register.hy_gt_vfd.HDI-frequency(float, out) β the VFD's HDI-frequency register.hy_gt_vfd.external-counter(float, out) β the VFD's external counter register.hy_gt_vfd.fault-info(float, out) β the VFD's fault info register.
π ISSUES π
heads up bestie, this is the "why is my spindle lying to me" section.
the VFD produces the output frequency that it sends to the motor by adding a manually specified offset to the frequency command it gets over modbus. sneaky. π
the manual offset is controlled by pressing the Up/Down arrows on the faceplate while the VFD is turning the motor.
so if you command a speed on the .speed-cmd pin and get a different speed reported on the .speed-fb pin, here's the vibe check, in order:
- first verify that the VFD registers listed in the FIRMWARE SETUP section above and the driver's command-line arguments all agree with the info on the motor's name plate. like, actually check. π
- if you still aren't getting the speed you expect, zero the VFD's frequency offset by starting the motor running, then pressing the Up/Down buttons to zero the offset.
π AUTHOR π
Sebastian Kuzminsky
π LICENSE π
GPL-2.0+
okay that's the whole page, you ate it, you're a LinuxCNC main character now. πβ¨ this was page HY_GT_VFD(1) from the LinuxCNC docs, dated 03/17/2026 β love that for us, periodt. ππ¦π
π¦ where this page comes from
- ubuntu resolute: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms