Machsupport Forum

Mach Discussion => Mach SDK plugin questions and answers. => Finished Plugins for Download => Topic started by: royaumedeole on October 29, 2012, 03:13:05 PM

Title: A new Huanyang VFD plugin
Post by: royaumedeole on October 29, 2012, 03:13:05 PM
Hi all!

Facing some problems with Matty Zee plugin, i decided to write my own plugin:

features:



Here is th link to my page.
It contains decription, download link and setup informations

http://royaumedeole.fr/informatique/plugin-mach3-pour-vfdhuanyang/mach3-plugin-for-huanyang-vfd/ (http://royaumedeole.fr/informatique/plugin-mach3-pour-vfdhuanyang/mach3-plugin-for-huanyang-vfd/)

Hoping it to be helpfull to another people

this Plugin is still in development and may still contains some minor bugs. Do not hesitate to contact me and I  will correct it.


Finally , a small video on youtube to see it in action
 http://youtu.be/3TbeSifxr_A (http://youtu.be/3TbeSifxr_A)





Title: Re: A new Huanyang VFD plugin
Post by: theminor on October 30, 2012, 09:16:26 AM
Wow thanks! I look forward to testing this out. The E-Stop issue is a big one - that will be a welcome addition for sure. All the other features look nice too!

I have one request - the old Huanynag VFD plugin allowed implementing a DRO to show the Amperage draw from the VFD. I really like this feature and use it via a custom DRO on my screenset. Do you think you could add this option to your version? That would make it perfect IMO!  ;)

Thanks in advance!
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on October 30, 2012, 10:41:56 AM
Hello,

I'll be happy to add such feature.

In fact, the driver i have developed is able to get this information. As it was useless for me, i decided not to integrate it to the default version. So, as you seem to be interested by this functionnality, i'm going to modify the plugin so that you can get the current on the user dro you want.

I'll update this post as soon as it is ready. (before the end of week i think)

if you test it, do not hesitate to give me a feedback if you're facing problems, bugs. I'll correct plugin and update documentation.





Title: Re: A new Huanyang VFD plugin
Post by: theminor on October 31, 2012, 09:15:08 AM
Fantastic! Looking forward to it! Thanks a ton!
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on November 02, 2012, 04:34:03 PM
hello Theminor,

I have updated the plugin.
I have rewritten the communication code between VFD and mach3 because it was still buggy and I was not satisfied with the quality of the source code.
 
Below the features I add:


Here a screenshot of the configuration screen

(http://royaumedeole.fr/wp-content/uploads/2012/10/newInterface2.png)

I put the new plugin version as an attachment.

Prerequisites, setup and configuration can be found at

http://royaumedeole.fr/informatique/plugin-mach3-pour-vfdhuanyang/mach3-plugin-for-huanyang-vfd/ (http://royaumedeole.fr/informatique/plugin-mach3-pour-vfdhuanyang/mach3-plugin-for-huanyang-vfd/)

It's working on my side but i have not modify my screenset to check that current and so on are displayed.

I hope that some user will test it to give me a feedback.

Title: Re: A new Huanyang VFD plugin
Post by: theminor on November 02, 2012, 04:51:08 PM
Wow that is great! Thanks - I can't wait to test this out. I'll give it a go as soon as I can - hopefully this weekend.

I've been heavy in working on my own plugin that is about done (MultiZ plugin discussed in another thread) and also needs some heavy testing so it looks like I have a good bit of testing to do!

Thanks again - I'm sure others out there will also find this very useful!
Title: Re: A new Huanyang VFD plugin
Post by: theminor on November 03, 2012, 01:50:40 PM
OK I've done some testing. It works!

I'm having a few issues:


That is all for now. I'll keep testing and report back if I find any other bugs.

Thanks again!
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on November 03, 2012, 02:03:16 PM
First of all , a big thanks for your feedback.

Now i'm going to reprocuce those problems on my side and fix it.

the first one is the most important. I hope being able to reproduce it.

The second one is pretty simple. You wrote some plugins so you'll understand....in the update Loop, i firstly check if the spindle is running..If not i simply do nothing . My aim was to avoid some useless comunication, computation.

But you're right, after a stop, I need to continue reading for a while...i think that i'm going to continue to extract data until speed/Current/out frequency are both to zero.

I'll update this topic as soon as it is ready.
Title: Re: A new Huanyang VFD plugin
Post by: theminor on November 03, 2012, 02:09:54 PM
Fantastic - yes I understand and that is exactly how I would have coded it. It shouldn't be too difficult to account for the spindown.

Let me know if you are unable to reproduce the crash. If you can't I'll try to do it again and document more specifically what I did.

Great work - I'm loving the plugin!
Title: Re: A new Huanyang VFD plugin
Post by: ger21 on November 03, 2012, 02:46:26 PM
How are you guys finding the quality of the recent Huanyang VFD's? Since they practically give them away with the spindles, I guess they're worth a shot.
Title: Re: A new Huanyang VFD plugin
Post by: theminor on November 03, 2012, 02:54:28 PM
I believe the quality has much improved although I have no data to back that up. I've just read fewer complaints recently and forum postings have indicated that the quality issues are mostly resolved a this point.

In any event, for the price it is a fantastic deal. It is amazing how low the prices have gotten and how low of an offer the sellers will take.
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on November 03, 2012, 03:36:38 PM
I do agree with theminor.

On my side, I can't complain about it. I drive my 2hp motor (which is not a chineese spindle) without problem.

when I bought it, my first think was "Well it's a cheap chinese product...do not expect too much.."

But after a small period of 3 months, an average of 2 milling hours by week, I have not been facing any kind of problem...













Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on November 04, 2012, 04:10:40 PM
OK I've done some testing. It works!

I'm having a few issues:

  • I got a major crash when I first started Mach with the plugin loaded and nothing turned on yet when I set the spindle speed using the DRO, which sent my Feedrate override to max. When I tried to adjust the feedrate override, Mach crashed and I had to restart my computer
  • The user DROs work well except when I turn the spindle off. Once the spindle is turned off, these immediately cease reporting. For example, I start the spindle and after it spins up I stop it. Usually the Spindle speed DRO would show the actual speed of the spindle as it decelerates but it just keeps showing the speed just before I turned the spindle off.

That is all for now. I'll keep testing and report back if I find any other bugs.

Thanks again!



Well, I have corrected the second issue, dealing with monitoring and spindle stop.

You'll find the updated version as an attachment

Although i'm sure there is a bug, I didn't manage to reproduce it. Could you give me more details?
For exemple, i'll need your Mach3 version and idealy your Xml profile file. On this way, Iw ould be in the same conditions.

Thank you very much for your precious help!

Title: Re: A new Huanyang VFD plugin
Post by: theminor on November 04, 2012, 07:15:01 PM
Great! mach now properly reports RPM as it is spinning down!

However, I'm now getting another crash after spindown. If I turn the spindle on and off a few times (especially, it seems, if I turn the spindle on/off, using hte spindle on/off toggle button, and turning it off before it reaches full speed - that is turn it on and then off relatively soon thereafter - and possibly doing this multiple times in a row). Mach abruptly closes but still stays running in the background and I'm unable to restart my computer without hitting a hard reset switch.

I think this is unrelated to the first crash I was experiencing also. To replicate that original crash, try these steps:


I think this original crash might be related to hitting the spindle on button while Mach is in the reset state. I could be wrong. The second crash may be related but it is hard to tell. Try those steps above for each and see if you can replicate the problem. If not, I'll send you my xml files and anything else you need.

Thanks very much for the hard work and for taking the time to diagnose this problem!@=
Title: Re: A new Huanyang VFD plugin
Post by: ger21 on November 04, 2012, 07:25:03 PM

  • Start Mach, do not hit reset (i.e. leave Mach) in the reset state
  • Press the "spindle on" button (i.e the "spindle on/off toggle" button)

You really should make sure that if Mach3 is in reset, the plugin ignores all controls that affect the spindle.
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on November 06, 2012, 06:58:37 AM
Well,

I finally managed to reproduce the problem. Behind the global problem, 2 bugs that I fixed. (dealing with memory mamangement).

I checked your testcase, and I cannot detect problem anymore. I did some test and was unable to crash mach3.

You'll find the new version here http://royaumedeole.fr/wp-content/uploads/2012/11/vfdPluginv1.3.zip (http://royaumedeole.fr/wp-content/uploads/2012/11/vfdPluginv1.3.zip)

I hope that now the plugin is fully working,  with no more crash. (on my side it's ok)
And a special thanks to theMinor, for your precious help!





Title: Re: A new Huanyang VFD plugin
Post by: theminor on November 06, 2012, 08:43:56 AM
Excellent - I'll give it a go this evening and report back!
Title: Re: A new Huanyang VFD plugin
Post by: theminor on November 06, 2012, 08:39:13 PM
It works it works! No crashes!  Thanks again I really like this plugin! Working A-OK so far. I'll let you know if there are any other problems whatsoever.

Thanks!
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on November 12, 2012, 03:43:13 AM
Coming from an RF45 clone owner..... Absolutely fantastic!! I always wondered how this VFD and Mach were going to interface with my geared machine. This makes it easy!

Im in the process of building my machine right now, and I dont have my 3 phase motor yet, but the VFD interfaces with Mach beautifully and the RPM updates instantly. I was really dreading getting this Modbus setup (especially dreading reading over the 100 pages in matty zee's thread...again...), but I stumbled across this thread and getting it hooked up to mach literally took me half an hour (and most of the was downloading USB drivers, and figuring out how to program the VFD itself). The plugin itself took about 5 minutes and worked instantly, as soon as I swapped over my reversed wires. Much thanks!!!!!!!!
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on November 12, 2012, 05:32:56 AM
Hi Mikemaat!

Thank you for your feedback!

Moreover it's a positive feedbak!, so perfect!

I'm very happy this plugin is usefull to other members. It gives sense to hours spent to developp it!
Title: Re: A new Huanyang VFD plugin
Post by: shobley on November 14, 2012, 09:27:06 AM
I just tested the new plugin with my spindle and it works OK. It starts/stops with f5 and sets the VFD DRO to match the spindle speed on the Mach 3 screen (8000 RPM).

I did notice a few things:

1) Can't get the on-screen RPM to reflect the VFD DRO - I know there must be an ID# to assign for this, but I can't seem to get it to work.
2) Spindle speed seems to max out at 8000 - can't go above this.
3) Setting 4000 RPM seems to make the system enter E-stop - could be too slow for the VFD/Spindle
4) Mach3 is not waiting for the spindle to spin up - is this a function of getting RPM feedback? ie Mach 3 will wait on the G-Code line till the RPM feedback reaches the desired setting.

I'm pretty sure none of this is a problem with the plugin - but a p.e.b.k.a.c. error ;-)

Great work!

Steve
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on November 14, 2012, 10:31:23 AM
well, let diagnose those problems:

First of all, some points to check:

a) What is your version of Mach3? (to check for the RPM dro update)

b) when you go into the config Panel and press the Ok button, is the information message showing the good speed (for example 3000rpm@50hz)? If not, change the rated speed into your VFD (PD144 i think)

c) Are your using the pulley option. If yes, pay attention that when you modify your pulleys configuration, you have to restart Mach3, because the plugin read the pulley configuration only at startup.

Now some answer to your questions:

1) the plugin should write directly to the #39 dro which is a system dro. But these feature is not available on all Mach3 version. That's why I would like to know your Mach3version.

2) My first idea is that pulley system is checked and your pulley config is limited to 8000rpm. Another idea is that your VFD is configured to limit to 8000rpm.

3) Is your VFD configured to run at 4000rpm?. If not then the spindle does not run, so the plugin detects that the rpm is 0 instead of 4000...conider this as a problem..so it raises an E-stop.

