Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: MachinistSF on January 18, 2014, 04:10:18 PM

Title: Spindle vs A-axis motor tuning, steps per unit?
Post by: MachinistSF on January 18, 2014, 04:10:18 PM
Hello,

I have a servo spindle (using step+dir for Granite devices VSD-E) which I have configured both as spindle and as A-axis, so they have both the same LPT port pins in Mach config. My A-axis is in general config not angular (no checkmark there). I use the A-axis during tool change to rotate spindle which also rotates tool carousel in Emco VMC-100 when carousel is in top position. The step input in servo drive has electronic reduction even though servo encoder is 500ppr. This keeps steps per second reasonable at 4000rpm maximum speed.

It works.

Now, the strange thing is that I have to set the "steps per unit" for spindle to 200 (steps per rev) and to A-axis to 20 (steps per rev).
With these settings I get ok results: "G01 A1" does one full turn of spindle, spindle speed "60" does 1 full turn of spindle per second (also
measured from spindle index pulse by mach).

I'm propably missing something. I did read the fine manual, but couldn't find a difference there between spindle and a-axis tuning..
Why is the steps per unit different?

Thanks!
Title: Re: Spindle vs A-axis motor tuning, steps per unit?
Post by: Hood on January 18, 2014, 04:46:04 PM
Can you double check the spindle by commanding S1 and seeing if it takes 1 minute to revolve.
Hood
Title: Re: Spindle vs A-axis motor tuning, steps per unit?
Post by: MachinistSF on January 18, 2014, 07:27:15 PM
Can you double check the spindle by commanding S1 and seeing if it takes 1 minute to revolve.
Hood

Yes, it does.

It has only 20 steps per revolution, so the spindle jumps 20 times in a minute, 360/20 degrees per jump. I forgot to mention that the 20 steps/rev is the real value from servo (so A axis tuning is working ok and spindle tuning steps per unit acts funny). When running at higher steps/s, the servo amp will smooth the rotation. With that slow movement, it really jumps, stays, jumps, stays..
Title: Re: Spindle vs A-axis motor tuning, steps per unit?
Post by: Hood on January 18, 2014, 07:45:37 PM
Can you attach your xml so I can sim here please.
Hood
Title: Re: Spindle vs A-axis motor tuning, steps per unit?
Post by: MachinistSF on January 18, 2014, 08:10:16 PM
Here is the XML. I appreciate your effort, this really bugs me.
Title: Re: Spindle vs A-axis motor tuning, steps per unit?
Post by: Hood on January 18, 2014, 08:20:17 PM
Ok I reckon it may be your max speed in Spindle Pulleys setup that is the issue. Set that to the same as your Spindles Motor Tuning and see.
Hood
Title: Re: Spindle vs A-axis motor tuning, steps per unit?
Post by: MachinistSF on January 18, 2014, 08:32:27 PM
Ok I reckon it may be your max speed in Spindle Pulleys setup that is the issue. Set that to the same as your Spindles Motor Tuning and see.
Hood

Why would the maximum speed or acceleration have any relation to the steps/rev value?
I can try it tomorrow but even if it affects the steps/rev, why?

Spindle pulley ratio is 1:1 so no effect there.  Max speed at pulleys is just default value.
Title: Re: Spindle vs A-axis motor tuning, steps per unit?
Post by: Hood on January 18, 2014, 08:38:54 PM
The spindle pulleys and the Velocity for the spindle have an interaction. You have spindles Vel set to 3,000 and the Pulleys Max set to 25,000 so basically 10x more than your velocity. That is likely why  you need 10x more steps per unit. I know its not actually 10x more but because of the steps per unit and the velocity concerned it is 10x  to all practical  intents and purposes.
Hood
Title: Re: Spindle vs A-axis motor tuning, steps per unit?
Post by: MachinistSF on January 18, 2014, 09:04:22 PM

So spindle max. velocity and pulleys max. velocity need to be same, to get reasonable steps/rev for spindle even if ratio=1. Ok.

I read carefully the manual at pulleys, and section 5.5.5.3 refers to motor tuning velocity of spindle: "The Vel box should be set to the number of revs per second at full speed. For example, a 3600 rpm
motor would need to be set to 60.". So, in that case the ".. per min" text at motor tuning dialog is really confusing, if it is mm/min for axis motors, and rev/s for spindle motor..

Does this mean I really should put 3000rpm = 50 rev/s to motor tuning velocity, and 3000rpm to pulley dialog max speed?

This is a really good discussion! That might have caused havoc. I'm surprised it worked as well as it worked, by chance.
Title: Re: Spindle vs A-axis motor tuning, steps per unit?
Post by: Hood on January 19, 2014, 03:59:08 AM
I have not read the manual but the way I have always treated things in motor tuning is.
Steps/Unit
Units/minute
Units/s/s

