How to connect the spindle VFD to RS-485 serial modbus

It is possible to connect and configure the spindle VFD to the mach3 via an RS485 communication and protocol. The first thing you will need is the dynamic link library to pair with mach3 called the Huanyang VFD Mach3 PlugIn. You can find this file at the mach3 support forum here: http://www.machsupport.com/forum/index.php/topic,14182.0.html You will also need to download the Microsoft .net 3.5 framework and install it: https://www.microsoft.com/en-us/download/details.aspx?id=21 Follow the pdf that comes with the library file, but here is a synopsis of what you need to do (I also added a lot more information that may be useful during this process as the manual does not cover the main connections that need to be done): You will need to program your VFD so that it knows how to communicate with mach3 and the computer (go into the programming mode of the VFD and change these parameters): - PD001 - value 2 - Enables with communication aspect of the VFD - PD002 - value 2 - Enables frequency control from the communcations port - PD163 - value 1 - VFD address - PD164 - value 1 - Baud rate of 9600 (speed of the communication) - PD165 - value 3 - 8N1 RTU - 8 bits (that's the size of the word that gets communicated), N (No parity or no error checking) and 1 (1 stop bit) Copy the dll file to the PlugIns folder of mach3. Connect the RX and TX lines to your computer. There are a couple ways you can do this, but the recommended way would be to use an FTDI USB device which converts a USB to a serial com port. The device will have Rx and Tx connectors to connect to the VFD terminals with the same labels. This method is recommended since serial ports are not as common in computers these days. Next, you will need to configure mach3 to use the plugin library. Start mach3 and click on Menu -> config ->Config Plugins. Enable the new plugin by clicking on the red cross on the left column next to the plug in. Restart mach3 after doing this. No you need to configure mach3 to use the HuanyangVFD plugin. Go to the ports & pins configuration and select the spindle setup tab. Make sure that the Disable Spindle Relays checkbox is unchecked. We don't want mach3 to output a signal for a relay since the spindle will start up and turn off within the VFD and not from an external relay. Next, go to the HuanyangVFD settings by clicking on Menu -> plugin control -> HuanyangVFD. Set the parameters to the same settings you put into the VFD programming. The com port will be shown as new hardward when you plug in the USB FTDI device. A little bubble will be displayed at the bottom right where it will notify you that a new device is being installed (be patient while windows assigns a com port). Alternatively, you can use the windows device manager to see which port was set for the new USB FTDI device). You may need to restart mach3 several times until you get the correct information displayed in the PD001 and PD002 fields. When the com port is correct and the other parameters, like baud and VFD address is the same as you entered in the programming, then the PD001 and PD002 will show the number 2, otherwise, a 99 will appear which means that communication was not successful. You can now control the on/off and RPM of the spindle using the RS485 communication between mach3 and the VFD. Additional Information: Will this work with the brand called "best "vfd as well. Additional Information: Where Can i find vfd plug-in for yl-620a for mach3 MODBUS? Additional Information: Once you connect the RS485 to MAch 3 and make all the connections, will MAch 3 automatically turn the spindle on when you start a cut file?

Back to blog

Leave a comment

Please note, comments need to be approved before they are published.