4) the plugin send the command to the VFD, but next, the VFD follows the configured ramp..The plugin just check the spindle turn.. Well we could imagine an option where we wait the spindle to be at required speed before continue.

 I think the good strategy is to solve this first two points, then we will tackle point 3 and 4.


Concerning  p.e.b.k.a.c..
If the end user is between keyboard and screen, we must not forget that the developper himself is between keyboard and screen :-)..

Seb









Title: Re: A new Huanyang VFD plugin
Post by: shobley on November 14, 2012, 10:36:05 AM
Thanks for the reply - when I get home tonight I will test and post an update.
Title: Re: A new Huanyang VFD plugin
Post by: shobley on November 14, 2012, 05:29:32 PM
Version of Mach3 - 3.043.022
Speed is 1440 @ 50Hz - which I think is correct, when I ask for 8000 I get 7999 on the VFD
Pulley? No - I have the "standard" spindle (featureless silver cylinder)

 
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on November 14, 2012, 05:47:07 PM
I think I have the answer.

Well, those silver cylinder spindle are desiigned to run à 3000rpm@50hz..(check the manual if you have one)

matty zee plugin was using this ratio (3000@50hz), ommitting the VFD configuration (PD144)

the factory parameter in the the VFD is 1440, but it does not correspond to your spindle (ensure that)

so, i think you should set the pd144 parameter to 3000 instead 1440.

Start Mach3, go to the plugin panel and check the information message you have 3000@50hz..

And everything should be working.

But, before that be sure that your spindle (i'm pretty sure but it's a good behaviour to check  this) have a rated speed of 3000rpm@50hz

Waiting for news..







Title: Re: A new Huanyang VFD plugin
Post by: shobley on November 14, 2012, 05:58:33 PM
Thanks for the speedy response.

Just sent an email to the person I bought from - there is no plate on the spindle itself and my manual is just for the VFD.

(Changing the Pulley #4 max speed, and enabling pulley control in the plugin did seem to get me beyond the 8000 RPM barrier in Mach3 - but not entirely sure if this is the correct thing to do).

One problem I just noticed is that the VFD stays in FORWARD direction mode while under remote control, which is unfortunate as my bits all need to turn in  REVERSE mode to cut. Is there an option for this via the plugin, or do I have my spindle wiring reversed?
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on November 14, 2012, 06:18:13 PM
Well it's a bug because it should be able to run reverse.

I must admit that on my side, as this feature was useless, i didn't test this. But I will do it ASAP.

I think that at the time your spindle is going faster than displayed value..

Well a bit of theory.

the plugin can only send frequency order to the VFD. For example , the plugin is going to tell the VFD to run at 76hz.
And how does the plugin get the frequency?....well it uses the famous PD144 parameter (depending on your motor)

if you tell the VFD that your motor run at 1440rpm@50hz, then the plugin is going to use this information to compute the order to send to the VFD...

well now in Mach3,you enter  8000 rpm.

The plugin computes the required frequncy: 8000/1440 * 50 = 278hz....so tells the VFD to run at 277,7hz...

the speed you see in Mach3 is the speed extracted from the VFD...but in reality, the VFD does the same as the plugin...it takes the frequency order and convert it to RPM thanks to the pd144 parameter. and something like 7997 is updated in mach3. (277,7*1440/50=7997...)

But do these values the reflect of reality? (most important thing!)

Well, now imagine that your spindle is in reality 3000rpm@50hz...we keep your current VFD configuration.

so when we want the spindle to run at 8000 rpm, well in reality it's running at 277,7*3000/50=16662! nearly twice!

That's why the pd144 parameter is very important in my plugin...

if you set Pd144 to 3000, we will notice that, for the same speed (8000) the spindle sounds to run lower...and i think this is the good parameter.

And finally, for the limitation, even if you do not check the pulley option, pulleys are always defined in mach3.

This kind of spindle can run from 3000rpm (50hz) to 24000rpm(400hz)...so you need to configure your mach3 pulley properly.

Hoping I have been clear.


















Title: Re: A new Huanyang VFD plugin
Post by: shobley on November 14, 2012, 07:23:56 PM
Yes I understand what you are saying (I think ;-))

My gut feeling is that communication is not happening both ways - the spindle values are being read initially, but during a run nothing is coming back from the spindle.

BTW- I tried sending M03 and M04 commands but the spindle just runs forwards.
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on November 15, 2012, 03:48:05 AM
I didn't know there was a Gcode to make the spindle run CW or CCW...(shame on me!)
So with this information, it's going to be easy to test. I think i'll be able to fix it during the week-end..

Title: Re: A new Huanyang VFD plugin
Post by: shobley on November 15, 2012, 08:19:21 AM
Thanks for looking into that.

I'm going to build a tachometer over the weekend and do some measurements of the spindle speed.
Title: Re: A new Huanyang VFD plugin
Post by: shobley on November 15, 2012, 12:22:39 PM
I just got the spec sheet on the spindle and the only thing mentioned is 24,000 RPM and 400Hz.

So... that would compute to be 3,000 RPM per 50Hz assuming that this thing works in a synchronous fashion.

I will update the PD144 parameter.

(Oh and my wiring is reversed - that's why I need to reverse the spindle to cut)
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on November 26, 2012, 07:51:08 AM

A new version of the plugin is now available.

It's simply fix the problem dealing with CW and CCW rotation (M03 and M04)

It can be download there.
http://royaumedeole.fr/wp-content/uploads/2012/10/vfdPluginv1.4.zip (http://royaumedeole.fr/wp-content/uploads/2012/10/vfdPluginv1.4.zip)

Simply have to replace the old one with this one...

Title: Re: A new Huanyang VFD plugin
Post by: shobley on November 26, 2012, 08:22:16 AM
Great, thanks - for now I've gone back to manual control but I'll be checking this out tonight.
Title: Re: A new Huanyang VFD plugin
Post by: gene8522 on December 22, 2012, 06:41:42 PM
I have my Huanyang VFD Spindle working as I would like it, I even have the cooling water pump starting with a relay. But here is the problem, the G-code file starts running before the spindle is up to RPMs I tried adding "G04 P5000"  to the file for a 5 second pause, but the pause is not long enough for the motor to spool up to speed.
So what am I missing?
P.S. Is there a way the get the motor to spool up quicker?

I just found an answer...............  "G04 P5000" should be "G04 P200000" for a 10 second pause.  :)
Title: Re: A new Huanyang VFD plugin
Post by: theminor on December 22, 2012, 07:26:27 PM
I have my Huanyang VFD Spindle working as I would like it, I even have the cooling water pump starting with a relay. But here is the problem, the G-code file starts running before the spindle is up to RPMs I tried adding "G04 P5000"  to the file for a 5 second pause, but the pause is not long enough for the motor to spool up to speed.
So what am I missing?
P.S. Is there a way the get the motor to spool up quicker?

I just found an answer...............  "G04 P5000" should be "G04 P200000" for a 10 second pause.  :)

No need for any of that. You just need to adjust the settings in Mach under Ports & Pins -> Spindle Setup to set how long Mach pauses to wait for the spindle to spin up and spin down.
Title: Re: A new Huanyang VFD plugin
Post by: gene8522 on December 22, 2012, 10:29:17 PM
Thanks Theminor for the reply I'll check it out and see if I can get it working. I'm getting closer to using the water cooled spindle.
Title: Re: A new Huanyang VFD plugin
Post by: gene8522 on December 23, 2012, 12:14:47 PM
I have my Huanyang VFD Spindle working as I would like it, I even have the cooling water pump starting with a relay. But here is the problem, the G-code file starts running before the spindle is up to RPMs I tried adding "G04 P5000"  to the file for a 5 second pause, but the pause is not long enough for the motor to spool up to speed.
So what am I missing?
P.S. Is there a way the get the motor to spool up quicker?

I just found an answer...............  "G04 P5000" should be "G04 P200000" for a 10 second pause.  :)

No need for any of that. You just need to adjust the settings in Mach under Ports & Pins -> Spindle Setup to set how long Mach pauses to wait for the spindle to spin up and spin down.


Thank for this post. It is just what I needed. ;D ;D ;D
Title: Re: A new Huanyang VFD plugin
Post by: rexdc on January 09, 2013, 01:21:06 AM
I just purchased one of these VFD's and have decided to try to use VFD plugin to control the VFD through Mach 3 on my CNC router setup.  I have a couple of questions regarding wiring connections.  Does the VFD commumicate with Mach 3 via the RS485 connection.  Is the RS485 connection the only one between the mach 3 computer and the VFD.
Title: Re: A new Huanyang VFD plugin
Post by: gene8522 on January 09, 2013, 08:03:31 AM
rexdc

Your answer is "yes" & "yes".
go to this link , Sebastien has some photos of the hook-up to the VFD.
http://royaumedeole.fr/informatique/plugin-mach3-pour-vfdhuanyang/
Title: Re: A new Huanyang VFD plugin
Post by: rexdc on January 31, 2013, 11:19:16 AM
Thanks For the answer, sorry I didn't acknowledge you before this but had family crisis that needed to be dealth with.  Also another question or two.  I have a DRO's on the mach3 screen that is labeled AMPS and SPEED what or how do you code that DRO to read AMPS from the VFD, and the Same question for the speed DRO.
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on February 01, 2013, 07:28:12 AM
Hi Rexdc,

if you want the plugin to fill your DRO, you must get the index of the DRO, (analyse your screenset). For exemple, if your AMPS dro is 1003, then go to the configuration screen of the plugin, select 'Current' in combo box then enter 1003 on the textArea below (check on my site to a better explaination). Do not forget to validate.

Then, the plugin will try to read currentValue from the VFD and displayit in your DRO.
Title: Re: A new Huanyang VFD plugin
Post by: rexdc on February 03, 2013, 05:55:09 PM
Thank you for your info.  As you probably and tell I am a newbie to VFD world and also kind of a newbie to Mach 3.  Recently I sent the sellers of the unit I bought ( 3KW motor and VFD) some questions regarding cooling and disconnecting from power when not in use.  On cooling the questions were what the flow rate was needed for the motor and could ethylene glycol be used in the coolant.  The answer i got for the flow rate was "enough to keep the motor from burning up" and on the ethylene glycol was on the first answer no it would melt the plastic in the motor then on the second answer yes you con use ethylene glycol.  On the subject of disconnecting, in their manual the state and I quote "do not use the electromagnetic contactor as the on/off button of power supply for the inverter" and in another place "no fuse  breaker" could be used.  The question I ask them was why a contactor could not be used to remove power from the VFD system WHEN NOT IN USE.  My scheme was to have a 10 amp 3 phase breaker in the panel and a 3 pole relay controlled by a toggle switch for disconnecting the power when not in use.  Could someone enlighten me as to what their thinking is!!!  By the way I am a retired electrician and have an assoc. EE and am lucky enough to have 3 phase power in my wood shop at home.  Not trying to be smart, I just can not see there concern.
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on February 05, 2013, 11:29:28 AM
I dont have my machine set up enough yet to test this, but could you answer the following:
I understand that hitting STOP on the VFD will create an e-stop condition in mach, but is the reverse true? If i hit e-stop in mach (either in the software, or with an external switch hooked to mach) will it create an e-stop event in the VFD and stop the motor (decelerate)?
Title: Re: A new Huanyang VFD plugin
Post by: rexdc on February 06, 2013, 08:44:35 PM
Maybe I was mis-understood about whlat I am concerned with.  That is removing power from the VFD system is not in use, not to control the spindle motor
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on February 06, 2013, 09:51:30 PM
I wasn't referring to your question, I was asking my own question about the plugin
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on February 07, 2013, 04:15:19 AM
Hello mikemaat,
off course!.
if you hit the e-stop on mach3, it stops the spindle.
Then depending on your VFD Configuration, it will decelerate it (through a ramp) or stop it immediatly..
It acts as you were hitting STOP on your VFD..
Hoping to have answered your question.








Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on February 07, 2013, 04:16:30 AM
Hello rexdc,

