Huanyang GT Series VFD Issues

  • kubes
  • Away
  • Junior Member
  • Junior Member
More
29 May 2025 04:24 #329347 by kubes
Huanyang GT Series VFD Issues was created by kubes
I am trying to get a Huanyang GT VFD to work with LinuxCNC. When I start Linux CNC or via halrun..
halrun
loadusr -W hy_gt_vfd -d /dev/ttyUSB0 -p none -r 38400 -s 1 -t 1 -S1410 -F60 -f10
twopass:pass0: loadusr -W hy_gt_vfd -d /dev/ttyUSB0 -p none -r 38400 -s 1 -t 1 -S1410 -F60 -f10
hy_gt_vfd: device='/dev/ttyUSB0', baud=38400, parity='N', bits=8, stopbits=1, address=1
read_modbus_register: error reading freq-fb (register 0x3000): Connection timed out
read_modbus_register: error reading freq-fb (register 0x3000): Connection timed out
read_modbus_register: error reading freq-fb (register 0x3000): Connection timed out
...
set_motor_off: error writing 5 to register 0x1000: Connection timed out
set_motor_off: error writing 5 to register 0x1000: Connection timed out
set_motor_off: error writing 5 to register 0x1000: Connection timed out
set_motor_off: error writing 5 to register 0x1000: Connection timed out
set_motor_off: error writing 5 to register 0x1000: Connection timed out

I can successfully connect and send commands via mbpoll and the command line
$ mbpoll -m rtu -a 1 -0 -t 4:hex -v  -r 0x1000 -b 38400 -P none /dev/ttyUSB0 0005
debug enabled
Set start reference=4096
Set rtu baudrate=38400
Set rtu parity=none
Set device=/dev/ttyUSB0
1 write data have been found
Set data=5
Word[0]=0x5
mbpoll 1.0-0 - FieldTalk(tm) Modbus(R) Master Simulator
Copyright © 2015-2019 Pascal JEAN, https://github.com/epsilonrt/mbpoll
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; type 'mbpoll -w' for details.

Opening /dev/ttyUSB0 at 38400 bauds (N, 8, 1)
Set response timeout to 1 sec, 0 us
Protocol configuration: Modbus RTU
Slave configuration...: address = [1]
                        start reference = 4096, count = 1
Communication.........: /dev/ttyUSB0,      38400-8N1
                        t/o 1.00 s, poll rate 1000 ms
Data type.............: 16-bit register, output (holding) register table

[01][06][10][00][00][05][4D][09]
Waiting for a confirmation...
<01><06><10><00><00><05><4D><09>
Written 1 references.

I've tried different baud rates, etc and the same results.  Works via the command line, but not via the hal.

Any ideas?

Please Log in or Create an account to join the conversation.

More
29 May 2025 15:44 #329372 by langdons
Replied by langdons on topic Huanyang GT Series VFD Issues
Please post specific model and link to datasheet.

I thought USB was generally considered bad (for latency, speed, performance, etc.)

Please Log in or Create an account to join the conversation.

More
29 May 2025 18:09 #329379 by PCW
Replied by PCW on topic Huanyang GT Series VFD Issues
Latency is not really an issue with Modbus as it's not real time to begin with...
The following user(s) said Thank You: langdons

Please Log in or Create an account to join the conversation.

  • kubes
  • Away
  • Junior Member
  • Junior Member
More
29 May 2025 20:09 - 30 May 2025 00:11 #329384 by kubes
Replied by kubes on topic Huanyang GT Series VFD Issues
I am 100% convinced it's a software issue. I was able to create a basic application using the Modbus library, using the same basic logic as the hy_gt_vfd hal driver, and it works. Meaning no communication error, and I can start and stop the spindle fine. So that along with the mbpoll that also works, it's in the hy_gt_vhf hal module.

I think that there is a memory allocation that stepping over the modbus context (where the port settings are)?
 
Last edit: 30 May 2025 00:11 by kubes.

Please Log in or Create an account to join the conversation.

  • kubes
  • Away
  • Junior Member
  • Junior Member
More
01 Jun 2025 04:16 #329492 by kubes
Replied by kubes on topic Huanyang GT Series VFD Issues
Confirmed is a SW issue.

I replaced the hy_gt_vfd driver with mb2hal, which is a generic modbus HAL component, no HW changes, and it works.

Please Log in or Create an account to join the conversation.

  • Hakan
  • Away
  • Platinum Member
  • Platinum Member
More
01 Jun 2025 05:55 - 01 Jun 2025 05:56 #329494 by Hakan
Replied by Hakan on topic Huanyang GT Series VFD Issues
If standard Modbus works one can wonder why there is a hal componenet for this vfd?
The old Huanyang vfds use something similar to but not quite Modbus so there it is needed.
 
Last edit: 01 Jun 2025 05:56 by Hakan.

Please Log in or Create an account to join the conversation.

Time to create page: 0.102 seconds
Powered by Kunena Forum