Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Tristar500 on January 22, 2010, 01:32:05 PM

Title: Help with servos and drives.
Post by: Tristar500 on January 22, 2010, 01:32:05 PM
OK, I'm comfortable with steppers having built a half dozen machines but now want to make the leap to Servos.  I'm building a large gantry mill (6' X 10').

I've got a couple of G&L centurion drives and some Aerotech BA series drives as well.  I've got pinout diagrams and manuals for the drives but just don't know where to start.

I'm pretty much clueless as how to interface the drives with mach

Any basic help would be much appreciated!
Title: Re: Help with servos and drives.
Post by: Hood on January 22, 2010, 01:34:07 PM
I can probably help withthe Giddings and Lewis drives as I use the DSA variants of these drives.
What models do you have?
Do you have the motors for them?

Hood
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 22, 2010, 01:58:13 PM
Thanks so much!

I've got  Centurion micro DSA drives.  I've got a collection of various motors and will get others if needed.  I've got some Mitsubishi AC servo motors and also some Aerotech brushless DC servo motors.

Not sure what is compatible with the G&L drives..
Title: Re: Help with servos and drives.
Post by: Hood on January 22, 2010, 02:10:37 PM
If they are brushless motors they will work fine with the drives as long as the encoders are compatible. What I mean by that is the encoders must have hall outputs on them so that the drive can determine the commutation for startup, once running they are not required. You can set the drives up to self sense and thus you will not need the commutation signals on the encoders but the downside to that is everytime you power up the drive the motor will rotate slowly for a small amount to sense the commutation. This probably wouldnt be an issue on a spindle but could be on an axis. If however the drives are left with power to them they will not need to do the sensing. Still best to have the right encoders though.
You can fit encoders to these motors and lining them up is fairly straightforward if you have a scope but even if you dont the drive has a means to offset the signals but I prefer to do it correctly.
 The proper type encoders are not cheap and I have found in the past it is much cheaper to get a smaller motor off eBay that has the correct type encoder and just pull the encoder and put it on the bigger motors. Few things you need to know about that however is that the pole pairs are the same and also you really need the shaft size where the encoder mounts to be the same although you could make extension shafts or sleeves if its not.

Wiring up the motors to the drives are fairly straightforward, the drives can accept single ended outputs for Step/Dir but I prefer to use the Differential inputs. As the signals from Mach are single ended you need to make up a small circuit and use a line driver to turn them into differential outputs but as said its not needed but preferred to help with noise immunity.

Hood
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 22, 2010, 03:40:28 PM
Starting to make sense to me..

Here's a pic showing the pin assignment for the motor.

Maybe you can tell me what pins on the motor go to what pins on the drive?

Thanks again for your help here!
Title: Re: Help with servos and drives.
Post by: Hood on January 22, 2010, 04:05:36 PM
I am not sure if you can use that encoder or not. I have similar setup on the spindle of my mill with the Sine Cosine encoder but it is an intelligent encoder and has the info for drive setup in it and it is an Allen Bradley motor (same as G&L)
 I will have a look later to see if I think it will work but at the moment I am thinking if it will work it will need to be connected in a similar way to the MPL motors, cant remember if G&L call them MPL  but its similar.
 What drive model do you have?

Hood
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 22, 2010, 04:13:58 PM
model DSA 030-230

Thanks
Title: Re: Help with servos and drives.
Post by: Hood on January 22, 2010, 05:22:14 PM
Nice drive, I use them on my mill and lathe :)
Not had a chance to look yet but will try later or tomorrow but I am thinking the intelligent encoders have 9V so that might not work for you.
Hood
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 22, 2010, 07:11:42 PM
I pulled apart some Mitsubishi servos that looked as though the had gone bad due to bearing failure. I've got 5 or 6 of them so I'll look into what type of encoders are on them.  Good advice to find encoders on smaller less expensive motors!