on my side, i do not work with such spindle. That's why I am unable to answer your question. I can only help you concerning the plugin.
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on February 14, 2013, 02:54:51 AM
I finally finished my wiring and tested out my e-stop question. Indeed, when I hit the estop button in mach, the vfd immediately starts to spin down. HOWEVER, if I try the same test with a physical e-stop button, the vfd remains unchanged (at full speed) even though mach registers the e-stop and does its green/red flashing routine. The strange part is, if I THEN hit the software reset button (which is already showing an e-stop condition - red/green flashing), the vfd will spin down.

How is the plugin listening for e-stop? Is it looking for the specific software button press or is it listening for an overall e-stop condition (either software or physical switch)? The way it behaves, I'm thinking the plugin only monitors the software button for a click event and ignores the e-stop port/pin input.

Any ideas?
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on February 14, 2013, 03:21:13 PM
Hello MikeMaat,

well the plugin is using the Mach3 notifying System. When Mach3 tells an estop occurs, the plugin stops the spindle.

So it's not the plugin which is listening to estop, but Mach3 which tells the plugin to stop...

What you say is that finally this notifying system is not the only way to check for an estop.

I'm going to fix that (by making the plugin reads the mach3 registers), but this is a weakness in Mach3 notifying mechanism.

I think that I will be able to fix this during the week-end. I will then update my web site with the new version.

Thank you very much for your feedback.





Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on February 14, 2013, 04:02:28 PM
Does the notification system register "External e-stop requested" the same way it does for an internal e-stop (software)? Dont know if this link helps any but here it is anyway. I wonder if "Matt" is mattyzee (http://groups.yahoo.com/group/mach1mach2cnc/message/117170)

Thanks so much, if you need me to test anything or take a video for you, let me know. Ill give it a test once you're done
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on February 14, 2013, 08:31:39 PM
I tried hitting the stop button on my VFD to see if it would trigger an e-stop. Instead of instantly flashing zero's and triggering an e-stop like yours does in the video, it first spun down (the numbers got smaller and smaller on the display), then triggered an e-stop once it reached zero. Think im missing something in my VFD settings?
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on February 15, 2013, 12:22:33 AM
I think it's due to PD026 which is set to 0 (try set to 1).
When you hit the vfd stop button, th vdf stop, but it does not send any kind of information to the plugin.

The plugin tries to detect the spinning default. That's why it detects it near 0 rpm.

By the way, I will have a look to this behaviour, trying to improve the detection.

The main difficulty is to keep the plugin lean so that it does not represent a heavy cpu load for mach3...That's is all the challenge!




Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on February 15, 2013, 02:48:19 AM
Yep, PD026 is what was causing the estop on the vfd to not work properly. It now works as in your video, but im guessing the plugin isnt actually picking up the e-stop event but rather its picking up the event of the flashing 0000 (or in other words, no RPM reported).

Although it works with PD026 set to coast, im guessing most people are going to want a controlled deceleration. However, I think this is a side issue and less important since most people will be hitting a real e-stop switch and not the tiny button on the VFD.

So yea... the issue that any external e-stop button doesn't trigger a slow down or an e-stop on the VFD is still the bigger issue for me. I haven't tried, but id bet that the problem will probably also occur when a limit switch is hit. Id say probably the only thing that puts the vfd into e-stop mode is the main software red/green flashing reset button.
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on February 15, 2013, 07:08:51 AM
do not worry Mikemaat, i'll fix all problems.


Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on February 16, 2013, 06:07:12 PM
Hi Mikemaat,

You'll find a new version (1.5) on my web site.
Simply replace the vfdPlugin.dll file in Plugins directory.


Fixes and improvements:

1)the problem of external Estop. I checked it with a simple wire connected to my board. I saw the emergency led flashing in diagnostic screen, and i checked that spindle stopped. (but hope you'll confirm it works)


2) Improved the vfd stop detection. Previously , i simply did a test 'like spindle speed equals 0'. Now, i detect that the speed is lowet than what we asked and i throw (raise) an Emergency stop. The main difficulty was to detect starting phase (real speed is lower than asked) from vfd stopping phase


3) On another forum, i was told that the offline mode was not working. Even in offline mode, the spindle start to turn...Now, if you start the spindle in offline mode, the driver simulate a running spindle. But if you swith to offline mode while working, it does nothing....maybe i whould stop the spindle?



A direct link to the new version
http://royaumedeole.fr/wp-content/uploads/2013/02/vfdPlugin1.5.zip




Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on February 17, 2013, 03:58:16 AM
Seems to be working! You are awesome!!!
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on February 17, 2013, 04:28:29 AM
Great!

happy to see that is working as it should!

Thank you for your feedback, specially those dealing with problems. It helps me making the plugin better.

Well, there might be other bugs, and , when you are able to reproduce them, do not hesitate to contact me





Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on February 17, 2013, 04:34:31 AM
I definetely will. My machine is still a couple weeks away from making chips, but when it does I'll report back either way. Thanks again so much for taking the time to develop this. If you are ever in Edmonton, Canada the beers will be on me :)
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on February 17, 2013, 12:33:39 PM
@Mikemaat,

pretty sure you have notice my english is not perfect...well i'm the worst english in the world...i'm a french guy ;-)
But, be sure that if i came to Edmonton, will contact you with great pleasure!


Concerning the plugin, i found some bugs this afternoon.

when was increasing speed and spindle was not running, an Estop was triggered (due to the vfd stop mecanism)

I have fixed it in this new version, with another fix concerning offline mode


http://royaumedeole.fr/wp-content/uploads/2013/02/vfdPlugin1.5.1.zip



Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on February 27, 2013, 03:35:23 AM
I dont know if this has anything to do with the plugin, but maybe you can help anyway. I was finally able to get the motor wired up and tested. Without the motor connector attached, the vfd functions as expected and spindle rpms follow that of mach, and both the vfd screen and mach screen rpm's are in sync. Same as before, works fine. However, when I plug the motor in and perform the test, the motor spins up as expected, but while the rpms in mach are climbing, mach freezes up and the rpm dro reads "65535" (I set the spindle to 2000 rpm). The spindle spins up like it should, and the vfd reports 2000 rpm, but mach freezes up and becomes unresponsive and reports that incorrect rpm. Again,
Without the motor plugged in, it responds correctly. Does this sound like noise from the spindle is freezing mach? Should I install ferrite cores on the twisted pair line I have leading from the vfd to the USB/rs232 adapter? Or elsewhere? Any ideas/tips?
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on February 27, 2013, 06:29:32 AM
Hello mikemaat,

i think about noise..
On my web site, get some comment from an user:


The plugin works perfectly.
Mach3 was blocked sometimes, but was solved with shielded cable to the motor, shielded cable from USB-RS485 to the VFD and an EMI filter on the power input of the VFD.
Thanks.

Hoping it will help you to solve this problem.

Title: Re: A new Huanyang VFD plugin
Post by: rexdc on March 15, 2013, 12:35:48 AM
Thanks for your info.  After a rather long effort I have managed to get the spindle motor mounted all wired up nice and petty. Install your dll file and connected the computer the Huanyang VFD, and managed to get the VFD programmed.  After a bit of tweaking mach 3 would control the VFD the way I wanted it too.  As i stated in my other posts I am new to the world of mach 3.  Using a mach screen editor I believe MachScreen I make some modification the the spindle window and added a DRO for AMPS and I think I labeled it OEM 1003.  I get nothing to read in the DRO, also spindle speed is not shown in the spped DRO, but when you change the spped of the spindle there will briefly be some numbers come up is the speed DRO  The other mods I made were basiclly to change the size and shape of the DRO in the window to clean up its look.  Is there a good tutorial out there on building and modifing screen.  I know my problem is my own making, but I need some help!
Title: Re: A new Huanyang VFD plugin
Post by: Chaoticone on March 15, 2013, 08:45:24 AM
http://www.machsupport.com/videos.php

http://www.kd-dietz.com/klausphp/pages/eng/machscreen/description/ms_description.html

http://www.machsupport.com/forum/index.php/board,17.0.html

Those links will help.

Brett
Title: Re: A new Huanyang VFD plugin
Post by: rexdc on March 20, 2013, 11:38:03 PM
I have been testing My CNC wood router system that I put a 3.0 KW chinese spindle and a "matching" huanyang VFD.  My setup is using Mache ver 3.043.022. I'm haviing a problem with random E-stops.  I plan on doing a few more tests to try to determine if the problem is coming VIA RS-485 or from the VFD itself, if the problem is noise induced in the RS-485 link.  I'm using a modified 1024.set screen and not as yet get the AMPS to read in my DRO, that i'm sure is something I am missing in the setup of the DRO or something, but also it does not display spindle speed.  It will show some activity in the spindle speed DRO if you change the speed either up or down. of the VFD while it is running then return to zero when the speed stablizies.  If anyone has some suggestions on what to look for I would be grateful
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on March 21, 2013, 12:06:39 AM
Is your cable from vfd to spindle shielded? That was my problem. Changed to a hardcore braided shield + foil shield+ drain wire cable and the problem went away. My problem was mach freezing completely from noise from that cable entering the rs 485. Yours is probably from vfd noise entering the limits.

Something to try is unplug the rs485 USB cable and run the vfd manually for awhile to see if you still get those noise issues. To run manually, change pd002 and pd003 to setting 0 from 2
Title: Re: A new Huanyang VFD plugin
Post by: rexdc on March 21, 2013, 01:23:43 AM
Thanks Mikemaat  I was thinking that might be my problem. the cable from the spindle to the motor is not sheilded.  I am going to do the check you suggested.  Couple of questions.  How long is your RS-485 cable and is it also sheilded,  if so did you connect the sheild to both the computer and the VFD?  Did you use any ferrite cores on the RS-485 cable or the spindle power cable.  How long is your VFD to spindle cable?  do you know the mfg. and number of the cable you used for your spindle power.  It sound like the same problem I'm having, I get E-stops and mach3 will freeze at random.  I REALLY apprecate your help and input.
Title: Re: A new Huanyang VFD plugin
Post by: rexdc on March 21, 2013, 01:26:52 AM
I might add the I am using ver 1.4 plugin I see that there is an new release ver 1.5.1
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on March 21, 2013, 02:13:16 AM
RS-485 is about 3 feet long. It's actually longer but I've got the last bit of it tied up. It is shielded, but I only grounded one end. The VFF cable is about 15 feet long. It is Belden 29501 VFD cable. I bought it by the foot on eBay. The cable is really hardcore, but super stiff. I put a ferrite on the RS-485 cable but it didn't seem to help.

