HY_GT_VFD(1)

πŸ“¦
version 2.9.4 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– 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 in P0.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 to 1. this matches the default in the hy_gt_vfd driver, so change it if your setup has special needs.
  • PC.01 = 5 β€” sets baud rate selection to 5 (38400 bps). this matches the default in the hy_gt_vfd driver, so change it if your setup has special needs.

the full baud menu, for the record:

  • 0 = 1200
  • 1 = 2400
  • 2 = 4800
  • 3 = 9600
  • 4 = 19200
  • 5 = 38400
  • PC.02 = 0 β€” sets Data Format (8n1 RTU). this matches the default in the hy_gt_vfd driver, so change it if your setup has special needs.
  • PC.03 = 1 β€” sets Communication Delay Time to 1 ms. the hy_gt_vfd driver expects this. πŸ‘€

🌸 OPTIONS 🌸

  • -b, --bits N β€” (default 8) for Modbus communication. sets number of data bits to N. N must be between 5 and 8 inclusive.
  • -p, --parity [Even,Odd,None] β€” (default None) for Modbus communication. sets serial parity to Even, Odd, or None.
  • -r, --rate N β€” (default 38400) 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] β€” (default 1) for Modbus communication. sets serial stop bits to 1 or 2.
  • -t, --target N β€” (default 1) 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 register P2.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 register P0.03 and P0.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 register P0.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 between 0.001 and 2.000 seconds. default: 0.1 seconds.
  • 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) β€” True when the drive is on and at the commanded speed (within 2%), False otherwise.
  • hy_gt_vfd.freq-cmd (float, out) β€” the requested output frequency, in Hz. this is set from the .speed-cmd value, 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 pin True to command the spindle on, at the speed requested on the .speed-cmd pin. set this pin False to 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:

  1. 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. πŸ”
  2. 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