Thanks again,
Title: Re: Help with servos and drives.
Post by: Hood on January 22, 2010, 07:31:35 PM
Just looked at the motor config utility in the drive setup software and seems you can set up a Sine/Cosine encoder and use Hall Inputs for startup commutation so chances are your encoder would work fine.
You would need to make a custom motor profile and then load that into the drive via serial, do you have the DSAPro software?
Hood
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 23, 2010, 04:43:41 AM
I don't think I have DSA Pro. I have a CD from G&L labled picpro but I've no idea what's on it. This is really new to me.   Is DSAPro something I can D/L from the G&L website?
Title: Re: Help with servos and drives.
Post by: Hood on January 23, 2010, 07:39:12 AM
PicPro is no use but yes you can download DSAPro form here http://www.glcontrols.com/Support/Downloads/Product/DSAProV1_5.zip
When you install make sure you select the complete install option as that will give you the motor config utility which will allow you to set up a custom motor profile.
Have a mess around with it and any questions just ask, you will need a serial cable to connect your drive to the computer so you can view and change the drives parameters etc, easy enough to make one up as you only need the three wires.
Hood
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 23, 2010, 09:45:00 AM
Great, thanks.  I'll get it installed and make up a cable and will no doubt have more questions ..
Title: Re: Help with servos and drives.
Post by: Hood on January 23, 2010, 10:39:48 AM
Meant to say you can actually mess about with things without the drive connected just to see whats in there by clicking File New and then adding an offline drive.
Hood
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 23, 2010, 12:52:11 PM
I got the software installed and the drive conected to the pc but the software doesn't see the drive for some reason?

Any ideas?

Drive powered up but with no motor conected to it.

Drive flashes E  then 1, 1 repeat...
Title: Re: Help with servos and drives.
Post by: Hood on January 23, 2010, 01:32:11 PM
Dont worry about the error, E11 is illegal hall state and as you have no motor connected you would get that or 04 which is Motor Overtemp.
You may have to try and find what the port needs to be set to, you can get the software to attempt that, go to Tools menu then Recover Comms and follow the instructions.
If you still dont get it working make sure your serial cable has cross over between pins 2 and 3.

Hood
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 23, 2010, 02:33:16 PM
looks like the cable didnt' have pass through. OK, I need pins two and three and pin 1?
Title: Re: Help with servos and drives.
Post by: Hood on January 23, 2010, 02:41:17 PM
No, pin 2, 3 and 5 on the serial.
You connect
pin 5 on drive to pin 5 on computer
pin 2 on drive to pin 3 on computer
pin 3 on drive to pin 2 on computer.


Hood
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 23, 2010, 07:19:22 PM
OK, tried that. I had initially used a standard serial cable but I cut the wires and mapped them out. I connected pin 5 to 5 (just as it was) and then swapped the 2 for 3 and 3 for 2.

Still doesn't detect the drive?  Any ideas?
Title: Re: Help with servos and drives.
Post by: Hood on January 23, 2010, 07:21:31 PM
have you tried the auto recover thing?
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 23, 2010, 07:23:14 PM
how do I do that?
Title: Re: Help with servos and drives.
Post by: Hood on January 23, 2010, 07:24:47 PM
Tools menu then recover communications and follow instructions.
Hood
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 24, 2010, 10:30:17 AM
Success!  Now I just need to figure out what all those settings mean.  I'm guessing I'll need to gather some data on both the motors and encoders?
Title: Re: Help with servos and drives.
Post by: Hood on January 24, 2010, 12:04:11 PM
Great :)
Do you have the manuals for the drives? You will find them on the GLControls website.
Not sure if G&L manuals show the connection for sine/cosine encoders but as your motors are  not standard ones for these drives you will sort of have to mix and match anyway.
Going by your drawing you will need to connect up as follows (I think),

Motor     Drive CN2
A              1     
B              2
C              3
D              4
E              5
F              10
G              6
H             14
K             12
L             11
M            13
P             8

If yours has a brake you will connect via the relay output (43 and 44)  on CN1 connector and supply it with the required voltage.

You will also have to make up a custom motor profile, you can do that by using the Motor Config utility that will be in your windows  start menu, programmes, DSAPro menu.

Need any help just shout.
Hood
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 24, 2010, 12:22:19 PM
Think I understand. Pins from the J2 conector on the drive to the encoder connector on the motor.
Title: Re: Help with servos and drives.
Post by: Hood on January 24, 2010, 12:52:48 PM
Ah sorry, Allan Bradley call the connectors CN1, CN2 etc G&L call them J1, J2 etc.