The VFD cable made a night and day difference. Everything else seed to have no discernible benefit.
Title: Re: A new Huanyang VFD plugin
Post by: rexdc on March 21, 2013, 02:17:25 AM
Did Ver 1.5.1 improve your operation over ver 1.4? 
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on March 21, 2013, 02:46:25 AM
I think I only had it running on 1.5 AFAIK. I would bet 99% that its your unshielded wire. The VFD puts off a nasty amount of noise. I would start there (and you'll probably end there too). The cable isn't cheap, but it's worth it - having your machine screw up parts isn't cheap either.
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on March 21, 2013, 02:56:55 PM
Hello guys!

@rexdc
if you're using the 1.5 version, you may be facing some random EStop.
on my side, the release version is 1.5.1, which is te only one available on my web site.
If once shiellded, you still have problems, do not hesitate to contact me..it may be a bug (i'm not perferct!)




@MikeMaat
happy to see that noise was the problem ;-)

Title: Re: A new Huanyang VFD plugin
Post by: rexdc on March 21, 2013, 03:03:05 PM
yep you are right, my cable is not sheilded, but will be by this evening.  Also going to re-route the cable and short to get it away from other (RS-485) cables and the computer.
Title: Re: A new Huanyang VFD plugin
Post by: rexdc on March 22, 2013, 11:56:46 PM
Gentlemen, after changing and shortening the motor cable and doing some re-routing it, it appears that the E-stop problems have ceased.  However, I have now another problem,  it seems that if the motor is running and and the RS-485 connected the Z-axis will randomly freeze for a few steps. It won't freeze if the motor is not running and the rs-485 pluged in by removing M03 from the G-code, or if RS-485 cable is unplug and the motor running manually.  Incidentally, I don't know if this is a bug or not but if the VFDplugin.dll is loaded in Mach3 and the RS-485 cable is unplugged the program will E-stop if it encounters an M03 cammand in the G-code, even if you have the plugin disabled.  I had to delete the VFDplugin.dll before it would run code with M03 enbedded.  I checked the motor cable for noise with a scope, it seemed to be pretty quiet, however that was a lot of noise on, most of it looked like common mode noise, the worst kind to get rid of.  Being some more test tomorrow to attack the noise on the RS-485.  Just wondering, has anyone used a opto-issolated RS-485 interface, if so did it help?
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on March 24, 2013, 04:53:19 AM
Hello rexdc,

I think there is a bug in the plugin if disabled. I'm going to check this.

Morevover, there is a 'simple' way to check if noise is problem:  Unplug the spindle from the VFD. Noise is generated by the Spindle.
On this way, you can check if everything is working .

If not, this is a bug and i'll fix it.
Title: Re: A new Huanyang VFD plugin
Post by: rexdc on March 24, 2013, 09:06:51 PM
Hi Royaumedeole

It seems that I don't proof read very well.  In my last post I was thinking faster than I type!  I believe that I was trying to say that if the VFDplugin.dll was loaded mach 3 would E-stop when encountering M03 in th G-code if it wasn't able to communicate with the VFD, even when the VFDplugin.dll was disabled. I had to completely remove the VFDplugin.dll before mach 3 would execute the G-code with M03 embedded when the VFD was disconnected.  In reference to the cables,  the way I wrote the post would lead one to believe that the common-mode noise was on the motor cable,  actually the motor cable is fairlly quiet.  In the middle of the sentence my thought had changed to the control (RS-485) cable, that was where I was finding the common-mode noise.  I have since done more checks, and believe that the Z-axis problem may be do to noise generated by the VFD somehow getting into the computer running Mach 3  because it also will lock up the keyboard.  I have some thoughts on how that is happening, but haven't had the time to pursue.  Hope to get at it tomorrow.  By the way I want to thank you for your effort in all the work you have done, I really like how this plugin works,  incidentally it is now displaying AMPS in my DRO, haven't got the speed to display yet, but again this may be on me.  Mikemaat, if you are reading this, thanks for your help also.  Lastly, has anyone used a opto-issolated RS-485 interface,  did it help.  I have one ordered so we will soon know.
Title: Re: A new Huanyang VFD plugin
Post by: rexdc on March 25, 2013, 06:02:25 PM
Gentleman

An update on the tests I ran today.  I am convinced the problem lays in the fact that my computer doesn't like to run the VFD through a USB to RS-485 converter.  I tried all four baud rates and different carrier frequencies in the VFD.  I use a least 3 different cables for the communications.  Anytime I was controlling the VFD form the Mach 3 program the Z-axis would freeze for a few steps at random, not good!  I have setup a kind of work around that seems to work, not what I want but for now it will have to do.  The work around basically is using the VFD in a semi-manual oreration.  There is a output from the Gecko Drive that provides AC for running a vacuum system and follows the M03  commands from the G-gode.  I connected a relay to that output that closes a set of contacts on M03 comand.  The set of contacts are connected to the VFD at For. (D1) and DCM.  I programmed PD001 for external control and PD044 to 01 (for RUN function) and PD002 to 0.  This allows the computer to start and stop the spindle and setting the speed manually.  When I get the opto-issolated interface for the serial port on the computer I will update it's function.  I'm hoping that by completely issolating the commuications line from the computer and using a real serial port will get me where I would like to be.
Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on April 10, 2013, 02:08:25 PM
Lack of proper grounding can cause many spurious problems such as you see, did you also confirm the spindle ground pin is actually grounded internally?
There have been some who have discovered that when the spindle was dismantled, the ground pin was  not actually in contact with  case ground.
Nosmo. 
Title: Re: A new Huanyang VFD plugin
Post by: cjmerlin on April 12, 2013, 02:14:08 PM
Hi Royaumedeole, I have just fitted a newly purchase Huanyang vfd with a new spindle motor and a big thank you for making the Mach3 plugin to control these vfd's.

I have the vfd communicating with Mach3, If I command an M03 the motor starts spinning and requesting various S words changes the speed of the motor of which is displayed in the speed DRO.

However there is no response to an M05 commmand, I have to click the e-stop to stop the motor. If I command an M03 or M04 the spindle of the motor only runs clockwise.

Is there a setting I have missed somewhere?

Plugin was downloaded today and is ver 1.5.1
Title: Re: A new Huanyang VFD plugin
Post by: cjmerlin on April 13, 2013, 12:28:20 PM
Hi Everyone, I have found the solution to my problem and so post it here just in case someone else has similar.

When I first got interested in a plugin for the Huanyang vfd I first downloaded the other plugin written by Matty Zee. His plugin manual instructs to "Firstly, open Mach3 ‘Ports & Pins’ config dialog. On the ‘Spindle Setup’ ensure the ‘Disable Spindle Relays’ checkbox is unchecked. This is required to enable the plugin to control the spindle."

When realising that his plugin would not work for my setup I then used this new plugin but didn't realise that I needed to have the ‘Disable Spindle Relays’ checkbox, checked.

Once I had checked the box the spindle motor now works as expected with m03 and m04 doing the foward and reverse and m05 stopping the motor.

Hope this helps.
Title: Re: A new Huanyang VFD plugin
Post by: TropicalGuru on May 22, 2013, 08:52:36 AM
Hi all,

Apologies in advance if this is an easy fix, but I'm having issues getting the plugin configured. Running Mach 3, Gecko G540 driver board, Huanyang 1.5kw water cooled spindle and VFD. Loaded the plugin no problem, and the driver Seb linked to on his site for the RS-485 USB adapter. COnfigured the plugin as per the instructions, and finally getting the "Configuration OK; SPindle speed 3000RPM at 50hz" message. All the parameters set in the VFD as per Sebs instructions. (The spindle ran fine when in manual mode and not connected to Mach 3).

What I'm getting when I try and run the spindle from the Mach 3 interface is the stats message "PWM bumped to minimum setting".

Pretty sure it's a configuration issue, anyone got any ideas?

Thanks in advance
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on May 22, 2013, 01:49:17 PM
Ive been using the plugin for a bit now and its working pretty well. I think I have my noise issues fixed.

One issue i'm running into is an occasional e-stop. Im on the newest version. Mach3 reports it as "e-stop button pressed". Ive been watching my rpm DRO and it appears that once in awhile it will drop rpm's for a quick second. The motor runs properly, but the DRO itself will drop out every now and then. I think what is happening with the e-stop is that the plugin thinks that the RPM is dropping and reports an e-stop. Is there any way for you to lengthen the period of rpm dropping before reporting an e-stop. Or even, can you provide a switch to remove that feature all together? Im assuming its there so that your program will stop running if you happen to lose connection to the motor for whatever reason, but id rather it wasn't there at all - or atleast make it take a few seconds of rpm dropping before it reports the e-stop.
Title: Re: A new Huanyang VFD plugin
Post by: Chaoticone on May 22, 2013, 02:37:27 PM
TropicalGuru, have you set up your spindle pulley?

Brett
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on May 22, 2013, 03:16:48 PM
Hi all,

It's been a while since my last visit..

@TropicalGuru
I think there is the pwm checkbox checked in your configuration.. ensure it is unchecked and let me know the results.


@MikeMaat
The fact that the spindle slow down without order is considered as faulty. But you're idea is good, i will add a come configuration possibility  to this feature:
-1 : The deature is disabled (no E-stop will be triggered)
 0 :  (default value) the E-stop is thrown asap a faulty speed is detected
 n : The E-Stop will be thrown after n seconds.

Do you think it will be a good answer to your problem?

If yes, will try to do it this week-end





Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on May 22, 2013, 03:28:57 PM
The spindle itself doesn't actually slow down, the dro just flashes a lower rpm for a split second. I think if you made it check for an incorrect speed for 2 seconds before throwing the code it would work fine, and would keep your user interface for the plugin clean without the extra settings.
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on May 22, 2013, 03:32:19 PM
Also, I don't know if its possible, but maybe display an error dialog box with the reason for e-stopping when your plugin sends an e-stop. Would help with diagnosing why e-stops are happening (noise vs. an actual issue)
Title: Re: A new Huanyang VFD plugin
Post by: TropicalGuru on May 22, 2013, 09:30:45 PM
Chaoticone,

Think so, see the attached PulleySetup pic.

royaumedeole,

Unchecked the PWM checkbox (SpindleSetup), but no change, still throwing "PWM Buped to minimum setting" (SpndleStatus). I've attached the motor outputs screen as well; not sure if the motor output for spindle needs to be enabled?

Thanks very much for the quick responses, last hurdle to be cleared before I can start cutting.
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on June 06, 2013, 05:34:42 PM
@royaumedeole Did you get a chance to try to program this?
Title: Re: A new Huanyang VFD plugin
Post by: Breastfed on June 20, 2013, 12:07:22 PM
Hi,
I keep getting the "Driver Watchdog Triggered" showing up in the status bar, from the MDI sometimes the spindle will run for a few minutes and other times not at all, I then have to restart Mach3 but its still the same issue all over again.

as suggested by cjmerlin #78... "When realising that his plugin would not work for my setup I then used this new plugin but didn't realise that I needed to have the ‘Disable Spindle Relays’ checkbox, checked".

Having first used the Matty Zee plugin I was hopeful that this was the problem but there no change either ticked or unticked.

any thoughts

Breastfed
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on July 02, 2013, 12:22:16 PM
Well, I attributed my issues to noise and i bought an opto-isolated adapter. Unfortunately, it doesnt have "ADDC" meaning it doesn't take care of RTS (message direction) like my other adapter does, so it doesnt work.

Is there any way for you to program the plugin to always be in "receive mode" (RTS always off) unless the plugin is sending a message, in which case it would briefly be turned on? I think that would solve the issue that alot of people were having in Matty Zee's thread with some adapters not working.

Reference:
http://www.moxa.com/resource_file/857220091121341.pdf
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on July 03, 2013, 10:55:50 AM
Forget my last post. After months of trying different things I finally seem to have it working flawlessly.

For anyone reading through all these posts, The problems I encountered were:

1) Couldn't communicate with the VFD.

The solution to this was making sure I bought a USB - RS485 converter that: Was based on the FTDI chip, and had "ADDC" or "Automatic Handshake Mode". This basically means the adapter takes care of whether it is sending or receiving data automatically - you dont have to tell it to, since neither of these plugins takes care of that.

2) Noise issues that would cause Mach to either E-Stop or Freeze.

This was the big one that I battled with for months. Basically, I could start the spindle no problem and it wouldnt run for an indeterminate amount of time, but would randomly crash during a job. Watching the reported RPM DRO, the rpms would fluctuate up and down and sometimes even report completely strange numbers like "675834". The e-stops would happen because when the reported RPM dropped down near zero for an amount of time, the plugin is programmed to e-stop (which is normal, and meant to protect against a stall). However, since I was having noise, my "reported" rpm would sometimes go down near zero, even though it truly wasnt changing in reality, and thus the plugin would e-stop.

