Hello Guest it is June 07, 2023, 02:50:25 AM

Author Topic: A new Huanyang VFD plugin  (Read 202894 times)

0 Members and 1 Guest are viewing this topic.

A new Huanyang VFD plugin
« on: October 29, 2012, 03:13:05 PM »
Hi all!

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


  • Start/stop of the spindle
  • RPM monitoring through system DRO(39), no need to modify screen set
  • Takes into account the rated speed 50hz declared in the VFD (PD144). Thus, the driver will be able to handle any kind of motor, not just those that run at 3000rpm @ 50hz .. You just need to configure your VFD on the right way.
  • Can Manage the pulley system. If we set the option, the calculation of the RPM will be done using ratio declared in Mach3. Indeed, the first driver is specific to chinese spindle, the pulley system was useless. But on my RF45 or other machine whith a gearbox, spindle speed depends on the gear … But it is the speed of tool that interests us, not the motor …
  • Finally, if the spindle stops (eg you press the stop button on the VFD), it causes an emergency stop in Mach3

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


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

« Last Edit: October 31, 2012, 04:46:41 AM by budman68 »
Re: A new Huanyang VFD plugin
« Reply #1 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!
« Last Edit: October 31, 2012, 04:47:39 AM by budman68 »
Re: A new Huanyang VFD plugin
« Reply #2 on: October 30, 2012, 10:41:56 AM »

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.

« Last Edit: October 31, 2012, 04:47:22 AM by budman68 »
Re: A new Huanyang VFD plugin
« Reply #3 on: October 31, 2012, 09:15:08 AM »
Fantastic! Looking forward to it! Thanks a ton!
Re: A new Huanyang VFD plugin
« Reply #4 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:

  • Monitor one or more Vfd status variable (out frequency,current,speed,ac or dc voltage) by mapping them to user DRO.
  • Define some limits fot those status variable.A Estop will be triggered as soon as the limit has been reached. For example, you could define a limit to 10A for the current. If the plugin detects that current is 10.1A then an Estop will occur. it’s an easy way to protect your VFD

Here a screenshot of the configuration screen

I put the new plugin version as an attachment.

Prerequisites, setup and configuration can be found at


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.

Re: A new Huanyang VFD plugin
« Reply #5 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!
Re: A new Huanyang VFD plugin
« Reply #6 on: November 03, 2012, 01:50: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!
Re: A new Huanyang VFD plugin
« Reply #7 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.
Re: A new Huanyang VFD plugin
« Reply #8 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!

Offline ger21

  • *
  •  6,295 6,295
    • View Profile
    • The CNC Woodworker
Re: A new Huanyang VFD plugin
« Reply #9 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.

2010 Screenset

JointCAM Dovetail and Box Joint software