Hello Guest it is March 28, 2024, 05:07:03 PM

Author Topic: Mach4 Huanyang GT series Modbus setup  (Read 2325 times)

0 Members and 1 Guest are viewing this topic.

Mach4 Huanyang GT series Modbus setup
« on: April 07, 2019, 12:58:10 AM »
If anyone is interested in an RS485 (Modbus) Huanyang GT series (yes, it's really Modbus compliant) spindle controller for Mach4, I will be writing a step by step set of instructions in the next few days.
This will consist of a set of instructions on setting up the VFD, the Modbus in Mach4, and the LUA code necessary to tie it all together.
The VFD responds to the normal M3, M4, M5 commands and the speed input from the S command. It uses an off the shelf USB to RS485 converter.
I have used a RS485 based VFD on my Mach3 machine for about 5 years and love it. But I really like some of the features in Mach4 much better.

This setup is easily modified to work with other (Modbus compliant) FVDs.
« Last Edit: April 07, 2019, 01:02:10 AM by bc17101 »
Re: Mach4 Huanyang GT series Modbus setup
« Reply #1 on: April 07, 2019, 10:54:57 PM »
So much yes!!

i have been trying to get modbus to work with my HUANYANG VFD for months.

this is similar to the one i have: https://www.amazon.com/Variable-Frequency-Inverter-Converter-HUANYANG/dp/B0775F4G47

and ive been using this rs485 controller

https://www.amazon.com/gp/product/B00NKAJGZM/ref=oh_aui_search_asin_title?ie=UTF8&psc=1

this would be a huge help!

thanks in advance
Re: Mach4 Huanyang GT series Modbus setup
« Reply #2 on: April 07, 2019, 11:22:45 PM »
Unfortunately the Huanyang HY series VFDs is not modbus compatible even though they say it is. Huanyang didn't follow the protocol correctly and so the Mach4 Modbus controller can't communicate with them. Huanyang does have a GT series that is fully Modbus compatible. The 2.2KW version is $143 0n amazon.That is the one I am using and it works great.

Here is a link to the 26 page document I just completed that takes you step by step through all the steps necessary to get the VFD up and running. It takes about 1/2 hour to set everything up.
Here is the link to the document. [size=78%]http://caldwellfam.net/bill/2019/04/connecting-a-vfd…the-modbus-rs485/[/size]
[/size]In the document is a link to the LUA code that ties things together. Good luck. Please let me know if you have questions or issues. If you do decide to purchase the GT series VFD then it should be plug and play.[size=78%]



Offline Tweakie.CNC

*
  • *
  •  9,196 9,196
  • Super Kitty
    • View Profile
Re: Mach4 Huanyang GT series Modbus setup
« Reply #3 on: April 08, 2019, 01:44:57 AM »
Excellent work Bill and thank you for sharing your knowledge.

Tweakie.
PEACE
Re: Mach4 Huanyang GT series Modbus setup
« Reply #4 on: May 27, 2019, 09:03:43 AM »
Thanks Bill,
I followed your written instruction and got my spindle turning.  Had a few issues, My GT inverter had pc.02  set to 2.  I had to set it to 0 to get the RS 485 working.  I do not know how it got set to 2 because by default the manual says 0?  The one issue I am still having is that on the Mach 4 screen when the spindle is running it does not display the speed.  Sometimes the speed with flash in the box for a few milliseconds when I change the speed, but it then goes back to 0.  Any ideas?  Thanks for instructions I would not have been able to get this working without them.
Thanks,
Todd
Re: Mach4 Huanyang GT series Modbus setup
« Reply #5 on: May 27, 2019, 09:47:43 AM »
Hi,
if you have a look at the code behind the DRO in the  screen editor I think you'll find its called 'TrueSpeedDRO'.

Mach displays the spindles true speed by timing the index pulses doing the required calculation and displaying the result.
If you do not have a index signal generator attached to the spindle the DRO will not display anything.

Craig
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach4 Huanyang GT series Modbus setup
« Reply #6 on: May 27, 2019, 10:12:07 AM »
Hi,
yes, in default mode the DRO is called 'droTrueSpindle'. the code attached to the DRO can be selected by the drop down
list, and by default displays SpindleTrueRPM, but note the entry immediately above that entry in the drop down list is called
'SpindleRPM' and that will display the rpm you have commanded in Mach with the S word in Gcode or MDI, ie it does not require
an index signal.

Craig
« Last Edit: May 27, 2019, 10:26:32 AM by joeaverage »
'I enjoy sex at 73.....I live at 71 so its not too far to walk.'
Re: Mach4 Huanyang GT series Modbus setup
« Reply #7 on: May 27, 2019, 10:49:44 AM »
Thank you,
Re: Mach4 Huanyang GT series Modbus setup
« Reply #8 on: May 27, 2019, 07:39:03 PM »
Im not sure why the spindle speed is not displaying correctly, but it looks like Craig has a handle on it. Thanks Craig....


For reference here are the VFD settings I'm using:
P0.00,01,02=0
P0.03,04=400.00
P0.05=0
P0.06=400
P0.07=0
P0.11,12=.5
P0.14=8
P1.00=0
P2.01=2.2
P2.02=400
P2.03-24000
P2.04=220
P2.05=10


Bill