The solution to this one will be different for everyone. My VFD is in my control cabinet so my noise issues will probably be among the worst, but i was stubborn to keep everything in one box and not change it. I first started by using a firewire cable as my communication line between the usb-rs485 converter and the VFD. Firewire cables are great because they have TONS of shielding in them. I also made sure to ground one end of the inner shielding to my RS485 adapter. Only ground one end - this will make a "Farraday Cage" and help to block out EMI. This helped, but it really seemed like the noise was coming THROUGH the cable (The VFD worked absolutely fine in manual mode and the computer experienced no noise).

Finally, after months of trying things, I started tracing grounds. Im a big grounding cynic as I have rarely found huge differences from different grounding procedures. I grounded the things I should have, but Ive always been quite cynical while doing it. Well..... My VFD (and im sure yours as well) has two places on it with grounding symbols. One on the terminal blocks by the 220 input terminals, and one in the lower left of the VFD. I had the ground from my power supply going to the grounding screw on the bottom left. I had the ground from the motor cable (which was also attached to the motor's ground and the motor's housing) going to the terminal block ground. I made the assumption, for months, that both the grounds would be connected in some fashion, I was wrong. I took a multimeter and checked for continuity between the two ground posts - nothing. So I temporarily jumped the two with a strand of wire and my noise issues basically disappeared.



So, in summary, dont be stubborn like me. Make sure everything is grounded properly. Trace all your grounds with a multimeter to make sure they are all connected. The following grounds should exist:

(Power source implies your 220 breaker panel or similiar within your control panel)

- Spindle motor wiring should have a ground attached to the motor housing
- Spindle motor feed wiring from the VFD should be attached to the motor's ground wire (and thus the motor housing)
- VFD should have a ground coming to it from the power source.
- Spindle motor feed wiring should be grounded on the VFD side to both the VFD and the power source. It may not be best practice, but you can share the same ground terminal
- PC should have its power supply ground attached to the power source ground.
- Motor drive power supply should have its ground attached to the power source ground
- USB-RS485 communication cable should have ONE end of its shield attached to the power source ground (the computer's ground located within the RS485 adapter's breakout terminals)

Also, its a great idea to throw snap on ferrite cores on all your power source and communication cables (limits, usb, etc.) See here for details on ferrite cores (http://en.wikipedia.org/wiki/Ferrite_core). They can be bought in bulk on ebay for very very cheap.
Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on July 03, 2013, 11:26:01 AM
SEB. I am having similar problems to other posters here, namely M5 not working and DRO does not display, a message appears that mentions DRO set when the plug-in is configured for DRO 39.
F5 works as well as M3 M4. Spindle turns at set RPM.
Reset stops spindle OK.
'Disable Spindle relays' checked.
Mach Demo ver R3.043.022 
Any ideas to try?
Nosmo.
Title: Re: A new Huanyang VFD plugin
Post by: turbothis on July 11, 2013, 02:05:36 AM
i got my lathe all hooked up and need to tune a couple things it seems.

like check the disable spindle relays button
I have the vfd rpm set at 3450 which is the motor at 60Hz. I don't know what to put for 50Hz?
the "configuration ok" screen comes up with something like 147 rpm?
so is this rs485 still analog or something else?
my index pulse sensor died so I am getting another now. I assume this is still critical for the threading feature?


my build parts
http://www.machsupport.com/forum/index.php/topic,25005.0.html
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on July 11, 2013, 02:11:53 AM
The vfd always reads what your motor would output at 50hz. Since you are 3450 at 60 Hz, set your vfd to 2875 rpm (the speed your motor will run at, at 50 Hz)
Title: Re: A new Huanyang VFD plugin
Post by: turbothis on July 11, 2013, 01:24:02 PM
great thanks
mach just sits there and keeps hitting the E stop button?
the "configuration ok" screen still says 144rpm a@50Hz?? this should read 2875 right?
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on July 11, 2013, 01:38:59 PM
Yes it should. Make sure you change your setting in the VFD itself.

PD001 should be 2 (Sets your computer as the source of run commands)
PD002 should be 2 (Sets your computer as the source of frequency)
PD003 should be 60 (Sets your main frequency to 60hz)
PD004 should be 60 (Sets your initial starting frequency to 60hz)
PD141 should be your motor's voltage (on your motor's nameplate - prob 220 or 240)
PD142 should be your motor's current (on your motor's nameplate - probably around 6 amps or so)
PD143 should be number of poles for your motor (Yours should be 2 pole - based on your RPM at 60hz)
PD144 should be your motor's RPM at 50hz (For you, it's 2875)


Also, later once you have it working, if you set PD015,PD017,PD019, and PD021 to "0.1" and PD118 to 1 you'll get a mighty nice slow down speed when you tell the VFD to stop :)
Title: Re: A new Huanyang VFD plugin
Post by: turbothis on July 11, 2013, 01:54:57 PM
Yes it should. Make sure you change your setting in the VFD itself.

PD001 should be 2 (Sets your computer as the source of run commands)  was
PD002 should be 2 (Sets your computer as the source of frequency)  was
PD003 should be 60 (Sets your main frequency to 60hz)  was @ 0
PD004 should be 60 (Sets your initial starting frequency to 60hz)  was
PD141 should be your motor's voltage (on your motor's nameplate - prob 220 or 240)  was
PD142 should be your motor's current (on your motor's nameplate - probably around 6 amps or so)   was @11.0
PD143 should be number of poles for your motor (Yours should be 2 pole - based on your RPM at 60hz)  was @ 4   nothing on the motor
PD144 should be your motor's RPM at 50hz (For you, it's 2875)  was


Also, later once you have it working, if you set PD015,PD017,PD019, and PD021 to "0.1" and PD118 to 1 you'll get a mighty nice slow down speed when you tell the VFD to stop :)


thanks for the tips. it ran good witht hese old settings for  long time though?
maybe i am misssing something big in my xml?
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on July 11, 2013, 01:59:27 PM
Rs-485 requires some settings to be different than running it manually or through analog connections
Title: Re: A new Huanyang VFD plugin
Post by: turbothis on July 11, 2013, 02:00:53 PM
i still get 144rpm?
lol

vfd is only missing 2 parts.....
Title: Re: A new Huanyang VFD plugin
Post by: turbothis on July 13, 2013, 09:26:43 PM
so if the plug comes back and says  "configuration ok", what does that cross off the list as far as this not working?

vfd seems to be good.
plugin seems happy
what mach settings should I be playing with?
thanks
Title: Re: A new Huanyang VFD plugin
Post by: tgdavies on August 10, 2013, 07:46:27 AM
This plugin is working well for me, but I have one issue: I have Mach3 set to "Stop Spindle and Wait for Cycle Start" on a toolchange. While Mach3 waits, the spindle doesn't stop, even though the buttons in the "Spindle Speed" section of the Program Run screen do control the spindle correctly. On the Config, Ports & Pins, Spindle Setup tab I have "Disable Spindle Relays" checked, and "Use Spindle Motor Output" unchecked.

Is there some other configuration I need to do?

Thanks,
  Tom
Title: Re: A new Huanyang VFD plugin
Post by: cdf on August 20, 2013, 07:56:54 PM
I just set this up tonight and I have managed to get it working. I am NOT computer savvy. The vfd responds to mach3. The vfd shows the rpm but mach3 doesn't show the rpm in the spindle speed box. What might I be doing wrong?
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on August 22, 2013, 07:45:03 PM
Hi all,

I have just build the 1.6 version.

I disabled the Estop speed mechanism because too much people were suffering from noise problem.

I Fiixed some problems concerning data polling (some freezes could append if noise and polling extra variables)

Now the plugins read the rated frequency (pd004) and rated speed (pd144).
So Americans friends, you do not have to enter wrong values in pd144 (for exemple 3000*50hz/60hz=2500) in goal of having good rpm.
Now just put 60 in pd004 and 3000 in pd144 and the plugin will handle that without problem

Available here:

http://royaumedeole.fr/informatique/plugin-mach3-pour-vfdhuanyang/mach3-plugin-for-huanyang-vfd/

Enjoy!





Title: Re: A new Huanyang VFD plugin
Post by: tgdavies on September 04, 2013, 07:05:45 AM
Is the source for this plugin available?
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on September 12, 2013, 06:24:20 PM
@tgdavies

the source is actually not available. When i started the project, I wanted to go fast, and so i use some special personal frameworks (concerning memory handling for example) i do not want to share.

But, i'll take the time to build and Emc2 version and soon a Mach4 version.
At this time, the mach3 version may become openSource.





Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on September 12, 2013, 06:25:19 PM
Build a new version 1.6.1

I added an EditBox in the configuration so that people using chineese spindle won't be annoyed...they will just enter 50 in this nex Edit box
Title: Re: A new Huanyang VFD plugin
Post by: garyhlucas on September 12, 2013, 08:15:27 PM
Many VFDs can show true power in KW also. Current is a really poor indicator of spindle load. So if you can get it to display power that would be very good for optimizing and operation and also testing tools, and determining if a tool is getting dull. Power is very linear, current is not at all.  So a power reading will easily show you a tool getting dull, the difference between different types of cutters etc.
Title: Re: A new Huanyang VFD plugin
Post by: tgdavies on September 16, 2013, 02:31:49 AM
I find that I cannot stop the spindle using gcode entered directly in Mach3, or in the file Mach3 is running.

I can type M3 Snnnn into Mach3 and start the spindle and change its speed, but M5 does nothing.

Any ideas?

Thanks,
  Tom
Title: Re: A new Huanyang VFD plugin
Post by: jalvim on October 02, 2013, 10:21:03 AM
Hi!

First of all thanks for the pugin! It seems great but I'm still experience problems with it! Really need some opinions!

My situation is everything seems to be working fine, the plugin recognises the VFD (3000rpm @ 50Hz), if I start the spindle in mach3 with the spindle disconected everything works fine (display on the VFD is the same as in mach3). The problem is when I connect the spindle to the VFD, I can run it at very low speeds (700rpm works fine and the spindle is in fact working) but any speed above that (be it 800 or 8000rpm or whatever) I get a reset on mach 3 and a "dl" error on the VFD.

At first I imagined this was from noise as there are some reports here that talk a lot about similar problems, but now I have shielded cable from the rs485 to VFD and from VFD to Spindle, no difference whatsoever...

Any ideas?

