Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: tasbiz on September 12, 2014, 09:47:52 PM

Title: Servo for lathe spindle ?
Post by: tasbiz on September 12, 2014, 09:47:52 PM
 Hi everybody,

I am refurbishing my Wabeco ccd6000 lathe with servos in X and Y axis.
I am just starting to use "servos" for the first time and i am installing 2 Delta ecma servo motors AC to the x and y axis on my old wabeco lathe.The controller is csmio - a  with the enc and mpg modules.
For the spindle i would like to improve and change the original motor with either a ac motor driven with a vfd OR a AC servo and driver.The spindle is belt driven so i would like to either use a toothed belt instead of the original one which is not toothed.I have seen servo driven spindles but some people are saying that -apart from spending a lot of money for a servo and driver-by belt  there is too much resonance and is NOT going to work(i.e. the connection motor to spindle should be rigid).I would like to be able to have the servo precision and even be able to do rigid tapping (which i thing is only possible with a servo driven spindle).
The original motor is a dc 1400W motor 5000rpm getting reduced by the pulleys to 2300rpm and rpms are adjusted by a potentiometer from 250 to 2300rpm.Or if i want to go lower than that i have to change the pulleys ratio and go from 50 to 500rpm.
 So my 2 questions are:( if cost is not so important) :
1.will it work if i install a servo and be able to drive from 0-2300 rpm with enough torque even in very low rpm? and will i be able to do rigid tapping?
and 2. what servo (i.e. how many KW-rpm) should i buy to use in the spindle for that?
Please help...
Title: Re: Servo for lathe spindle ?
Post by: Dan13 on September 13, 2014, 03:31:13 AM
I am using AC servos for driving the spindle on two lathes and a mill. All are timing belt driven. I am VERY happy with them, and if money is not an issue I would use AC servo on any machine I shall ever do. I can do rigid tapping on all the machines, and some other things. Check out this video, where I am cutting a hex on my wee lathe:
http://youtu.be/DajrTlI8IWA

Also, I should note that as far as I know the CSMIO supports rigid tapping with any spindle motor provided it has an encoder.

Delta servos are excellent. Properly tuned you should not experience resonance. However, if you belt is too long you may need to use some tension wheels along the way. AC servos have full torque starting from zero rpm. You can run it in the rpm range you ask. Your original motor 1400W @5000rpm provides a nominal torque of about 2.6Nm. If this satisfies your needs, then this is the torque I would go for when picking a new motor.

Dan
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 13, 2014, 10:54:01 AM
 Hi Dan 13,

VERY IMPRESSIVE!!

What controller are you using?
And what software to design-make the g-code?

Thank you for your help very much.You see i am totally new to servos and i need all the help i can get...

Best regards,

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: Dan13 on September 13, 2014, 02:56:22 PM
I am using a USB SmoothStepper on the mill and the lathe in the video. The other lathe has the Ethernet SmoothStepper. If you're referring to the gcode in the video cutting the hex, it is a parametric Gcode I wrote.

