Hello Guest it is March 29, 2024, 04:56:31 AM

Author Topic: spindle calibration  (Read 20704 times)

0 Members and 1 Guest are viewing this topic.

spindle calibration
« on: January 16, 2013, 04:54:10 PM »
Hi all
i had my lathe spindle set up with pwm output (0-10v) working index pulse displaying correct speed and not that far out with the sword from speeds from 200-4000rpm
then i decided to run the auto calibration to try and improve things- big mistake!

the calibration process completed ok but shows a massive spike at start. for some reason the spindle never started till about 1000rpm+
and now spindle does not respond to swords below 1500. i deleted the lineration.dat and restarted and still the same. I noticed the control ratio shows about 0.01 (as opposed to nearer 1?

is there anything i can do to get it back to its default settings or is it a complete reinstall!?

do i still need to set steps/vel/acceleration in motor tuning even thou it is PWm?

thanks in advance for any help!

Offline Hood

*
  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: spindle calibration
« Reply #1 on: January 16, 2013, 05:24:42 PM »
Afraid I have never messed with auto cal but just wondering if you defintely deleted the correct linearity.dat? In other words was it the one in the macro folder of the profile you are using?
Hood
Re: spindle calibration
« Reply #2 on: January 16, 2013, 06:46:26 PM »
Hi,

Yes, Hood is correct. Delete  linearity.dat

Then, don't play with the spindle calibration again. :)

A few notes on setting up a Mach2 PWM controlled spindle.

If using the parallel port you don't need to set a speed or acceleration in the spindle axis tuning tab. If you are using a Smooth Stepper, you Do need to set up an acceleration value.

Controlling a spindle via a 0-10V signal is an Open Loop control. Putting aside Mach3 closed loop function that has some problems,  there is no feedback loop to to ensure that the speed you are asking for is actually being obtained by the motor. The

The control voltage is generated as a ratio of the speed set by the S over the maximum speed set for the Mach3 pulley being used.

So, if you are using Pulley 1 and have set its maximum speed to 5000 rpm, then when you set the speed in Mach3 to 1000 rpm , 2 volts is generated as
1000rpm/5000rpm * 10V = 2V

or a 1/5 of the maximum speed.

Now,the speed of  most spindles is fairly linear with respect to the control voltage. More so for VFD controlled spindles as they have their own feedback loop.

A DC spindle is very linear in the 10% to 90% speed range. Below 10% the spindle needs to overcome the drive chain friction and so the actual speed will usually be lower than asked for.

Above 90%, the spindle speed saturates and again is usually lower than asked for. So, the response is 'S' shaped. The important thing to note is that it is linear in the spindle working range. After all, if you want the spindle to go flat out it doesn't matter that it is off by 5%. But, if you want the spindle speed to be 1000 rpm it is important to be as close to that as possible.

You use the Max Pulley speed setting to calibrate the spindle. This is how I do it;

1. Initially let the spindle warm up for 10 minutes running at around 50%
2. Initially set the Max pulley speed to 1000rpm
3. In Mach3 set the speed to 1000rpm and measure the actual speed. (say 3145rpm)
4. Enter 3145  into the Max speed pulley setting
5. Set the speed to around 50%, say 1500rpm and measure the actual speed. It will probably be low.
6. If the actual speed is low, increase the  Max speed pulley setting and repeat steps 5 & 6 until the actual speed matches.

Basically, you want to adjust the Max pulley speed to that the actual speed matches the set speed in the area that you do most of the work on you lathe. I can usually get the actual speed within a few rpm of what I set.

Hope this helps.

Cheers,

Peter.
 
----------------------------------------------------
Homann Designs
http://www.homanndesigns.com
email: peter at homanndesigns.com
Re: spindle calibration
« Reply #3 on: January 29, 2013, 02:34:29 PM »
Hi
thanks for that. I have managed to get it sorted now. yes i do have issues with the speed at the top and bottom ends. so i will do as you suggest and leave the cal alone!
Re: spindle calibration
« Reply #4 on: January 11, 2016, 02:35:13 PM »
Peter, when you talk about the process of setting up the spindle in mach 3. I have some questions regarding what you are explaining. Would you be able to clearify for me?

"3. In Mach3 set the speed to 1000rpm and measure the actual speed. (say 3145rpm)"   [Where in Mach do you set this up? and Are you measuring the speed of the spindle or the Motor Speed?]

"4. Enter 3145  into the Max speed pulley setting"     [Is this done in the Spindle Pulley setup screen?]

"5. Set the speed to around 50%, say 1500rpm and measure the actual speed. It will probably be low."     [Where do you set the speed to 50%?]
Re: spindle calibration
« Reply #5 on: January 16, 2017, 12:15:45 PM »

I'm having spindle issues too, I really hope someone can help with this. I have a Denford Nova Mill running Mach3, it has a DIYCNC SpindleV5 controller which I had a technician at the local Uni set up for me (friend of a friend, I no longer have any contact details for him now though).
The other day I tried the Autocal function because I wasn't convinced the RPM was entirely accurate, now the thing will only run at max RPM (5000) all the time, even if I try sliding the green override bar down or the plus/minus controls. I have a laser RPM meter now and if I run Autocal, the RPMs do begin low and work their way up to the max, fairly accurately. I save the Autocal results and close it, but then spindle is back to 5000 RPM again and I can't run it any slower. I feel like there's something really obvious I'm missing, hopefully someone can fill me in!
Re: spindle calibration
« Reply #6 on: January 16, 2017, 02:07:38 PM »
Sorted! almost as soon as I made my last post, I found the official instruction:


"Hi Guys:

This proceedure is not in the Doc's, the reason being its likely to change at some point. What I really
woudl liek to know i show linear YOUR system is using this as the speed setting for it. The setitngs are
highly misunderstood, and many run a linearity run when it isnt necessary, and it badly affects their results.


VFD:

A VFD takes an output from Mach3 to control its speed. Initially, Mach3 supposes a 1:1 linearty of the result,
which is pretty close to most vfd's in reality, they have allot of electronics in them to do this on their own. BUT
if the output is not right or not linear as output , then the result is obviously goign to be off. So the
following steps will do it right, and Id be very interested in any posts of the results.


Step 1)
Delete the linearity.dat file in your mach3 installation. The system will recreate it on next startup with 1:1
as the table. Also set the config/pulleys to pulley number 1, with a max speed of 1000, and a min speed of 0.
This means the range of commandis now S0 to S1000. ( Doesnt matter what the real speed of your spindle is, use
these numbers to start with.

Step 2)
We now need to know the max speed of the VFD's input, this is the place most get it wrong. VFDs respond,
as do frequency/analogue convertors to only a specific range typically of input vs output. SO lets figure out the top
speed expectation of a VFD..