(by the way, something that I think is not common is that my VFD displays in rotations per second, not rpm, but it seems to make the correction ok (600rpm in mach3 is displayed as 10rps in the VFD)

Jorge
Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on October 02, 2013, 12:26:55 PM
I find that I cannot stop the spindle using gcode entered directly in Mach3, or in the file Mach3 is running.

I can type M3 Snnnn into Mach3 and start the spindle and change its speed, but M5 does nothing.

Any ideas?

Thanks,
  Tom

I am still experiencing this, did you resolve it?
N.
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on October 02, 2013, 04:25:34 PM
@NoSmoking or @tgdavies, are you using the last plugin version with last Mach3 version?
I yes , i will investigate it this week-end, but i do not remember facing such problem..


Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on October 03, 2013, 03:04:15 PM
I am using Ver 3.043.022 I see there is a Ver 3.043.066 is it necessary to update for the Plugin?
Nosmo
Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on October 07, 2013, 11:28:33 AM
@NoSmoking or @tgdavies, are you using the last plugin version with last Mach3 version?
I yes , i will investigate it this week-end, but i do not remember facing such problem..

Further test on M5 shows that the spindle stop command issued when Mach is loading is received and works (shuts the spindle off), but M5 via MDI or in a program does nothing.
Nosmo.
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on October 14, 2013, 01:22:27 PM
I remember a guy having problem because he was running the bad visual C++ runtime..(pay attention, i do not say this is the problem)
Did you use the version available on my web page?

Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on October 16, 2013, 03:51:11 PM
I remember a guy having problem because he was running the bad visual C++ runtime..(pay attention, i do not say this is the problem)
Did you use the version available on my web page?

Yes i did.
Nosmo
Title: Re: A new Huanyang VFD plugin
Post by: tgdavies on October 19, 2013, 03:10:44 AM
I'm using 1.5.1 of the vfd plugin, as the later ones (both 1.6.0 and 1.6.1) don't work for me -- they communicate with the VFD but it never actually starts.

Another odd thing is that my VFD runs in reverse -- the reverse light comes on, and I had to swap two wires to make it go CW when running in reverse.

I'm running Mach V062 -- that's recommended as the most stable version to run with an Ethernet Smoothstepper.

Tom
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on October 19, 2013, 03:47:28 AM
strange troubles....

well, let's try to solve your issue.


@Nosmo&Tgdavies, could you give me a screencast or the detailled path you're following (which screenset and every button, touch) so that i can reproduce the default on my side. There is also the Pd181 parameter which interests me (software version)...could you give me the value oh this field.


@tgdavies: well the 1.6.0 was buggy and did not work as expected.But i do not understand why the 1.6.1 does not work. It is the 1.5 version where I unplugged some Estop features..

Seb

Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on October 20, 2013, 12:07:17 PM
I have a RS232 monitor program to enable logging all data sent and recieved from Mach to VFD.
The following has been found so far.
The Par 181 reads 4500(h) = 17664(d).
The apparent reason for the fact the motor operates in reverse is Mach sends a 12 command when M03 is sent, instead of 02.
This could be the same reason for the other poster that experiences this?
The Mach screen is the one that comes by default with MachMill and the appropriate setting for the plugin.
In MDI none of the M03, M04, M05 work.
When a simple program is ran e.g.
S400
M03
G01 X.55
S500
Z.25
M04
M05
M30.

The program runs except M03 runs the VFD in reverse, the program then continues OK but hangs on M04 and M04 is not sent, if M04 is removed the program 'Hangs' on M05.
If a reset is operated to stop the spindle a 18 command is issued and the spindle winds down and the RPM request (Read Status 04) continues untill the RPM  reaches 0000
It was also noted that the plug in issued a 10  command at times which I could not find any data and does not appear to be a valid VFD command?
Other Function commands appear to work OK such as Read Data, Write Data, Write Freq, Read Status.
 Also in spite of the RPM being polled it does not display in the DRO when the DRO is selected by the plug in box to display this function.
If commands are sent direct to the VFD via the RS232 program, they all appear to function OK.
Nosmo
 .
Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on October 20, 2013, 01:20:24 PM
In addition:
On Mach Boot up the VFD receives the Stop command  OK,     01,03,08 F18E.
Nosmo
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on October 26, 2013, 04:06:47 AM
I REALLY REALLLY love the plugin, but here are the issues im currently having:

First, I cant figure out if this is from the plugin or not, but often when i start the spindle (either in gcode or by clicking the button), it will dwell as if its spinning up but doing nothing, then eventually E-Stop because it sees no RPM (on the old plugin version). However, if i hit the e-stop and start the spindle a second time, it starts without fail.......every time.

Next, If I have a program such as:

S6000 M03
G1 X0
S4000
G1 X5

It will cut RPM's to 0 and e-stop at S4000 - rather than lower the spindle speed like it should.

Now, onto the new plugin. First of all, nice job on the fix for the 60hz RPM issue. MUCH nicer than having to do math to get it to a 50hz equivalent. Back to my problem...
In the NEW plugin:

Same issue with starting the spindle, sometimes it doesn't start on the first try. However, now with the rpm check e-stop removed it just continues on with the gcode...WITH THE SPINDLE NOT SPINNING!! Also, if I run the same program as above, when it hits the second spindle rate (S4000) it cuts RPM's to 0 as before, but doesnt e-stop now, it just continues trying to run without the spindle even moving. As you can imagine, if i didn't catch this, id have a few nasty crashes. Ive had to revert back to the older version plugin (1.5) because at least the e-stop's catch it when the spindle doesn't fire back up. I don't understand why speed changes kill the spindle and sometimes first starts don't happen...

If you can figure this out, Ive got a 20$ paypal for you to buy some beer.
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on October 26, 2013, 05:04:04 AM
Hello all,


I plan to try to fix-it next week-end. (Once the problem reproduced on my side, it will be fixed in a couple of hours...the main difficulty is to be able to reproduce the problem on my side. so your test-cases are jewels..thank you!

this week, I will setup a special debugging environnement to track those remaining bugs

Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on October 27, 2013, 04:48:48 AM
Here is some more info..

I think the main problem, is that when the plugin sees a change in RPM (set by the S1000 command or whatever) it throws an e-stop because you have it programmed to monitor if the rpm drops below what it was set at (Im assuming for safety reasons). I dont think the answer is just to remove that monitoring, as it can be a good thing like when you try to start the spindle, if it doesn't end up starting you get an e-stop rather than just having the program continue.

So basically, the plugin needs to realize that the gcode has changed the RPM and not trigger an e-stop. Now this only happens when spinning DOWN to a lower speed. There is no issues when you are increasing the speed (say S1000 to S3000).

Ive attached some videos to illustrate the problem. Also, the tests were done on the older plugin. I noticed the new version disables the e-stop monitoring all together. For those of us that have our noise issues sorted out, you may want to have the ability to enable or disable the e-stop monitoring within the plugin. Probably enable it by default. Lastly, do you have Skype? It'd make working through these bugs alot easier and quicker.

So here is spinning up from 1000 to 3000. Works perfect..
http://www.youtube.com/watch?v=8Zt6bW547uw

And here is spinning down from 3000 to 1000. You will see the e-stop occur. Disregard the "M3" in the second spindle speed line. I have tried it with and without the M3, same results.
http://www.youtube.com/watch?v=h8Gr_EvBp5g
Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on November 09, 2013, 03:28:56 PM
I notice that you in the program you do not have M5 or M30 etc.
In the first video what stopped the spindle and program?
N.
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on November 09, 2013, 03:33:24 PM
Settings in Mach stop it, it's not an issue. I'm in talks with the plugin creator right now and I think he's got most of the issues figured out. Stay tuned for a response from him at some point
Title: Re: A new Huanyang VFD plugin
Post by: royaumedeole on November 09, 2013, 04:13:30 PM
@Nosmoking,

do not worry, I'm working on problems. Once the new plugin debugged( thanks to MikeMaat), we will tackle your problem.
But i must admit that at the time, i do not have any kind of idea why M03,M04,M05 commands do not work on your side....In Config>Ports and pins>spindle setup, "Use spindle relays" checkbox and "Use spindle Motor output" must be unchecked...that's just a point to check...


@Mikemaat
I'm working on the frequency issue which is the one explaining others..
Will contact you before the end of this long week-end (remembrance day)

seb
Title: Re: A new Huanyang VFD plugin
Post by: gene8522 on November 09, 2013, 05:18:36 PM
I do not have a problem with  M03,M04,M05 commands but "S" will not change the DRO & RPM of the spindle.
Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on November 10, 2013, 12:22:56 AM
Settings in Mach stop it, it's not an issue. I'm in talks with the plugin creator right now and I think he's got most of the issues figured out. Stay tuned for a response from him at some point
What setting in mach?, and does M5 work for you?
N.
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on November 10, 2013, 12:45:55 AM
In General Config under "Pgm End or M30 or Rewind" check off "Turn off spindle" or "E-stop the system"

For those with M3,M4,M5 issues, make sure you check your macros in the macros folder and make sure that they contain the right code (download a demo of the latest mach version to compare to).
Title: Re: A new Huanyang VFD plugin
Post by: tgdavies on November 10, 2013, 05:31:27 AM
It turns out that my problem was that I hadn't cleared the "Disable Spindle Relays" checkbox -- clearing that made M5 work and reversed the direction of the spindle, so everything is working for me now.
Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on November 10, 2013, 12:21:15 PM
It turns out that my problem was that I hadn't cleared the "Disable Spindle Relays" checkbox -- clearing that made M5 work and reversed the direction of the spindle, so everything is working for me now.



It also turned out to be my problem also, I was sure I had the disable spindle cleared, but now the M3, M4, M5 and also MDI works, sorry for the misleading info.
Nosmo.
Title: Re: A new Huanyang VFD plugin
Post by: vre on December 18, 2013, 08:03:29 PM
Iam planing to buy a Huanyang VFD 4kw of 5.5kw which models work with this plugin ?
Title: Re: A new Huanyang VFD plugin
Post by: sivu on December 25, 2013, 04:02:44 PM
I modified the 1.7.1 version of the plugin a bit so that it sets RTS high when sending, and otherwise keeps RTS low for receiving, so that it behaves with dummy RS485 converters.
It's a quick hack, and I'm not sure if royaumedeole would approve releasing this, but if there's an interest in this, I can link it.

Title: Re: A new Huanyang VFD plugin
Post by: MoserLabs on February 05, 2014, 06:42:58 PM
Awesome plugin and glad there are people like you who put time into this stuff!  I got it working and love the added e-stop trigger features!  Issue I run into is I have to engage an e-stop and then reset it before I can engage the spindle a second time.  First time works like a champ, second time it does nothing until I hit reset and then reset again.

Thoughts?  Would noise cause this kind of behavior?
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on February 05, 2014, 07:37:47 PM
I think the issue I mentioned before is the same as yours. I was finding on the first run, the spindle button in mach3 flashes for a couple seconds, the spindle does nothing, then it goes to estop because it cant detect any spindle movement. But then when you un e-stop it and try again it runs flawlessly. It has never not worked on the second try. This sounds very similar to your issue, and my "first time running" might not even be the first time, it may actually be the second time like what you're experiencing.

Ill have to check again, but from what I recall I think the VFD "clicks" like it received a signal, but the motor doesnt move at all. Until, like you said, it e-stops and you clear the e-stop, then it runs flawlessly

Seb: Do you have any idea whats going on? Maybe a variable in the code isnt reset after the first successful run or something?
Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on February 07, 2014, 05:00:28 PM
I modified the 1.7.1 version of the plugin a bit so that it sets RTS high when sending, and otherwise keeps RTS low for receiving, so that it behaves with dummy RS485 converters.
It's a quick hack, and I'm not sure if royaumedeole would approve releasing this, but if there's an interest in this, I can link it.


How did you modify, do you have the source code?
Nosmo
Title: Re: A new Huanyang VFD plugin
Post by: dynodon64 on February 25, 2014, 11:45:58 AM
While setting up this plugin, I had a problem getting the motor to even run. I played with it all day, only to find out my spindle motor burnt up. Now I don't know if it was caused by the plugin or if it was on it's way out beforehand. The spindle ran fine before the plugin was installed. I installed the latest version, as well as the C++ file and driver for the usb rs485 adapter. After the plugin install, It recognized the settings from the VFD and showed up after the install. It took me a while before I realized I needed to set a speed in the box first before I tried to turn on the motor. Once I did that, it ran, but very erratic. After a few tries to get it to run faster, it just died.

Long story short, after taking apart the spindle motor, with plans to rewind it, I found out that the Chinese 1.5kw water cooled motor is not a four pole motor. The VFD comes preprogrammed for four poles. The motor I have is actually a two pole motor. Now I don't know if that makes any difference, but I thought I would mention it, so others can check their VFD for the right set up. The VFD comes preset for four poles and should only make the motor run half speed. Set for two poles will make it run twice as fast.

Right now, I have my motor all ready for the rewind. I just got my wire yesterday and will start turning soon. Just for those wondering, my motor is over three years old, but only has 10 hours or less on it.

Don
Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on February 25, 2014, 12:27:05 PM
Another issue is that the min freq has to be set otherwise if trying to run lower rpm will burn the motor out, it lacks sufficient inductance at any lower frequency.
IIRC it is PD011.
N.
Title: Re: A new Huanyang VFD plugin
Post by: tahustvedt on March 11, 2014, 04:59:40 PM
Is there a particular RS485 adapter that is recommended? I have one of those cheap black USB ones ( http://www.ebay.com/itm/331071937819?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649 ) and Mach3 runs unstable with it. I will lose steps occasionally. It gets worse with higher kernel rates. It does not happen if I disconnect the USB adapter and operate the VFD manually. I was thinking about getting a RS232-RS485 adapter instead. Is this a good one? http://www.ebay.com/itm/190380830801
Title: Re: A new Huanyang VFD plugin
Post by: tahustvedt on March 11, 2014, 06:58:59 PM
Maybe it's not the adapter after all. I don't know. Here's a video showing the difference between having the plugin disabled, and enabled. That's the only difference between the two parts of the video. http://youtu.be/wOzXPzTsmVE
Title: Re: A new Huanyang VFD plugin
Post by: gene8522 on March 11, 2014, 11:45:39 PM
Check this one out. I have been using this one since 10/2013 and have not had any problems at all with my VFD and spindle. Far better than the black junk one, it went in the trash.
You will need a cable, it uses the same cable that is on my Dell printer. It has about a 1/4" or 5/16" square plug on one end and USB on the other.

http://www.ebay.com/itm/KMTronic-USB-One-Relay-Controller-RS232-Serial-controlled-BOX-/271361447833?pt=LH_DefaultDomain_0&hash=item3f2e671799
Title: Re: A new Huanyang VFD plugin
Post by: gene8522 on March 12, 2014, 12:22:10 AM
Sorry I listed the wrong interface ...............this is the right one

http://www.ebay.com/itm/KMTronic-USB-to-RS485-FTDI-interface-Converter-BOX-/271389457726?pt=LH_DefaultDomain_0&hash=item3f30127d3e
Title: Re: A new Huanyang VFD plugin
Post by: tahustvedt on March 12, 2014, 01:45:00 PM
If I enable the plugin, I get the problems I mentioned. If I then go into plugin setup and disable the plugin, Mach3 Works, and communicates fine with the VFDe. Weird! The plugin is doing something bad to my system when it's activated, and when I then deactivate the plugin, it still works, and better than it does when activated.

My Mach version is 3.043.062. Im using plugin version 1.7.1. Is it possible to download previous versions of the plugin to test?

Mach does not communicate with the VFD if I don't activate the plugin first that session.
Title: Re: A new Huanyang VFD plugin
Post by: dadiy on March 28, 2014, 06:06:31 AM
Hey,  just wanted to say thanks for the plugin.

I purchased the VFD Model HY02D223B from cnc4you.co.uk and this USB adapter -

http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=331099811041&ssPageName=ADME:X:RTQ:GB:1123

and although I needed to load the CH340 driver not the prolific one everything just worked.

I've even kept the old relay control that used to run my router to start and stop the water cooling pump for the spindle.

I've not had any noise issues yet,  but my stepper motors all have ferrite clips,  and when they arrive I'll be adding some more to the VFD/Spindle and the cable between the PC and the VFD just in case.


Just for info,  I'm running this on XP with a 1.8ghz CPU and 512mb ram.   The Mach3 is the current version 3.043.062 and I just followed your excellent instructions.
Title: Re: A new Huanyang VFD plugin
Post by: gene8522 on March 28, 2014, 07:48:34 AM
Those USB Adaptors are cheep for a reason. Try this one
   http://www.ebay.com/itm/KMTronic-USB-to-RS485-FTDI-interface-Converter-BOX/271389457726?_trksid=p2050601.c100085.m2372&_trkparms=aid%3D111001%26algo%3DREC.SEED%26ao%3D1%26asc%3D20140211132617%26meid%3D5802937852000375126%26pid%3D100085%26prg%3D20140211132617%26rk%3D2%26rkt%3D4%26sd%3D171262166282%26clkid%3D5802948813974251939&_qi=RTM1562570
Title: Re: A new Huanyang VFD plugin
Post by: Gianni55 on April 14, 2014, 11:38:28 AM
Good morning.
Excuse my poor English.
I installed the royaumedeole plugin ; It all works, m3, m5,
but the axis motors stops randomly for a few steps.
There are no noise from the spindle. If I put in the manual and I disable the plugin, everything returns to normal.
If I enable the plugin, and I turn off the spindle, the problem returns.
In addition, when the plugin is active, the motors rotate a little slower.
I use the version 1.7.1 of the plugin, and the version 3.043.066 of Mach3.
I even tried to install the vcredist_x86 in French, but nothing has changed.
I also tried .053 and .022 versions of Mach3
I would like to try a previous version of the plugin, but I do not find.
Thanks to those who will find a solution.
giovanni
Title: Re: A new Huanyang VFD plugin
Post by: mikemaat on April 28, 2014, 12:51:10 AM
royaumedeole / Seb,

I have been using the plugin fairly successfully for awhile. I'm stil, however,l having the issue where if the program calls for the spindle speed to be reduced it e-stops. Did you get that figured out? I'm more than willing to make some paypal donations to your beer fund if you can get it figured out. Its really adding alot of time to one of my part programs.

Also, is there any chance you would allow me to see the source code. My day job is programming and id really love to dig into it to fix a couple of my issues. Id be more than willing to share what I find with you for the official version.
Title: Re: A new Huanyang VFD plugin
Post by: GRAYHIL on July 01, 2014, 10:12:27 AM
Hi all
I am trying to get the plug in to work.
Version 1.7.1
Win xp
Visual c++2008
MACH3 66

The VFD pd setting are
PD001 2
PD002 2
FOR MACH 3 CONTROL

various other images are attached.
Nothing happens in program run or MDI.

Going back to operator control via the VDF PD001 and 002 and it all works MANUALLY.
Graham
Title: Re: A new Huanyang VFD plugin
Post by: GRAYHIL on July 01, 2014, 10:13:56 AM
AND ONE MORE IMAGE
GRAHAM
Title: Re: A new Huanyang VFD plugin
Post by: GRAYHIL on July 01, 2014, 03:26:35 PM
Hi All
Heres my motor plate and huanyang  pd list
Graham
Title: Re: A new Huanyang VFD plugin
Post by: GRAYHIL on August 26, 2014, 01:14:02 PM
Hi All
No help then?
Graham
Title: Re: A new Huanyang VFD plugin
Post by: GRAYHIL on September 07, 2014, 04:26:08 PM
With help and suggestions from Sebastion it is now all functioning.
Thank you Sebastion
Title: Re: A new Huanyang VFD plugin
Post by: sivu on December 13, 2014, 05:42:34 PM
I modified the 1.7.1 version of the plugin a bit so that it sets RTS high when sending, and otherwise keeps RTS low for receiving, so that it behaves with dummy RS485 converters.
It's a quick hack, and I'm not sure if royaumedeole would approve releasing this, but if there's an interest in this, I can link it.


How did you modify, do you have the source code?
Nosmo

Wow, answering to almost year old question, sorry for the delay! :)

I don't have source code, I modified the binary directly, using disassembler.

Title: Re: A new Huanyang VFD plugin
Post by: MechanoMan on February 16, 2015, 04:48:55 AM
Was the source code ever made available?

I have a Hitachi X200, it would be similar to control, but the commands are different.  It wouldn't be that big to change.
Title: Re: A new Huanyang VFD plugin
Post by: gpz_rider on June 03, 2015, 05:05:27 AM
With help and suggestions from Sebastion it is now all functioning.
Thank you Sebastion

Hi Graham.... Same trouble here... What was Sebastions help???

Cheers Mark
Title: Re: A new Huanyang VFD plugin
Post by: GRAYHIL on June 03, 2015, 12:28:53 PM
gpz-rider
It is on his website under his questions and replies
Graham
Title: Re: A new Huanyang VFD plugin
Post by: gpz_rider on June 04, 2015, 12:32:32 AM
Yeah had already sorted it... 8)

Cheers Mark
Title: Re: A new Huanyang VFD plugin
Post by: LGF on August 20, 2015, 03:40:19 AM
I suppose i "Thumbs UP" would be in order for the work Sebastien has done for these specific spindles, however, i version I could download ver. 1.7.1 does not even get loaded by Mach 3 ver 3.063 something (it's the latest one).

I follwoed the instructions on his site to the letter, however, after pasting the .dll file into Mach's Plugin folder, i start Mach3 up and immediately get an error message stating "Defective plug-in found......" then at the next click of the mouse i get a second error message virtually stating the same with the addition at the end ".... ignoreing plugin" and then Mach starts up.

I have tried contacting Sebastien on his mail addy, tried downloading previous versions, even downloaded fresh copies, saved them on different flash-drives in various stages of compression, unzipped, zipped etc etc etc but the message stays the same.

I gather it's not a Mach issue unless, the VFD pluging was not updated to fucntion with the latest version of Mach3, so the question is, does anybody have a fucntional copy of the pluging that would be kind enough to forward it to me via email?

If so please send me a PM, if not and you know of a different download location with a file that might not be "defective" please direct me?

Thanx so much in advance!!!
Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on August 20, 2015, 09:37:04 AM
Seb is hard to get hold of at the best of times, I have not been able to reach him for a while now.
I have both the 1.6.1. and the 1.7.1 versions that work for me.
Did you load the VC++ add ons?
Also it does not work with Mach4 incidentally,  the new version is written in Lua instead of C++ apparently?
Nosmo.
Title: Re: A new Huanyang VFD plugin
Post by: LGF on August 24, 2015, 07:55:56 AM
THX NosmoKing

Sorted the issue by installing the downloaded VC++, UI (User Input) fault by default  :D :D :D :D :D :D :D

Anyhow, only realised that I skipped that when i started reading the comments on Sebastien's website.

I do have a serious problem thou (suspect it might be noise or my remedies for that) as the spindle speed is fine when running it without the spindle actually connected, both Mach DRO and VFD displays are sync'ed, Mach slightly slower and slightly more variable than the VFD's readin, but that's fine. However when I connect the spindle and hit "spindle cw" on Mach, it slowly creeps up to the minimum revs (7200) but does not even reach that before becomming very hot and triggering what can be best described as a current overload as it trips the multi-outlet plug's overlaod protecion switch.

I will 1st try and have a proper look at the configs of the VFD's PD's and the appliction of the ferrite clips I have all-over the show, including the grounding and earthing of everything as mentioned on so many places on the net. I do suspect it might be the latter as, when i do start the spindle (with or without it being physically connected) my keyboard stops functioning and becomes unrecognizable by the PC, sometimes the mouse also seems to lose connection, but as soon as I hit the "spindle cw" button on my Mach screen, all returns to normal wrt to the keyboard, well most of the times, as at times i need to 1st do "reset" and then pressing it again, reconnects the keyboard communication.


Very frustrating to say the least, and sort of at a point (just over a year down the line now) of giving up now, really !
Title: Re: A new Huanyang VFD plugin
Post by: LGF on August 24, 2015, 08:09:44 AM
PS whilst on the subject, do i understand earthing and grounding correct to say:

1. I need to ground my CNC frame (aluminum in construction) to the case were my stepper drivers/controllers, power supply, relays etc is?
2. Ground my spindle's body with an additional ground wire to the VFD's Earth?
3. ground the shielding of the spindle's wires at the VFD's ground and not ground that at the spindle?
4. What about my DC common wires? Wires that are 5v 12v and 48v respectively coming from my BOB, stepper drivers/controllers, the 2 channel relays etc etc, do I ground these to the frame of the metal case where they are residing and to the metal casing of the PC some distance away and to the Earth ground of the incoming 220v AC?

I have brought all my DC commons to the 3 "COM" slots on the multi output power supply not sure if a ground wire from the CNC frame should be connected to these or to the following where I have brought the shielding of almost all the shielded cable to a separate common "bus bar" that is only grounded to the metal casing of the controller etc box?


nuts .......................... i tell you
Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on August 24, 2015, 09:59:10 AM
I am a believer in grounding supply commons, a star earth ground point should be set up where all grounds shields and service ground is connected to.
1/ is called equi-potential bonding see PDF.
http://www.automation.siemens.com/doconweb/pdf/840C_1101_E/emv_r.pdf?p=1
2/ The spindle frame or ground should be taken back to the VFD and connected to the earth conductor fed to the VFD.
3/ See section 6 of the PDF, it is now customary to ground both ends of shields when bonding is carried out.
4/See above.
A couple of things to watch, on some of the Chinese spindles the ground pin is not actually connected to the frame internally, also make sure you do not run the spindle at a lower rpm than around 6000 rpm as it can burn out.
Nosmo. 
Title: Re: A new Huanyang VFD plugin
Post by: LGF on August 26, 2015, 03:03:18 PM
Thanx NosmoKing

However when I click on the link you provided it just opens up a page of Siemens documentation, long long list of them, which one is the one that you are referring to?

Thanx again

I have in the mean time installed galvanized steel plate conduits where I could and ran all the signal carrying screened wires in these as far as it is physically possible, also intend to try the same with all the power cabling but in separate channeling.

Can one actually overdo noise filtering? Reason I am asking is that I saw some YouTube clip where the bloke illustrates the effect of ferrite clips on the signal and I am just concerned that by adding to much of them or looping wires through them too many times that I might hamper the frequency range and or strength and thus not delivering the required Hz to the spindle and you know what that means, the stuff that makes all electronics work, starts coming out, ....... yes SMOKE!!!!

Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on August 26, 2015, 04:41:01 PM
Unfortunately Siemens updated their site and I don't see where they have put the PDF, Unfortunately I am not sure I made copy of it!!
The only thing I have put on the motor side is a 3 ph inductor or choke as recommended and sold by most VFD manuf.
Nosmo
Title: Re: A new Huanyang VFD plugin
Post by: Letalkin on September 05, 2015, 10:06:35 AM
Is it possible to get this plugin for Mach4?
Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on September 05, 2015, 10:54:56 AM
I tried contacting Seb but he has not responded, I am not sure if any one will write one in the new Lua language used in Mach4 ?
N.
Title: Re: A new Huanyang VFD plugin
Post by: ger21 on September 05, 2015, 02:09:36 PM
Mach4 plugins are not written in Lua.
Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on September 05, 2015, 02:49:57 PM
Well I guess the present plug ins are not compatible with Lua that Mach4 is written in, at least I was told here when I inquired.
N.
 
Title: Re: A new Huanyang VFD plugin
Post by: ger21 on September 05, 2015, 06:45:33 PM
Plugins are written in some flavor of C (not sure which).
The issue is that Mach4 is totally different from Mach3, so the plugins are totally different.
Title: Re: A new Huanyang VFD plugin
Post by: NosmoKing on September 05, 2015, 11:49:31 PM
So what is the veracity of this?
http://www.machsupport.com/forum/index.php/topic,30473.msg211789.html#msg211789
N.
Title: Re: A new Huanyang VFD plugin
Post by: ger21 on September 05, 2015, 11:56:02 PM
Don't believe everything you read on the internet.
Title: Re: A new Huanyang VFD plugin
Post by: Chaz on August 04, 2016, 04:10:59 PM
If I enable the plugin, I get the problems I mentioned. If I then go into plugin setup and disable the plugin, Mach3 Works, and communicates fine with the VFDe. Weird! The plugin is doing something bad to my system when it's activated, and when I then deactivate the plugin, it still works, and better than it does when activated.

My Mach version is 3.043.062. Im using plugin version 1.7.1. Is it possible to download previous versions of the plugin to test?

Mach does not communicate with the VFD if I don't activate the plugin first that session.

I have the exact same issue. No spindle action at all. Enable the plugin, It keeps 'tripping'. Disable the plugin, it works perfectly. Close Mach, restart, no spindle activity. Rinse Repeat ...
Title: Re: A new Huanyang VFD plugin
Post by: swets on August 19, 2017, 02:57:54 PM
I want to try this plugin, but I get a :  Plugin DLL Defective.Reload.

what does it mean?  and what todo about it?
Title: Re: A new Huanyang VFD plugin
Post by: ger21 on August 19, 2017, 02:58:38 PM
Delete the plugin from you plugins folder, and try downloading a new copy of it.
Title: Re: A new Huanyang VFD plugin
Post by: swets on August 19, 2017, 03:05:18 PM
Did that al ready.... din't help?
Title: Re: A new Huanyang VFD plugin
Post by: Sailor10 on February 23, 2018, 09:22:08 PM
Make sure you include a ground between the pc and the VFD (DCM on terminal strip) otherwise the process may not work.
Title: Re: A new Huanyang VFD plugin
Post by: Robotintheforest on January 10, 2019, 07:53:45 PM
Hi has anyone used this plug in with Windows 10? Need to do anything special to get it going?
Title: Re: A new Huanyang VFD plugin
Post by: Chaz on January 11, 2019, 02:35:22 AM
Hi has anyone used this plug in with Windows 10? Need to do anything special to get it going?

Yes with Win10 and no, dont recall needing to do anything different.
Title: Re: A new Huanyang VFD plugin
Post by: webprotector on April 28, 2019, 07:01:19 AM
I modified the 1.7.1 version of the plugin a bit so that it sets RTS high when sending, and otherwise keeps RTS low for receiving, so that it behaves with dummy RS485 converters.
It's a quick hack, and I'm not sure if royaumedeole would approve releasing this, but if there's an interest in this, I can link it.


How did you modify, do you have the source code?
Nosmo

Wow, answering to almost year old question, sorry for the delay! :)

I don't have source code, I modified the binary directly, using disassembler.

Hello SIVU,
Can you tell me please if you remember what disassembler did you used to decompile de dll file and recompile ?
Title: Re: A new Huanyang VFD plugin
Post by: datas_brother on July 04, 2019, 08:19:38 AM
Hi all,

I'm having a small issue with the plugin. Due to a problem with the motor tuning dialog not opening I had to re-install Mach3. Since then the spindle won't stop if started. regardless of a manual start or a G-code start as part of a toolpath, once the spindle starts it will not turn off. I have to hit the emergency stop. This did not happen before the re-install. There must be some setting I haven't made but I'm at a loss of where to start.

Any help would be appreciated.

Thanks
Title: Re: A new Huanyang VFD plugin
Post by: datas_brother on July 23, 2019, 06:43:25 AM
No help out there? I have to press the E-stop for every tool change. That tells me that the stop command works but is not being sent in normal operation. This is really annoying.

H E L P ! ! !
Title: Re: A new Huanyang VFD plugin
Post by: Robotintheforest on September 30, 2019, 06:53:47 PM
Hello has anyone had an issue where the plugin can't communicate with the VFD after almost a year of working flawlessly? I came in to the machine today and the plugin could not communicate with the VFD ("unable to read value") the serial adaptor shows up in Win10 devices, The VFD works manually, the wires test positive for continuity. I haven't changed anything. I am at a bit of a loss.
Title: Re: A new Huanyang VFD plugin
Post by: Robotintheforest on October 02, 2019, 04:58:30 PM
Well it looks like my serial adaptor crapped out. Replaced it with one of another machine and everything works fine.
Title: Re: A new Huanyang VFD plugin
Post by: jamesarm97 on October 18, 2019, 11:12:19 PM
I am just getting around to trying this VFD modbus plugin with my HY spindle. The spindletalker2 v.5 works fine and I can start / stop and reverse the directions all I want. I cannot get MAch3 to reliably work with it. I setup the plugin and it detects my VFD settings and I can set an RPM and start the spindle and see it ramp up and run. I can then stop the spindle with F5, but after that I cannot start it again until I reset. I also cannot get it to reverse direction at all. I did notice the DWELL indication comes on then stays on, is that related to it not responding after the first time? using driver v1.7.1 and Mach3 (latest version).
Title: Re: A new Huanyang VFD plugin
Post by: jamesarm97 on October 19, 2019, 12:21:34 AM
Mystery solved. If you have any spindle spinup delays set in general then that seems to set a Dwell that will never end and keeps any following M3/4/5 commands from completing.

 
I am just getting around to trying this VFD modbus plugin with my HY spindle. The spindletalker2 v.5 works fine and I can start / stop and reverse the directions all I want. I cannot get MAch3 to reliably work with it. I setup the plugin and it detects my VFD settings and I can set an RPM and start the spindle and see it ramp up and run. I can then stop the spindle with F5, but after that I cannot start it again until I reset. I also cannot get it to reverse direction at all. I did notice the DWELL indication comes on then stays on, is that related to it not responding after the first time? using driver v1.7.1 and Mach3 (latest version).
Title: Re: A new Huanyang VFD plugin
Post by: rognets on March 24, 2020, 06:55:32 PM
Did that al ready.... din't help?

Hello, did you solve this problem. I have Win10/64, C++ 2008, latest Mach3, with and without win10 patch, still error on start with vfdplugin
Regards
Steve
Title: Re: A new Huanyang VFD plugin
Post by: diego85tam on April 17, 2020, 08:59:55 AM
Hi everyone, I have the same problem.
Anyone had the same error and found a solution??

I did downloaded it multiple times without success. I'm running Mach3 on a Win7 32bit machine with a USB to serial 485 adapter.

Please help! :(

Did that al ready.... din't help?

Hello, did you solve this problem. I have Win10/64, C++ 2008, latest Mach3, with and without win10 patch, still error on start with vfdplugin
Regards
Steve
Title: Re: A new Huanyang VFD plugin
Post by: jlmccuan on June 14, 2020, 05:00:03 PM
My problem is, when I load mach3, I get an error saying that the plugin isn't configured.  When I try to change the port from 1 to 3, which is what the Device Manager shows, I get a popup screen that says 'Unable to Read Data" and the config port is changed back to 1.  Running XP
Title: Re: A new Huanyang VFD plugin
Post by: Calum on July 30, 2020, 12:05:40 AM
I have been using this plugin for a year or two now on Window10 with no problems but now that Iv'e upgraded my PC to something a bit faster and upgraded win10 I get an error message saying the the vfdplugin is defective. I have tried replacing the DLL, turned windows defender off, run as administrator and changed ownership of files and directories with no luck. This plugin runs fine on another win10 PC. Does anyone have any suggestions that may help?

Cheers
Calum
Title: Re: A new Huanyang VFD plugin
Post by: gordond on March 31, 2022, 02:00:43 PM
I'm new to this forum so you may need to forgive some errors. Since the warning says no posts in the last 120 days maybe no more problems with this VFD plugin, except mine?
I have a Huanyang VFD and spindle working fine on the bench. Would like to use the plugin in Mach3 on a Win7 laptop running my CNC router. I don't have a USB to RS-485 converter installed yet. (Waiting for it to arrive.) But the plugin is installed and when Mach3 is launched I get the "defective plugin" message. First thing I tried was to download the plugin again and reinstall. Still get the error message. Tried searching the net for a solution to the problem and tried a few things, none of which worked. So, I'm hoping someone here can help.
Title: Re: A new Huanyang VFD plugin
Post by: Graphicman on January 07, 2023, 10:35:34 AM
The plugin is working normally except for one thing, I cant get the index pulse to be effective anymore, the plugin/vdf rpm feedback is overriding it which makes the index pulse useless, if i stop the chuck by hand i get same rpm unchanged at all
I tried everything to make mach3 gets the actual rpms from the index pusles with no luck, plz help