Machsupport Forum

Mach Discussion => Mach4 General Discussion => Topic started by: tgdavies on November 19, 2018, 08:34:45 PM

Title: Mach 4, Modbus and HuanYang VFDs
Post by: tgdavies on November 19, 2018, 08:34:45 PM
I am moving from Mach3 to Mach4, and the final thing I need to get working is the Modbus connection to my HuanYang VFD.

I have not tried to configure it using the standard Mach4 modes plugin as I believe that the HuanYang protocol has some subtle differences.

With Mach 3 I am using a 3rd party plugin which unfortunately has never had its source code released.

So my questions are:

1. Is the Mach4 modes plugin known to work, or known to not work, with HuanYang VFDs?
2. If it doesn't work, is there any existing option for HuanYang VFDs?
3. If there isn't any existing solution, is the source code of the Mach4 modes plugin available, so that I can make it work with a HuanYang VFD?
Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: tgdavies on November 20, 2018, 12:19:29 AM
'modes' should be 'modbus' throughout -- damn autocorrect
Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: Swarf-Boy on November 20, 2018, 09:09:38 AM
+1 on needing an answer to this issue ( although I am not that far on yet, I should be soon)
Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: rhtuttle on November 20, 2018, 11:46:54 AM
don't have an answer for the question at hand but make sure that your hy vfd actually came with the modbus chip, mine didn't.
Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: Swarf-Boy on November 20, 2018, 02:55:43 PM
Thats not good to hear.

How were you abke to tell?
Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: rhtuttle on November 21, 2018, 10:57:34 AM
That was 10+ years ago.  I think I found a user manual that had a drawing with the modbus chip depicted.  Don't have it now.
Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: MadDogSTrack on November 22, 2018, 08:22:01 PM
Certainly not trying to be snarky, but if you were able/ are able to use HY VFD on Mach 3, then you have a version of the VFD with MODBUS capabilities. 

This is the easiest and most complete test I know of...

Good luck.
Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: rhtuttle on November 23, 2018, 12:06:59 PM
No snark taken.  If you have ever seen me post anything related to electronics you would have seen that I admit I am electronically challenged!
I don't recall the sequence but after trying to get modbus to work I got a translated copy of the hy manual and the diagram.  I asked for the missing modbus chip and they sent it along with a diagram as to where to solder.  I never did since I didn't have the right solder tools and feared that I would screw up the board.  By then I had it running without modbus checked using step and direction for the spindle from the smooth stepper board.

Again, I am electronically challenged and I guess this doesn't prove that I am not using modbus but I wouldn't know how to check that is working/available,

RT
Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: ger21 on November 23, 2018, 01:27:49 PM
Thousands of people are using Huanyang VFD's with modbus plugins, so I don't believe that modbus support in the VFD has been an issue for many years
Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: MadDogSTrack on November 23, 2018, 09:19:53 PM
Gerry,

Agreed when it comes to Mach3.  Mach4 is a different story last I checked.  Somewhere on my computer (at home) is a 30% completed M4 routine for the HY VFD drive.  If/ when I go to M4 I assumed it would be easiest to just pluck down the money for a Hitachi drive or another drive that correctly supports the MODBUS standard.
Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: tgdavies on November 24, 2018, 03:49:37 AM
Thousands of people are using Huanyang VFD's with modbus plugins, so I don't believe that modbus support in the VFD has been an issue for many years

Gerry, I hope that is correct. But as far as I know Mach 3 only works with HuanYang VFDs using an unsupported, closed source driver.
I have not found any instructions for setting up Mach 4 with a HuanYang VFD.

The Mach 4 documentation does not cover modbus -- the "Mach 4 Scripting Manual" ends with a heading reading "Modbus" with no content following it.

I'm not trying to be snarky, and I would love to have answers to any of the three questions I asked in my original post.

I'm an experienced software developer and I have the documentation for HuanYang VFDs -- if there is any documentation about writing modbus drivers for Mach4 I would be interested in having a crack at it.
Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: MadDogSTrack on November 24, 2018, 06:04:03 AM
Tgdavies;

I believe many are using HY VFD's with MACH4, but just not using MODBUS.  The are using other speed/ direction control methods supported by HY's. 

I would like to use MODBUS to get feedback from the VFD.
I don't have the manual with me but they are solutions such as/ similar to:

- zero to ten volt analog
- continuous digital pulse (similar to step/ direction)

There are many posts to show how these methods are accomplished.

Typing this on a phone so apologies for typos.


Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: ger21 on November 24, 2018, 06:27:20 AM
As far as I know, there is currently no way to control a Huanyang VFD via modbus in Mach4. It would require someone writing a new custom plugin, as the Huanyang does not use standard Modbus.

So, the answer to your questions are:

1) No
2) Use an analog 0-10V speed control board. You can get either step/dir or PWM versions. Many breakout boards have these built in.
3) No
Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: rhtuttle on November 24, 2018, 02:58:19 PM
For YaNvrNo,

Couldn't find the diagram or the chip but I was able to find the posts on the subject:

+  Machsupport Forum
|-+  Mach Discussion
| |-+  Mach SDK plugin questions and answers.
| | |-+  Finished Plugins for Download
| | | |-+  Huanyang VFD controller plugin

page 24, response 230


Which has a pic of the board as it should be and I took a pic of my VFD today which shows the missing u4 chip.

HTH

RT
Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: TommyG on November 30, 2018, 08:16:24 AM
Folks

In case it's any use to anyone developing a Mach 4 plugin, here's a link to a Windows application I wrote a few years ago to control the HuanYang VFD I had at the time.

I haven't done any further development on it (I had to Google it myself to see where I'd uploaded it to!) as I got rid of the HuanYang kit and invested in a FRENIC Mini.

Code written in C# with Visual Studio

https://github.com/GilchristT/SpindleTalker2/releases (https://github.com/GilchristT/SpindleTalker2/releases)

Tommy
Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: Tweakie.CNC on November 30, 2018, 08:39:29 AM
Excellent info TommyG - thanks for posting.

Tweakie.
Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: MadDogSTrack on November 30, 2018, 11:15:12 AM
TommyG;

That is exactly were I landed - swap out the VFD: I felt I would always be trying to make the HuanYang VFD work whenever software changed, so I decided to just update the VFD if/ when I upgrade to M4.

Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: Myrickman on December 11, 2018, 08:59:53 AM
Thanks tommyg for the posting of the link. I was able to get my HY VFD running using the spindle talker over RS485. I also have also tried to use the  voltage output from my Gecko G540 wired up to use M4 controls, but having some configuration issues in Mach. I do like the current output feature of the spindle talker app....
Title: Re: Mach 4, Modbus and HuanYang VFDs
Post by: raptor_demon on January 02, 2019, 10:56:42 AM
this is something i am trying to do, i was able to make my huangyang work with spindle talker 2 and with 0-10v but it would be nice to have modbus working. i dont even know where to start with writing a plugin or how the modbus is supposed to work