So what I would say is set is
steps per unit to 20 as you are wanting one unit to be 1 revolution
set velocity to 3000 as you are wanting 3000 rpm
set accel to whatever you want but probably around about 20 for a start, that would be 20 revs/sec/sec so 3000rpm in 2.5 sec.

Set your spindle pulleys Max to 3000.

Hood
Title: Re: Spindle vs A-axis motor tuning, steps per unit?
Post by: cncalex on January 19, 2014, 05:19:26 PM
Quote
(so A axis tuning is working ok and spindle tuning steps per unit acts funny). When running at higher steps/s, the servo amp will smooth the rotation. With that slow movement, it really jumps, stays, jumps, stays..
It acts not funny, it acts how you set it up. 1RPM = 20 pulses per minute thats 1 puls every 3 seconds. The A axis acts the same, try
G0A0
G1A1F1
This behav is due to your poor resolution. You should increase it.

Alex
Title: Re: Spindle vs A-axis motor tuning, steps per unit?
Post by: simpson36 on January 21, 2014, 11:52:15 AM
I have a servo spindle (using step+dir for Granite devices VSD-E) which I have configured both as spindle and as A-axis, so they have both the same LPT port pins in Mach config. .

It works.

It has been a while since I have used a parallel port, but it seems you are saying that both the Spindle and the A axis are sharing the same physical pins. If that's correct, I can't imagine the thing is working at all unless by sheer coincidence.
Title: Re: Spindle vs A-axis motor tuning, steps per unit?
Post by: Hood on January 21, 2014, 01:23:50 PM
His A zxis and spindle are one in the same and the parallel port driver does not care if you set the same pins or not for different axes. As long as both are not commanded at the same time it should be ok.
Prior to the Smoothstepper supporting SwapAxis() Greg allowed that to be done so that a few people could do tapping.
Hood
Title: Re: Spindle vs A-axis motor tuning, steps per unit?
Post by: MachinistSF on January 22, 2014, 05:08:26 PM
Quote
(so A axis tuning is working ok and spindle tuning steps per unit acts funny). When running at higher steps/s, the servo amp will smooth the rotation. With that slow movement, it really jumps, stays, jumps, stays..
It acts not funny, it acts how you set it up. 1RPM = 20 pulses per minute thats 1 puls every 3 seconds. The A axis acts the same, try
G0A0
G1A1F1
This behav is due to your poor resolution. You should increase it.
Alex

I was referring to "acting funny" as requiring a steps/unit value that is not corresponding to a real value in servo controller, unlike the A-axis which uses the real value. The 20steps/rev is plenty in my application and does not act funny at all in normal speeds as the servo controller motion planner smooths it just fine. Why use a higher steps/rev when that is ok and already gives plenty of steps/s at higher spinds RPMS.. I rather keeps the steps/s with parallel port as low as possible.

It was indeed the pulley maximum RPM value that caused it. Changing it to same value as maximum speed at motor tuning for spindle solved the issue.
Title: Re: Spindle vs A-axis motor tuning, steps per unit?
Post by: MachinistSF on January 22, 2014, 05:13:51 PM
I have a servo spindle (using step+dir for Granite devices VSD-E) which I have configured both as spindle and as A-axis, so they have both the same LPT port pins in Mach config. .

It works.
It has been a while since I have used a parallel port, but it seems you are saying that both the Spindle and the A axis are sharing the same physical pins. If that's correct, I can't imagine the thing is working at all unless by sheer coincidence.

Why not?

As long as I don't use the A-axis (servo-spindle with angular control) and spindle (as constant RPM spindle) at the same time, there is no problem. When I use the A-axis at ATC macro code, I make certain the spindle is not rotating. Outside the ATC macro, the A-axis is not used. Much more clear to me than using swapaxis to do the same.

The pins go the the servo amplifier running the brushed DC spindle servo motor with encoder. The servo amp doesn't know whether the steps come from A-axis or spindle rotating in MACH3. When using A-axis, I have to home the axis anyway to get initial angle correct - using spindle encoder index pulse as home switch.
Title: Re: Spindle vs A-axis motor tuning, steps per unit?
Post by: MachinistSF on January 22, 2014, 05:17:48 PM
I have not read the manual but the way I have always treated things in motor tuning is.
Steps/Unit
Units/minute
Units/s/s

So what I would say is set is
steps per unit to 20 as you are wanting one unit to be 1 revolution
set velocity to 3000 as you are wanting 3000 rpm
set accel to whatever you want but probably around about 20 for a start, that would be 20 revs/sec/sec so 3000rpm in 2.5 sec.

Set your spindle pulleys Max to 3000.

Hood

Thanks for your support. That pulley max speed setting solved the issue.