Dan
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 27, 2014, 06:42:24 PM
Hi Dan13 and everybody...
I have finished the controller and managed to tune the servos (just the servos without the controller CSMIO/IP-A) but i CANNOT make the servos work with Mach3 and the CSMIO.I dont know what to do.I am not even sure that the connection is OK.I can jog the servos from their drives OK but from Mach3... NOTHING!! :'( :'( I have managed to get the leds on the controller to show ready state BUT if i try to jog the motors nothing is happening.I am LOST i am LOST...
Can please anybody help?

Reagards to all,

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: Dan13 on September 28, 2014, 03:51:59 AM
What servo drives are you using? You need to set them to analogue input if you're using the CSMIO/IP-A.

Dan
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 28, 2014, 04:34:33 AM
Do you mean Torque mode?
How do you set analogue input?
I am using delta drives...
Title: Re: Servo for lathe spindle ?
Post by: Dan13 on September 28, 2014, 05:20:20 AM
Please provide a link to the drive you're using.

Dan
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 28, 2014, 07:01:31 AM
http://www.delta.com.tw/product/em/motion/motion_servo/motion_servo_product.asp?pid=2&cid=1&itid=6

I managed to make them work (i found how to switch them to torque mode)but they work realy strange from mach3.It seems that no matter what i do with the settings of either mach3 or csmio when i press the jog button the axis moves in very high velocity till it hits the limit button and stops.Could it be that i am using windows 8.1 64 bit?
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 28, 2014, 07:03:12 AM
it appears in the diagnostics that win 8.1 and csmio are connected ok though...
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 28, 2014, 07:05:30 AM
sorry the drives are delta asda b2 750W and the motors ac servos delta as well..
Title: Re: Servo for lathe spindle ?
Post by: Dan13 on September 28, 2014, 07:07:46 AM
Can you see the voltage going out of the CSMIO on the diagnostic page?

Dan
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 28, 2014, 07:42:42 AM
yes
everything looks ok
i even installed a potentiometer and i can adjust it(fro) btw 0-10v and i can see it on the screen graph.
even with 0.7v it happens.only it stops because of e-pid in mach3 sending error and the drive stops because of that...
When i work and jog the drives from the delta driver everything is smooth and nice...
Title: Re: Servo for lathe spindle ?
Post by: Dan13 on September 28, 2014, 09:22:56 AM
Did you follow the Delta manual exactly? Did you set parameter P1-01 correctly? I believe it is something with the settings or the wiring of the servo drive.

Dan
Title: Re: Servo for lathe spindle ?
Post by: Hood on September 28, 2014, 02:27:34 PM
Have you tuned the motors in the IP-A plugin?
Try inverting the encoders in the CSMIO/IP-A plugin and see if that helps.
Also make sure you have the correct number entered for you encoders.

Hood
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 28, 2014, 06:22:58 PM
Hi Hood!
I have been following your posts for quite a while and that is how i decided to get csmio!
Problem is i am not as experienced as you and Dan13 so i am spending hours and hours... :-[
I have tuned the motors with the drives.When i try to tune them with the plugin is almost impossible.The axis is moving very fast until it hits the limit switch.I have tried to tune the second axis to check if something is different but nope...
I have checked my cabling again and again but i dont see any mistake.Do you have any wiring diagram for connecting csmio a with a driver ?
In their site they show a connection with csmip s and a delta drive but i dont have step - dir so it must be different.
Do i have to supply 24v or 10v or 5v at the csmio encoder side connection to the encoder cables (6 pairs) that come from the drive? I am a totally new to servos so i don't know anything...!!
I have tried changing encoder numbers in the plugin but no good
Now when i try to jog the servo from the drive (not from mach) it moves and and as soon as i release the jog button comes back to where it was before jogging it...??
Dan 13: I have the servo changed into torque mode with P101 command.Before that it wouldn't jog at all(no analogue signal from csmio -it needed a pulse for position mode)
Thank you both for your help.I really appreciate it.If you ever come to Greece for vacation or something please let me know..
Thanks again guys!



Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 28, 2014, 06:25:35 PM
Hood: sorry i meant 6 cables coming from the encoders ( i.e. a+ a- b+ b- and z+ z-)
Title: Re: Servo for lathe spindle ?
Post by: Hood on September 28, 2014, 06:47:23 PM
 You should not need to connect the 5v from the CSMIO to your encoder as it will be getting supplied from the drive already. You will be using the buffered (or possibly un-buffered)  encoder outputs from the drive to connect to the CSMIO.


You should be able to go into Mach and then into the CSMIO plugin and then into the axis tuning. With the reset still flashing in Mach you should then be able to rotate the motor manually and you should see the encoder count increasing or decreasing in the plugin tuning page.


If you do see the encoder count moving then what I would suggest is you choose the Invert box on the axis page to invert the encoder signals, see if that helps as it could be it is reading the encoder the wrong direction and thus it sees the motor moving the wrong direction and increases the voltage to try and correct.

Let me know how you get on, will check back tomorrow and see.

Hood
Title: Re: Servo for lathe spindle ?
Post by: Hood on September 28, 2014, 06:49:46 PM
This is the box I am meaning, try changing it to the opposite of what you have now.
Hood
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 29, 2014, 04:34:29 AM
Hi Hood,

I could not see the dros of mach moving but changing the dac nr and thr resolution of motor now i can see them in z axis with manual turning the axis.In x axis i cannot see any change in mach dro.I have removed all cables from csmio except the ones for the limit switches the e stop and the encoders.I have even changed to enc 2 input but no difference.the numbers are changing in the drive's panel but not on mach.idont get any fault or alarm condition.Should i try the enc 3 input(on the next connector?)? Do you think i have burned the csmio enc i/o input 1,2?or even have i damaged the servo encoder?
This think is driving me crazy...I have spent the whole weekend trying to solve it but.... :'(

Thanks
Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: Hood on September 29, 2014, 05:12:21 AM
If you attach your xml I will be able to see how you have things set up and it will save me from asking a lot of questions.

Also if you could maybe take a couple of photos of the connections on CSMIO and also on drive, then that would help.
Hood
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 29, 2014, 12:18:29 PM
Hi ...
i have disconected everything but the encoders
here are some pictures..
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 29, 2014, 12:21:36 PM
more...
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 29, 2014, 12:22:12 PM
even more...
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 29, 2014, 12:24:08 PM
sorry here...
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 29, 2014, 12:37:20 PM
... the xml...
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 29, 2014, 01:21:46 PM
...i forgot there was a sticker on the drive ...
i attach it here...i have tried connecting like that but...
Title: Re: Servo for lathe spindle ?
Post by: Hood on September 29, 2014, 01:35:31 PM
The wiring seems to be correct in as much as I can see. That is assuming of course that they are corrected to the correct pins on the servo drives.

The pic you have just attached does not matter as that is for Step/Dir input and you are set up for +/-10v so are not using step/dir.

In Mach I see you have 2500 steps per unit set, that is possibly incorrect as I think your encoder will be 2500 line or 10,000 pulse per rev. You will then need to work out how far the axis travels per motor rev to get the steps per unit.
For example if you have the motors coupled 1:1 to the ballscrew and the ballscrew pitch is 5mm then your steps per unit will be 10,000/5 = 2,000

Hood

Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 29, 2014, 01:59:55 PM
ok thanks for looking at the pictures-xml.
now the 2500 works in z axis motor-drive and i can see the mach encoder moving but not on the x axis.I have possibly scr..d up something in the drive's parameters in x axis and i don't know how to reset to defaull values and restart from there...
also if i give 1.5volt from a battery to the vref cable the motor(X) still doesn't move...
(or i have burned something in the encoder output of x axis.in that case though i should get a fault alarm condition which i don't...?)
what if i try connecting to another encoder input (nr 3 4 or 5) of csmio?
basically there are two problems:
1.the encoder (x) does not communicate correctly to the mach and
2.the csmio doesnot move the motor-drive (x)
.....
Title: Re: Servo for lathe spindle ?
Post by: Hood on September 29, 2014, 02:07:35 PM
is it possible just to swap the plug on the drives? That way you should be able to see if you get the other drive working.
Failing that you could rewire to another encoder input on the CSMIO and you will just need to tell the plugin which enc input you are using for that axis.
Hood
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 29, 2014, 02:55:43 PM
 I just did.
the motors- encoders are ok.
it is the drive...
strange fact though is that it is changing numbers when i manually move the motor on it's own panel
and there is no error report
it appears that the drive's panel shows a different mode. one with dots in between the numbers
on the other (normally working ) drive there are no dots..
Title: Re: Servo for lathe spindle ?
Post by: Dan13 on September 29, 2014, 03:01:44 PM
You can save the settings from the working drive to the PC and load them to the other drives.

Dan
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 29, 2014, 03:45:19 PM
Hi Dan13,
I just did.
Same problem.
I guess that i have to order a new drive...
Title: Re: Servo for lathe spindle ?
Post by: Dan13 on September 29, 2014, 03:59:19 PM
Try reset to factory defaults first.

Dan
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 29, 2014, 04:17:28 PM
 I cannot find how to do that

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 29, 2014, 04:33:54 PM
 I found how you do it and i did it.Same problem... :'(
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 29, 2014, 05:12:08 PM
thank you both for your help!
Goodnight!

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 30, 2014, 04:31:13 AM
Hi again,
I was thinking: before buying a new driver for the servo since the input from the encoder to the driver is ok and the problem is only in the pins of the controller that giveout the encoder channels to the csmio could i try to connect directly the servo encoder to the csmio and let the driver handle the servo motor power?Would it work?
Thank you,
Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: Dan13 on September 30, 2014, 04:47:46 AM
I didn't read all your posts from yesterday, so don't know how you arrived at the conclusion that it is the encoder outputs from the drives that are not functioning, but connecting the encoders directly to the CSMIO should work I think. You will need to use a line driver and supply 5V to the encoders.

Dan
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 30, 2014, 05:04:46 AM
Hi Dan,
it is only on one of the 2 drives.The other is functioning ok.
What is a line driver?Don't i connect directly the 6 motor encoder cables to the csmio providing 5volts to the other 2 (vdd and gnd)?
Title: Re: Servo for lathe spindle ?
Post by: Dan13 on September 30, 2014, 07:09:03 AM
You can try connecting the signals directly, but usually encoders output weak signals so a line drive would be preferable:

http://www.cnc4pc.com/Store/osc/product_info.php?products_id=337&osCsid=53062d4f014880b38fc29ac5affa980c

Dan
Title: Re: Servo for lathe spindle ?
Post by: Dan13 on September 30, 2014, 08:10:19 AM
Forgot to say. You can measure the output signal from the encoder, if you see it's a good 5V then a line driver may not be necessary.

Dan
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 30, 2014, 08:17:54 AM
thanks Dan,i will measure tonight and see...
Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: Hood on September 30, 2014, 02:53:54 PM
Some drives have two sets of outputs for the encoders,  pass through and buffered, not sure if yours have that option?

Hood
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on September 30, 2014, 04:53:03 PM
 Dan13: I have measured: 3.6Volts btween A+ A-  B+ B- and Z+ Z-.In the drive with the problem only difference is A+ A- is 1.5V.Opened the drive.Looks repairable.I will check more tommorow...
Hood: Unfortunately mine does not have a pass through...

Thanks guys..I feel you are still with me...
I appreciate that...a lot!

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 01, 2014, 04:49:48 AM
 I think that i found it!!
There is a IC that is a line driver which causes the problem.I have ordered it (1,1 Euro ) and hopefully is going to make the driver ok again!!
 Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: Dan13 on October 01, 2014, 08:54:49 AM
Sounds good!

Dan
Title: Re: Servo for lathe spindle ?
Post by: Hood on October 02, 2014, 04:22:17 AM
Had to replace a line driver in one of the Allen Bradley drives I have here, was my own fault, had wired up the encoder wrongly and had connected the 9v rather than the 5v (smart encoders require 9v but this was normal incremental) and not only blew the line driver but also the encoder. I hopefully wont be making that mistake again :D
 Hood
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 03, 2014, 10:42:30 AM
Hi Hood Dan13 and everybody!
I have to HAPPILY report that problem is SOLVED!!!
The drive is back to normal after i changed the line driver chip!!!
Very happy with it!
Another question: I am trying to tune the servos with CSMIO A and even though i have tuned them with the drive and everything is OK when i connect them to the csmio they start to move in one direction veeeery slowly.I have tried to alter the rigid hold values but this is not stopping.They jog ok but when i let the jog buttons they are back to singing-moving very slowly towards one (always the same direction).I tried to use a DAC value in CSMIO plugin and that seems to correct it but not 100%.I measured 200mvolts on the analog output.How can i correct that?Can you help please?
Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: Dan13 on October 03, 2014, 11:07:47 AM
Glad to hear it was an easy fix for you.

The DAC offset is the setting that should fix your drift issue. Hood is more experienced with analogue, and I believe he will be of greater help as to why it doesn't solve your issue completely.

Dan
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 03, 2014, 11:22:57 AM
 Dan: DAC offset is very very delicate.I have to adjust to0.0..something....
Let's hope Hood is going to help on that..
One more quetion:do you know if there are issues if i run mach3 under windows 8.1 64 bit?
Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: Hood on October 03, 2014, 12:42:39 PM
Good you got the drive sorted :)

Are you entering values into the DAC box? If you are you should not do that, you just press the button at the side and it gets automatically set.

If you have been pressing the button and are still getting the issue then I wonder if you possibly have some noise on the encoder output wires from the drive, have you got twisted pairs for them?

Regarding W8, never used it but the CS-Lab site seems to suggest it should be fine.

Hood
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 03, 2014, 02:43:21 PM
Hi Hood,
no the wires are twisted but not properly done yet because i was looking all around for the problem.But is noise a reason for having the motor moving?
Perhaps is a wiring problem.When i program the servo for torque mode i don't get this (but i cannot set tune the motors).When i program it for Speed mode i get it.The problem is in Delta's instructions example it shows V-ref AND T-ref connected either for speed mode or for torque mode with 2 different +- 10V signals.Is that correct?I am totally confused about this.
Also should i connect Com+  of the drive with the encoder? CS lab suggests that somewhere...
Please since you are very experienced with Analog CSMIO help me on those matters..
If you have a simple drawing of the very basic connections between CS and drive (encoders and limits i have connected already and are working fine)...

Thank you in advance,
Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: Hood on October 03, 2014, 03:41:28 PM
If there is noise on the encoder inputs then there may be the potential for the IP-A to think the axis is moving  and apply a voltage to move it in the opposite direction so as to make it stand still, so noise could possibly be an issue.

You say you can jog fine, is that from within the tuning page?
Have you got a massive error amount set? and when you jog does it constantly increase? Or is it relatively steady?

Did you press the DAC button or enter the value manually?

Not sure what you mean by Com+ but the way I have my encoder signals connected to CSMIO are with the A/A- B/B- I/I- signals connected, I also have the 0V from the encoder output of my drives connected to the Gnd for that encoder input on the CSMIO. I do NOT have the 5v connected as I do not need to power the encoder.

Does the drives manual not show how its I/O are connected? If you are not sure post a screengrab and I can take a look.

Hood
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 03, 2014, 04:30:58 PM
 Yes I can jog fine from the tuning page.Now i am at a point where finally the tuning screen works ok in csmio.It is very smooth and nice.But...
If i try to jog from Mach3 screen(after the tuning) the the motor is getting to full speed until it hits on the limit button... :-[.It appears that is getting a lot of acceleration very very fast(no time to hit e-stop button)
I am attaching 2 screenshots.In 1 you can see that the GND is connected to Com+ (nr 11) and this goes to 24V-.
In the other you can see the 2 different +-10v connections to the V-ref and T-ref respectively.
Please have a look and tell me what you think...

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 03, 2014, 04:33:46 PM
 Why do you connect the 0v from encoder to ground of csmio?
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 03, 2014, 04:37:31 PM
Sorry i forgot.
I have set a massive error amount set...
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 03, 2014, 04:48:01 PM
additionally:
when i jog from mach from the keyboard with slowjog rate up to 30% it jogs ok if i jog more than 40% it is moving really fast and hits the limits.
if i have it on 30 or 20% and try to press shift and jog it is very fast agai and hits the limits...
Now i know why they say that servo tuning is very hard...

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: Hood on October 03, 2014, 05:48:46 PM
Ok what do you have set for the max RPM in your servo drive?
What do you have set for the max Velocity in Motor Tuning in Mach?
Do you have any reduction between motor and screw?
What is the pitch of the screw.


Where have you got the +/-10v output wires connected on the Drive?

Regarding your pics above, it looks like your drives inputs are sourcing only, that is a bit of a pain as the outputs from the CSMIO are also sourcing. That means you would need to use something like a relay if you are wanting to connect outputs from the CSMIO to Inputs on the drive.
You may be able to select to have the drives inputs as Sinking but from the above pic it does not look like it.

Hood

 
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 03, 2014, 10:28:23 PM
Max RPM on drive is by default 3000RPM (i haven't set it but is programmable)
Max velocity in Mach:(i started with low value 200RPM and then increased to 500 and 1000.After every change i redid the tuning)
I have a 0.8 reduction (i go from 24 to teeth on the servo to 30 tooth in ballscrews).My ballscrews are 16mm diameter 5mm pitch.
The +- 10V wires that go to the drive i get from +- analogue i/o outputs of CSMIO.
Sourcing vs sinking ? (sorry i don't know what that means-but i will search on the internet)

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 03, 2014, 10:30:45 PM
The wires on the drive are connected +10V to V-ref and -10V to GND (Nr 20 and 19 respectively)

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 03, 2014, 11:03:00 PM
I attach some pictures of wiring
Please have a look

Tasbiz

PS: I am also giving you a link(i hope i am not asking for too much) to Delta's download of the manual of the drives...
http://www.delta.com.tw/product/em/motion/motion_servo/download/manual/DELTA_ASDA-B2_M_EN_20130906.pdf
Title: Re: Servo for lathe spindle ?
Post by: Hood on October 04, 2014, 07:07:47 AM
Ok I would suggest you have the drives RPM and the Velocity set in Mach to equal one another, that however does not mean the same numbers as one is RPM and the other axis Velocity.

The reason I suggest that is because you are using a +/-10  voltage to define the Velocity and if the drive thinks 10v = 3000rpm but the CSMIO thinks 10v is something else then you may be running into difficulty.

Ok so if 10v = 3000rpm in your drive then the velocity in Mach you want is -

3000 rpm of motor  x 0.8 reduction =  2400 rpm on ballscrew
Velocity = 2400 rpm of ballscrew x 5mm pitch of the screw = 12,000mm/min

Another thing to note is you need the correct Steps per Unit set for each axis, I think you have a 2500 line encoder so that would mean your actual count as far as Mach is concerned is 2,500 x 4 = 10,000 counts per rev.
Now your reduction comes into play here so for 1 rev of the ballscrew that would be 10,000 x 0.8 = 8,000, this however is per ballscrew revolution, so your steps per unit (mm in your case) would be 8,000/5 =  1,600, so  your steps per unit in Mach would be 1,600.


Regarding Sinking and Sourcing.

If an Input is Sinking it means you have voltage going into the input and the drive sinks it to Gnd/com-/0v
If and Input is Sourcing it means voltage is coming out of the Input and your connected device sinks it to Gnd/com-/0v

Same idea for outputs.

I will have a look at the manual later today to see if the Inputs can be configured sink or source as often they can be.

Note the Sink/Source I am talking about is for the digital I/O of your drive and not the analogue or encoder I/O, you have no problems with these.

I also forgot to respond to an earlier point where I said I also had the Gnd of CSMIO connected to the Encoder Gnd of my drives. My drives have that possibility but it looks like yours do not. It is not required but as mine have that I prefer to connect it.

Hood
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 04, 2014, 08:09:26 AM
 Thank you Hood,
I will do as you say.
I have a suspicion.When you look into the manual please see.It looks to me that by default the drive comes with 3 integral speeds saved i.e. 1000 2000 and 3000 rpm.To use an external analogue 0-10V signal for speed I think i have to disable those.Something is mentioned in the manual but i am not sure how to do it.That however makes sense to me- as i jog if the voltage rises further than a certain point in the input of the drive the drive switches to integral speed no2 or even 3- and that explains perhaps the sudden increases in speed while i jog.Could i be right?

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 04, 2014, 12:25:50 PM
 I found a quick start guide for setting up the drives
I attach it.It is very short...
Please have a look...

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 04, 2014, 01:14:40 PM
Do you think i would go beter if i was using CSMIO-S instead of analogue?

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: Hood on October 04, 2014, 06:34:51 PM
The IP-S would undoubtedly be easier to set up but when you get the IP-A set up you will be happy you went that route as it has benefits. One example is that you only have to reference the machine once at start up of Mach and you can be sure that the axes are exactly where Mach thinks they are until you shut Mach down again. The reason for that is the encoders are constantly monitored even when the drives are disabled (assuming the logic side of the drive is still live) , so even moving the axis by hand Mach will know where they are. Similarly if you hit a limit or even E-Stop the machine, Mach still knows exactly where it is as the position is updated from the encoders.
With the IP-S you really need to re-reference each time you take Mach out of reset as the axes could have moved slightly after being disabled and again when enabling.


Ok had a quick look at the manual, P1-40 seems to be where you set the speed to correspond to 10v, I think that will be set to the rated speed of your motor by default and that is what you really want unless you think the rapid is too fast at that. If you wish to set a slower rapid in Mach (Velocity entry) then work out what motor RPM would be needed for that Velocity and set that up in the drive.
In your case that would be done by Velocity divided by 5(pitch of ballscrew) then that value divided by 0.8 ( reduction)

Regarding the Speed mode, this is my understanding from a quick read.
You have a choice of External and Internal speed commands, you want external as you will be controlling from the +/- 10v output from the IP-A.
 If you have SPD0 and SPD1 unconnected then that will put the drive into S1 mode which is external speed control.

Hood

Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 05, 2014, 05:13:11 AM
 Hi Hood ,
I have tried switching the motor to torque mode and retune...
With Speed mode thinks are very immediate for me...
After fiddling around and ofcourse setting P1 40 to a lower setting (1750 RPM),
I thing that i need to change my gear ratio from 0.8 to 0.5 or lower (change the ballscrew gear to bigger one).That way the speed of the motor can be as high as 3000 rpm but the rapids are going to be lower.
Do you agree i should do that?

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 05, 2014, 12:39:12 PM
 No success!!  :'(
I have switched the servo back to Speed mode.It looks like it works better in that mode than in any other that i have tried...
The csmio doesnot put a kd value in autotune mode.Should i try and put something myself?

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: Hood on October 05, 2014, 02:41:00 PM
Ok so what is happening now that you have lowered the RPM in the servo drive to 1750rpm and have it in Speed mode?
Do you have Velocity in Mach set to 7000?

You could decrease the ratio but it would give you less torque and I do not think it will help you any.

Yes, auto tuning in the CSMIO likely wont get you perfect results, I used it to get me some numbers then just messed about from there. What I did was just set it up in the plugins tuning page to move back and forth and adjusted the settings one at a time, increasing or decreasing just one of them until I got the best error then moved on to the next setting and doing the same.

Hood
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 05, 2014, 02:56:13 PM
 Hi,
No it is impossible to get 7000 in Mach.Even with 3000 a lot of vibration and the servo behaves unpredictibly.
I went back to original settings of the drive.Then set it for speed mode.Then messed around all day with it.Lowered Mach speed to 1000rpm.Now i can jog smoothly up to 60%.Make it 65% and the drive vibrates hard back and forth.I am trying to read how to use scope that is integrated in Delta's software for tuning the drive.Trying to put Notch filters values where the resonance happens to smooth it out further...
By changing the gear it should increase the torque (i think) because i was thinking of using a bigger 60 teeth gear on the ballscrew so the ratio (having the same gear in the servo i.e. 24teeth-and having the same rpm in the servo)would be less turns for the ballscrew but with more torque isn't it?I was thinking this would possibly smooth things out a bit...

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: Hood on October 05, 2014, 03:06:07 PM
Ok I misunderstood regards the reduction, I still do not think it will help, it sounds like you need to play around with  the tuning in the CSMIO.

I am assuming your tuning from within the servo drive is good? ie when moving from the servo drives software itself.

Might be worth turning off the constant tuning in the drive, that is if you have that switched on and trying the semi auto mode or manual mode.

Hood
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 05, 2014, 03:31:56 PM
 Tuning from the servo drives software is perfect.Always without a problem-even from the start...I wish i could get so smooth movements from CSMIO as well...
I will try to semiauto..

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 06, 2014, 02:41:45 PM
 Making some progress using manual and semi-auto tuning methods...
I have a strange problem: No matter what i do with the tuning,when i jog from mach or csmio what happens is jogging to the right is smooth but when jogging to the left the servo is very much faster and just by a short stroke of jog it picks up speed and goes and hits the left limit button...
Any ideas?

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 06, 2014, 03:53:34 PM
 That is when i jog with 100% slow jog rate...
Title: Re: Servo for lathe spindle ?
Post by: Hood on October 06, 2014, 04:35:01 PM
Something strange there, almost like your encoder signal is fine one way but not the other.
Do you have this problem at lower rates, maybe 50% in CSMIO tuning screen?
Have you tried just commanding a small move back and forth in the tuning screen to see if the distance is the same both ways?

Hood
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 06, 2014, 04:39:54 PM
 No up to 55% everything is smooth and normal.
After some more tuning it appears that i need to increase the acceleration a lot in Mach motor configuration.Someting like 3000 or even 5000 acceleration rate.That is with 1000 motor speed.That way jog works at 100% both ways.Is that normal?

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 06, 2014, 04:40:54 PM
If i try then to increase motor speed to let's say 1300 in Mach same thing happens...
Title: Re: Servo for lathe spindle ?
Post by: Hood on October 06, 2014, 04:46:11 PM
3,000 or more for accel seems high, suppose it depends on the machine, on a very light machine that may be doable and acceptable, on a heavier machine I think you would get a lot of jerking and banging.

On my Chiron I think I have around about 1,000, maybe 1,200, cant remember for sure.

Hood
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 06, 2014, 04:49:58 PM
Strange to me is the higher acceleration seems to correct the problem.Before that i had acceleration of 200 only and i could not tune the motor (very unstable)...

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: Hood on October 06, 2014, 04:58:40 PM
200 is definitely very slow accel for a servo and may have been an issue.

What kind of machine is it, size/ weight?
If you attach your latest xml I will have another look and see if anything jumps out as being wrong.

Still strange that one direction is fine but not the other, as mentioned earlier it almost sounds like a runaway situation that you would possibly get if the encoder was not being seen as the control would just keep increasing the voltage as it would be thinking the axis is not moving correctly.

Hood
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 06, 2014, 05:09:30 PM
I will check the encoder tommorow...
But i think is ok.(it is not the repaired one).Andi dont get any fault from the srvos software...
And the accel corrects this...
Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 06, 2014, 05:11:35 PM
It is a small lathe wabeco  cc6000.130 kgs weight...1.20 meters long desktop lathe
Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 07, 2014, 03:56:48 AM
 FINALLY!!!
SUCCESS!!!
I checked the second drive's encoder this morning.Hood you were right! It doesn't change numbers both directions the same...
It appears that the second drive's output to the csmio is damaged too.Perhaps i burned that second line driver as well! I have a second chip so i will replace it and see.Problem is i was trying to setup only the first axis all the time.And i was going crazy! I thought that the drive's output (z axis) was ok there (since it was giving readings to mach but the readings were wrong.I just did a quick tune for the (repaired X axis) drive's this morning and it is working silky smooth!!! Even with 7000 motor speed in mach!After that i changed second axis line driver (Z axis) and is working perfect too!!!

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 07, 2014, 05:52:01 AM
 Now that all is working properly does anybody know what mode is better for lathe use Speed mode or Torque mode?

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: Dan13 on October 07, 2014, 06:05:05 AM
Glad you have it working now. Generally speed mode is preferred for CNC machines.

Dan
Title: Re: Servo for lathe spindle ?
Post by: tasbiz on October 09, 2014, 04:50:51 PM
 Hi everybody,
It has been a few days...
In the meantime i corrected everything and just tonight i finished the cabling!
Everything works (theoritically) as expected and all the signals are coming in and out of the controller OK.
Tomorrow the first test...
I will report accordingly..
Thank you Hood and Dan13 for all your help! Without it i would not have done it...

Tasbiz
Title: Re: Servo for lathe spindle ?
Post by: Hood on October 09, 2014, 07:08:52 PM
I am sure you are going to love the IP-A, I certainly do and I really want to get one on the big lathe sometime.

Hood