Welcome, Guest. Please login or register.
Did you miss your activation email?
September 18, 2014, 08:39:16 AM

Login with username, password and session length
Search:     Advanced search
* Home Help Search Calendar Links Login Register
+  Machsupport Forum
|-+  Mach Discussion
| |-+  Mach SDK plugin questions and answers.
| | |-+  Finished Plugins for Download
| | | |-+  Huanyang VFD controller plugin
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36   Go Down
Print
Author Topic: Huanyang VFD controller plugin  (Read 129899 times)
0 Members and 1 Guest are viewing this topic.
Matty Zee
Active Member

Offline Offline

Posts: 38


View Profile
« 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...


* HuanyangVFD.zip (421.63 KB - downloaded 6450 times.)
Logged
Matty Zee
Active Member

Offline Offline

Posts: 38


View Profile
« 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  Wink
Logged
irfanulla
Active Member

Offline Offline

Posts: 7


View Profile
« Reply #2 on: February 17, 2010, 08:18:28 AM »

Ah Matt, now I gotta see how busy you were Smiley
does this plug work with any other VFD, I assume not Smiley
Logged
Matty Zee
Active Member

Offline Offline

Posts: 38


View Profile
« 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.
Logged
kingsx
Holding

Offline Offline

Posts: 2


View Profile
« 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
Logged
Matty Zee
Active Member

Offline Offline

Posts: 38


View Profile
« 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
Logged
kingsx
Holding

Offline Offline

Posts: 2


View Profile
« Reply #6 on: March 05, 2010, 02:37:35 AM »

Thank!  I will try it and post my results
Logged
ToPNoTCH
Holding

Offline Offline

Posts: 1


View Profile
« Reply #7 on: March 19, 2010, 10: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.
Logged
michel pet
Active Member

Offline Offline

Posts: 14


View Profile
« Reply #8 on: April 06, 2010, 07: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

Logged
michel pet
Active Member

Offline Offline

Posts: 14


View Profile
« Reply #9 on: April 08, 2010, 07: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.
Logged
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!