Hello Guest it is November 05, 2024, 02:04:40 PM

Author Topic: Huanyang VFD controller plugin  (Read 781862 times)

0 Members and 8 Guests are viewing this topic.

Huanyang VFD controller plugin
« on: February 17, 2010, 07:07:22 AM »
Hi all,

I am finally happy to release my plugin for the Huanyang VFD to the world.

This plugin has been written for use with the Huanyang series of Variable Frequency Drives (VFD). It allows Mach3 to control the operation of the VFD via RS485 communication port.

The plugin incorporates the following features
•   Stop & Stop Spindle
•   Set desired spindle RPM
•   Monitor actual spindle RPM
•   Monitor current draw of spindle
•   Triggers ‘Stop’ or ‘E-Stop’ event if commands to VFD fail.

If you have any problems using this plugin please post them here. However please limit it to problems directly relating to the plugin. If you having difficulty seting up the VFD for manual control there are far better places to get help (CNCZone).

Please let me know if you find this plugin useful :-)

A big thanks goes to Mark Hastings for helping me test this and giving me a prod now and then to get this finished...

Re: Huanyang VFD controller plugin
« Reply #1 on: February 17, 2010, 07:32:06 AM »
There is a brief manual included in the .ZIP file. Please read it before you ask any questions  ;)
Re: Huanyang VFD controller plugin
« Reply #2 on: February 17, 2010, 08:18:28 AM »
Ah Matt, now I gotta see how busy you were :)
does this plug work with any other VFD, I assume not :)
Re: Huanyang VFD controller plugin
« Reply #3 on: February 17, 2010, 08:22:39 AM »
Hey Irfan, no it won't work. Most other VFDs should be able to talk to Mach3 via the MODBUS protocol. The reason i had to write this is the Huanyang doesn't conform to the MODBUS protocol.
Re: Huanyang VFD controller plugin
« Reply #4 on: March 05, 2010, 02:28:06 AM »

Hi! Everybody


“Matty Zee” thanks for sharing this important info and knowledge.

Just a question?  What about hardware? Do I need a serial RS232 to RS485 Converter to connect to comm port?

Thanks, I would really like to try your plug in my HY driver, because the only think I control now is to turn the spindle on and off
Re: Huanyang VFD controller plugin
« Reply #5 on: March 05, 2010, 02:36:08 AM »
Yes, you will need an RS-485 port. You can either use a RS-232 to RS-485 converter or a USB to RS-485. Either one should work in theory. I've only tested the USb version though.
Here is a link to the same type i'm using. (not sure if its the same seller i bought from though)
http://cgi.ebay.com.au/USB-2-0-to-RS422-RS-422-RS485-Converter-Adapter-Serial_W0QQitemZ370310934731QQcmdZViewItemQQptZAU_Components?hash=item56384070cb

Cheers
Matty Zee
Re: Huanyang VFD controller plugin
« Reply #6 on: March 05, 2010, 02:37:35 AM »
Thank!  I will try it and post my results
Re: Huanyang VFD controller plugin
« Reply #7 on: March 19, 2010, 11:49:59 AM »
First off all thanks for the effort of making this plugin. An excellent initiative that gives this VFD even more value for money.
I'm sad to report that it did NOT work for me and i believe i know why.

The RS-485 standard which is used in this case states the communication allways is done using half-duplex on twowire.
This means that in someway the transceiver chip on the RS485 adapter need to be set in Transmit or Receive mode.
As i understand it it is up to the implementation to handle this (RS485 don't care as it's an interface standard and not a protocol standard).

One "normal" way to handle this with an RS232 converter, is to use the RTS pin to set the transceiver into Transmit mode, and directly afterwards the transmit lower it to
be ready to receive.

Some RS485 adapters (mostly USB to RS485) incorporate "Automatic Data Direction Controll" (ADDC), which handle the above behaviour by it's hardware.

It seems that your plugin raise the RTS all the time when its loaded thus making it only compatible with RS485 adapters that incorporates ADDC.
Other adapters can only send data, which matches well with the behaviour i get (cant see PD001,PD002 but start spindle once, get estop directly afterwards).

Conclusion:
I suggest that you update the plugin so that it raises RTS while sending and lower it directly when done.
I imagine this won't be an extreme alteration in code, but it would make the plugin compatible with the vast majority (if not all) types of RS485 interfaces/converters.
Beside that the ADDC devices are much more expensive, so those who need to buy an adapter would find this an great modification i be live.

Again thanks for your effort, it's greatly appreciated.
Re: Huanyang VFD controller plugin
« Reply #8 on: April 06, 2010, 08:40:58 AM »
First off all thanks for the effort of making this plugin. An excellent initiative that gives this VFD even more value for money.
I'm sad to report that it did NOT work for me and i believe i know why.

The RS-485 standard which is used in this case states the communication allways is done using half-duplex on twowire.
This means that in someway the transceiver chip on the RS485 adapter need to be set in Transmit or Receive mode.
As i understand it it is up to the implementation to handle this (RS485 don't care as it's an interface standard and not a protocol standard).

One "normal" way to handle this with an RS232 converter, is to use the RTS pin to set the transceiver into Transmit mode, and directly afterwards the transmit lower it to
be ready to receive.

Some RS485 adapters (mostly USB to RS485) incorporate "Automatic Data Direction Controll" (ADDC), which handle the above behaviour by it's hardware.

It seems that your plugin raise the RTS all the time when its loaded thus making it only compatible with RS485 adapters that incorporates ADDC.
Other adapters can only send data, which matches well with the behaviour i get (cant see PD001,PD002 but start spindle once, get estop directly afterwards).

Conclusion:
I suggest that you update the plugin so that it raises RTS while sending and lower it directly when done.
I imagine this won't be an extreme alteration in code, but it would make the plugin compatible with the vast majority (if not all) types of RS485 interfaces/converters.
Beside that the ADDC devices are much more expensive, so those who need to buy an adapter would find this an great modification i be live.

Again thanks for your effort, it's greatly appreciated.

 i have the same problem.
this is the usb/ 485 converter i have.


it works with an ftdi ft232bl  chip

Re: Huanyang VFD controller plugin
« Reply #9 on: April 08, 2010, 08:44:49 AM »
i have it running .
i use 2 wire not 3 it give`s an earth loop.
now i have the problem to make the rpm correct.