Author Topic: Spindle speed setup StepDirection VFD  (Read 24302 times)

0 Members and 1 Guest are viewing this topic.

Offline BR549

  • Mach4 Alpha
  • Posts: 6,855
    • View Profile
Spindle speed setup StepDirection VFD
« on: May 29, 2011, 02:43:24 PM »

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

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
- 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
This shows us that using 90% of the max frequency tells the VFD to go full

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 ""

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..

Offline Fastest1

  • Active Member
  • Posts: 927
  • Houston, TX
    • View Profile
Re: Spindle speed setup StepDirection VFD
« Reply #1 on: February 22, 2012, 07:05:09 PM »
Art, Thank you so much. This worked well for me with a C6, Smoothstepper, Bardac 1600i and an SEM motor. I was within 100 rpm from 2800-100 rpms. I will go back to make sure I did it correctly.
I want to die in my sleep like my grandfather, not like the passengers in the car! :-)

Offline Bodini

  • Active Member
  • Posts: 216
    • View Profile
Re: Spindle speed setup StepDirection VFD
« Reply #2 on: February 10, 2013, 11:28:15 PM »
This is a great post.  I'm so happy to have gotten this straightened out!  I don't know if you are still interested in the results as you had asked for, but I wrote mine down for you as I wanted to see the results anyway.  Here they are:

  • Sspeed as commanded in Mach = Actual as measured with a digital tach, rounded to nearest hundred
  • S1000 = 850
  • S3000 = 2700
  • S5000 = 4600
  • S7000 = 6800
  • S9000 = 8700
  • S10000 = 9500
  • S11000 = 10500
  • 13000 = 12700
  • 15000 = 14300
  • 17000 = 16900
  • 18000 = 17990 (Max Speed)

FYI, this is a wood router using a CNC4PC C6 Spindle board, a Fuji Frenic-Mini VFD, and a Teknomotor 2.0kw spindle (min speed 500, max speed 18000).

Thanks again!  ;D