In config/motor tuning, set the spindle axis steps/unit to 60. This means the velocity slider will now display in hz..
What we need to find out here is both the max frequency of the spindle and the clip frequency of the VFD.
To do this we now set the velocity slider to max. Youll notice it now reads the kernal frequency your using. 25000
in 25Khz for example. Apply the settings and exit the dialog.

- Turn on the spindle and set a S1000 as the speed. Measure the true spindle speed.
- Set a Speed of S950.. then S900, then S850..etc until the spindle actually slows. What will
happen on many systems is you will still get maximum speed until you lower the speed to some number..say S750..
or it may happen that the speed instantly start to slow slightly at S950..
Whenever it occurs that the spindle starts to run slower, note the S speed just prior to the slowdown.

For example, at S1000 I get a true RPM of 3000. SO the following occurs as I do the series..

S1000 -- 3324RPM
S950 --- 3324 RPM
S900 -- 3324 RPM
S850 -- 3156 RPM

SO the magic number here is S900, the last value where the spindle was at max RPM.
This shows us that using 90% of the max frequency tells the VFD to go full out.

So in motor tuning, set the velocity slider down to 90% of the max setting or current setting in Hz. ( Speed / 10 in % ).

Step 3)

Command a S1000 again, the max speed should still result. ( For higher accuracy and linearity you can repeat step 2
and vary the velocity slider to the % of the current slider position if you wish, the more you do step 2, the less change you
shoudl have to make each time. For example if it was at 21600 at this point , another run through step 2 might make you change it
to 21250.. each time the change will be less and less. )
Note the current S1000 speed and enter it in the config/pulleys as the max speed, leave the min speed to 0.

Step 4)

Turn on the spindle and seta speed of S1 . Note the speed you get and eneter it in the config/pulleys as minimum speed
for that pulley.


OK, so now we have properly set the VFD clip frequency, and the pulley min and max values. They now take into accoutn the expectation
of the VFD, and the resultant speeds at low and high end to be expected. The linearity is now considered to be 1:1 for that VFD/freq->analogue conversion.



If you have done this, please post a report of the following run..

Take max speed and divide by 10. Say max speed in pulley max is 2500, so the increment will be 250. Post for me 10 speeds..

S1 actual RPM: ???
S250 ""
S500 ""
S750 ""
S1000 ""
..etc..

Using this proceedure takes allot fo the guesswork out of setting up a spindle, forces you to take into
account the VFD clipping limits, forces the setup to show you the outgoing frequency in hz of the output and should
show us a quantifiable spindle vs command relationship as a result.

Take note, this is for step output spindles, PWM is another matter, this will still work, but since the number of steps
in speed is dependent on the PWM settings, the end results may be off in a stepwie fashion if using PWM.

Non-linearity can coem from several directions, frequency->analogue conversion can be way off a linear scale,
most vfd's will be pretty close to linear if clipping is taken into accoutn as above. For my part Id appreciate any feedback
on the speed test results after a fresh setup of spindle speed using the above proceedure. Some may find their max speed
is now higher using this technique, others will find a much more linear resultant spindle speed, it shoudlnt negatively affect
anyone if done right.

