Hello Guest it is March 28, 2024, 07:13:48 AM

Author Topic: Modbus and GS-2 Spindle help  (Read 14125 times)

0 Members and 1 Guest are viewing this topic.

Modbus and GS-2 Spindle help
« on: June 02, 2014, 01:36:30 PM »
Hi All,
First time posting, but I've been researching for a while now. I just swapped the mill at work over to Mach3 and I'm having trouble getting the spindle set up. We are using an Automation Direct GS-2 VFD, and trying to use the serial control. I can't seem to wrap my head around how to set up Modbus in Mach 3 to communicate with the GS2. Is there a link somewhere with a step-by-step breakdown of how to do this?
Thanks
Dave

Edit: I suppose I should add that the modbus video tutorial seems to be a different version of mach3, and some of those screens don't seem to exist
« Last Edit: June 02, 2014, 01:41:01 PM by ddmotim »
Re: Modbus and GS-2 Spindle help
« Reply #1 on: July 21, 2014, 02:55:36 AM »
It seems that a few people have already gotten the GS2 VFD set up and running with Mach3 using Modbus Serial.  Can one of you kindly post the settings in Mach3 so that others can get it set up also.  It is not clear to me what has to be done and the few topics posted seem to use the wrong Modbus decimal address's based on the automation direct GS2 manual.  Also, is the RJ12 to DB9 cable a crossover cable or straight through.  I have been pulling my hair out trying to get mach3 to communicate with this drive.  I have set the baud rate, parity, and stop bits in the VFD, PC device manager, and Mach3.  Nothing seems to work.
Re: Modbus and GS-2 Spindle help
« Reply #2 on: July 30, 2014, 02:53:51 AM »
Ok, I got this all sorted out.  If you make your own RJ12 to DB9 connector you need to make a straight thru connection.  This isn't clear in the Automation Direct manual because it shows RXD going to TXD which would be a crossover cable.  The pin connections are as follows:

RJ12                DB9
2 Ground    ->  5  Ground
3 RXD        ->  2  RXD
4 TXD        ->  3  TXD

Also, you need to set the communication protocol in the GS2, Mach3, and the COM port under windows device settings to be the same and they must be RTU.  So for the GS2 you have only 3 options: 8-N-2, 8-E-1, or 8-O-1.  I set mine up for 8-O-1.

Make sure to set you slave address in the GS2 and Modbus Serial setup to the same number.  Set your base RPM and max RPM in the GS2 as well.

The attached images have all of my settings.  My spindle now runs M3 FWD, M4 Reverse, M5 stop, and speed control 80-6000 RPM with the variable drive pulley set at 3000 on the Bridgeport.  Also, don't forget to set the pulley 1 max and min speed under "Config->Spindle Pulleys.."

Copy and paste the scripts from this post http://www.cnczone.com/forums/mach-mill/27820-modbus-run-gs-2-drive-2.html into your mach3 macros folder.

I spent more time than I should have figuring this all out.  It only takes 5 minutes once you know what you are doing.
Re: Modbus and GS-2 Spindle help
« Reply #3 on: March 09, 2016, 01:34:11 PM »
I'm attempting to get mach3 to control my VFD (GS3 series) through modbus.  I have followed what I have seen posted but I'm having communication issues when I try to test modbus.  If the radio button has "Holding Registers" selected I am able to open the port and read the hex values.  Once I move the radio button to any of the other selections (Input, Coils, Discrete) and click the read button I get a status message of "illegal function".  Also, when the status of "illegal function" is achieved the VFD displays the message of "invalid command code".

As far as modbus goes my knowledge is abysmal,  I have no idea what clues these messages are giving me.  Any help would be greatly appreciated.
Re: Modbus and GS-2 Spindle help
« Reply #4 on: March 20, 2016, 07:42:31 PM »
I can't get this to work are there any more tutorials to help set this up?
Re: Modbus and GS-2 Spindle help
« Reply #5 on: March 20, 2016, 09:56:37 PM »
Here is a link to a post I made regarding my own vfd I managed to get working using the brains in mach3.

It also includes some links that helped me understand things a little better.

http://www.cnczone.com/forums/spindles-vfd/301902-help-setting-gs3-vfd-mach3-controlling-via.html#post1850728