Hood
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 26, 2010, 07:13:13 AM
I should have everything hooked up from the encoder to the drive later today. I replaced the military style wiring connectors on the Aerotech motor with a different style that I have plenty of.

Once I have the encoder wired to the drive and the motor wires connected what is the next step?  I'm not sure what inputs and outputs get connected to the parallel port and what settings I need in Mach.
Title: Re: Help with servos and drives.
Post by: Hood on January 26, 2010, 07:58:56 AM
I would not bother connecting to Mach at this stage, just set the motor  up in the drive and do the tuning etc from within the drive. You will as I said have to make up a custom motor profile and then load from the drive software. In fact I wouldnt even hook up the motor until that was loaded.

Hood
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 26, 2010, 11:15:06 AM
As it turns out the drives were set up to run these aerotech motors.  I had forgotten that they both the drives and the motors came off the same equipment.

I'm getting really lost with all the motor parameters etc.  Is there a way I can save a motor profile and upload it to you so can have a look?
Title: Re: Help with servos and drives.
Post by: Hood on January 26, 2010, 11:18:26 AM
You can export the setup, If I recall you right click on the drive, first part in the tree on the left and then choose export.
Hood
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 26, 2010, 11:51:26 AM
I"ll try that..  One other question. The motor connections on the drive are labled R,S,T, . Is it important how these connect to the motor?
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 26, 2010, 12:07:37 PM
I had to change the file extension to .txt so the forum would allow me to upload it.

Here it is.  Hope it makes more sense to you then me.
Title: Re: Help with servos and drives.
Post by: Hood on January 26, 2010, 01:39:34 PM
Ok have it open, what exactly are you having problems with, there are a lot of settings, a lot of which wont really matter.
Hood
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 26, 2010, 01:57:12 PM
got into the DSAPro communtation Diagnostics.

I run a test at 10%,  The motor moves but somewhat erraticly and the software recomends wiring changes "V conection move to W,  W connection move to V"

I have no idea what a V or a W connection is?
Title: Re: Help with servos and drives.
Post by: Hood on January 26, 2010, 02:03:22 PM
Its the terminals your motor connects to on the drive, U V W or can also be R S T.
It varies from drive to drive in the model  range, so if your drive has R S T then you need to swap the wire thats on S and put it on T and the one thats on T put on S, make sure the drives powered down fist though ;D


Hood
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 26, 2010, 02:16:33 PM
OK, no more errors there after making that change.  It's telling me to set the hall to 300 degrees?
Title: Re: Help with servos and drives.
Post by: Tristar500 on January 28, 2010, 07:47:51 PM
OK, all, Hood in Scotland was invaluable in got me pointed in the right direction.  I've got G&L drives working and motors tuned, interfaced with Mach!

Good stuff, great camaraderie, This site rocks!

Hope I can return the favor and help the next person move forward!

Best, Tristar500
Title: Re: Help with servos and drives.
Post by: Hood on January 28, 2010, 08:10:27 PM
Great to hear :)
If you are  wanting the details of the line driver for the board I made up for myself give me a shout again on skype and I will send the pdf over.
Hood
Title: Re: Help with servos and drives.
Post by: Tristar500 on February 02, 2010, 07:36:57 PM
Hey Hood, still working out the details of the final shape of the machine frame.

If you like you could post the line driver PDF here?

TS500
Title: Re: Help with servos and drives.
Post by: jorber on April 14, 2010, 09:16:35 PM
Wiring up the motors to the drives are fairly straightforward, the drives can accept single ended outputs for Step/Dir but I prefer to use the Differential inputs. As the signals from Mach are single ended you need to make up a small circuit and use a line driver to turn them into differential outputs but as said its not needed but preferred to help with noise immunity.

Hood

can you help me with the circuit to turn single end outputs to differential outputs? I have a servo drive that only accept differential signal and I want to use mach3, thanks in advance, JB
Title: Re: Help with servos and drives.
Post by: Hood on April 19, 2010, 07:27:58 PM
Sorry, not sure how I missed this :(
I just used a couple of quad line driver chips, thought I might have needed some resistors on the outputs but didnt so its very straightforward and works well.
This is the line driver I used http://uk.rs-online.com/web/search/searchBrowseAction.html?method=getProduct&R=630-875

Hood