Thanks, and good luck..
Art"


From here http://www.machsupport.com/forum/index.php?topic=30685.0;wap2

I followed it exactly and now have an accurate spindle running at variable speeds again :)
Re: spindle calibration
« Reply #7 on: June 18, 2019, 07:59:50 PM »
Sorted! almost as soon as I made my last post, I found the official instruction:


"Hi Guys:

This proceedure is not in the Doc's, the reason being its likely to change at some point. What I really
woudl liek to know i show linear YOUR system is using this as the speed setting for it. The setitngs are
highly misunderstood, and many run a linearity run when it isnt necessary, and it badly affects their results.


VFD:

A VFD takes an output from Mach3 to control its speed. Initially, Mach3 supposes a 1:1 linearty of the result,
which is pretty close to most vfd's in reality, they have allot of electronics in them to do this on their own. BUT
if the output is not right or not linear as output , then the result is obviously goign to be off. So the
following steps will do it right, and Id be very interested in any posts of the results.


Step 1)
Delete the linearity.dat file in your mach3 installation. The system will recreate it on next startup with 1:1
as the table. Also set the config/pulleys to pulley number 1, with a max speed of 1000, and a min speed of 0.
This means the range of commandis now S0 to S1000. ( Doesnt matter what the real speed of your spindle is, use
these numbers to start with.

Step 2)
We now need to know the max speed of the VFD's input, this is the place most get it wrong. VFDs respond,
as do frequency/analogue convertors to only a specific range typically of input vs output. SO lets figure out the top
speed expectation of a VFD..

In config/motor tuning, set the spindle axis steps/unit to 60. This means the velocity slider will now display in hz..
What we need to find out here is both the max frequency of the spindle and the clip frequency of the VFD.
To do this we now set the velocity slider to max. Youll notice it now reads the kernal frequency your using. 25000
in 25Khz for example. Apply the settings and exit the dialog.

- Turn on the spindle and set a S1000 as the speed. Measure the true spindle speed.
- Set a Speed of S950.. then S900, then S850..etc until the spindle actually slows. What will
happen on many systems is you will still get maximum speed until you lower the speed to some number..say S750..
or it may happen that the speed instantly start to slow slightly at S950..
Whenever it occurs that the spindle starts to run slower, note the S speed just prior to the slowdown.

For example, at S1000 I get a true RPM of 3000. SO the following occurs as I do the series..

S1000 -- 3324RPM
S950 --- 3324 RPM
S900 -- 3324 RPM
S850 -- 3156 RPM

SO the magic number here is S900, the last value where the spindle was at max RPM.
This shows us that using 90% of the max frequency tells the VFD to go full out.

So in motor tuning, set the velocity slider down to 90% of the max setting or current setting in Hz. ( Speed / 10 in % ).

Step 3)

Command a S1000 again, the max speed should still result. ( For higher accuracy and linearity you can repeat step 2
and vary the velocity slider to the % of the current slider position if you wish, the more you do step 2, the less change you
shoudl have to make each time. For example if it was at 21600 at this point , another run through step 2 might make you change it
to 21250.. each time the change will be less and less. )
Note the current S1000 speed and enter it in the config/pulleys as the max speed, leave the min speed to 0.

Step 4)

Turn on the spindle and seta speed of S1 . Note the speed you get and eneter it in the config/pulleys as minimum speed
for that pulley.


OK, so now we have properly set the VFD clip frequency, and the pulley min and max values. They now take into accoutn the expectation
of the VFD, and the resultant speeds at low and high end to be expected. The linearity is now considered to be 1:1 for that VFD/freq->analogue conversion.



If you have done this, please post a report of the following run..

Take max speed and divide by 10. Say max speed in pulley max is 2500, so the increment will be 250. Post for me 10 speeds..

S1 actual RPM: ???
S250 ""
S500 ""
S750 ""
S1000 ""
..etc..

Using this proceedure takes allot fo the guesswork out of setting up a spindle, forces you to take into
account the VFD clipping limits, forces the setup to show you the outgoing frequency in hz of the output and should
show us a quantifiable spindle vs command relationship as a result.

Take note, this is for step output spindles, PWM is another matter, this will still work, but since the number of steps
in speed is dependent on the PWM settings, the end results may be off in a stepwie fashion if using PWM.

Non-linearity can coem from several directions, frequency->analogue conversion can be way off a linear scale,
most vfd's will be pretty close to linear if clipping is taken into accoutn as above. For my part Id appreciate any feedback
on the speed test results after a fresh setup of spindle speed using the above proceedure. Some may find their max speed
is now higher using this technique, others will find a much more linear resultant spindle speed, it shoudlnt negatively affect
anyone if done right.

Thanks, and good luck..
Art"


From here http://www.machsupport.com/forum/index.php?topic=30685.0;wap2

I followed it exactly and now have an accurate spindle running at variable speeds again :)
[/quote/

Will this work for a DC motor as well?