Hello Guest it is April 17, 2024, 12:09:30 PM

Author Topic: Spindle step/direction analog 0-10v volt manual output scaling????  (Read 11137 times)

0 Members and 1 Guest are viewing this topic.

Hey guys,

I am finishing up installing a new BLDC spindle motor and have tried numerous times to get the rpm range tuned in with little success.  the range is 400-6000rpm,  I have adjust about eveything but cannot seem to get the scaling right.  I have followed the instructions of the manual and the post in the support documents section here on the forum and the problem i have is i believe my controller needs more voltage earlier to get the motor spinning.  when i set everything up for the linearity scaling exercise i was able to get peak RPM perfect and as i went down in RPM it continuously was slower and slow then the commanded rpm until finally i had no spindle movement and was commanding around 1000rpm.... I have played with every setting and when i get the spindle moving at low rpm the range is off on the top by being faster then commanded.  and i also have tried adjusting the pot on the c11g board to try and make changes but i cannot seem to get this licked.

my question, is it possible to manually scale the Spindle rpm commanded 0-10v analog output and graph it to get things where they need to be?

Thanks in advance!!


Offline Hood

  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Spindle step/direction analog 0-10v volt manual output scaling????
« Reply #1 on: October 18, 2014, 02:33:06 PM »
Dont know anything about the C11 and its setup but there is one important setting in Mach, the Spindle Pulley Max RPM should be whatever you have as max RPM. In other words, whatever you have set in your servo drive for the RPM at 10v that is the number you should have in spindle pulleys (and motor tuning if C11 requires that)

It might also be an idea to delete the Linearity.dat from the macro folder of the profile you are using and restart Mach.

(No subject)
« Reply #2 on: October 18, 2014, 02:51:38 PM »

Correct, the motor and controller have a predefined operating range programmed in the controller which is 400-6000rpm... I set the pulley configuration in mach to a 1:1 ratio and those rpm min/max settings.

From my paper graphing it appears that the controller is closer to linear as it gets closer to max rpm.

The biggest error is closest to minimum rpm.  I made adjustments in motor tuning to try starting from the bottom and working my way up and as I expected from my findings, when I tuned the min rpm 400 to function properly, commanding higher rpm was off by a much greater margin then when starting from the top and tuning down.

This leads me to believe that the controller wants a non linear voltage curve specifically early on in the lower rpm range and then closer to linear in the upper rpm range.

Am I explaining it properly? Am I making any sense to you?

Please let me know your thoughts!


(No subject)
« Reply #3 on: October 18, 2014, 02:54:16 PM »
And I did the linearity.DAT delete which was the first step in the support documents article
(No subject)
« Reply #4 on: October 18, 2014, 03:19:27 PM »
Is there a way to customize the linearity.dat file for custom scaling?
(No subject)
« Reply #5 on: October 18, 2014, 04:33:14 PM »
I am seeing exactly 10v at commanded max of 6000rpm

I see voltage change for anything lower than commanded 6000rpm

The lowest speed the motor will turn steadily without wobbling through mach step/Dir analog is ~500rpm (with the supplied manual key controller it would be pretty stable rpm from 400-6000 whatever you set it too).  To achieve actual motor speed of ~500rpm through mach I have to command m3 s1000.  And voltage output at the 0-10v analog out on the C11G breakout board shows 1.35v.

Commanding 2000rpm in mach achieves 1578rpm and so on getting gradually closer to commanded rpm the higher you get toward the max of 6000.

So it appears that the voltage output scale needs to be adjusted.

Is this possible to do without changing the system to a closed loop setup with an index pulse card tied into mach?

Is there a way to create a file or brain or something?

Thanks guys for looking in!


Offline Hood

  •  25,835 25,835
  • Carnoustie, Scotland
    • View Profile
Re: Spindle step/direction analog 0-10v volt manual output scaling????
« Reply #6 on: October 18, 2014, 05:07:49 PM »
I have never had to use the spindle calibration as I have always used servos for spindles.
Having said that if the voltage being output is not linear then I would think it most likely the C11 to blame for that. I did test one of the spindle boards from Peter Homann and it was very linear in its output.

I dont think there is any way to manually set the linearity.dat but again never looked into it.

What you may be able to do is alter the SpindleSpeed.m1s macro so that if you call say M3S500 it actually commands Mach to output a spindle speed command of S1000. The problem with that however would be the DRO for spindle speed commanded would show the 1000. You could get around that by changing the screenset and have a user DRO on it and use the spindlespeed macro to write to that DRO.
Obviously you would have to write the macro in such a way so that it looks at ranges of S words, maybe something like if its S400 - S500 then double the command call, if its s5000 - s6000 then output that as the commanded speed etc.

Re: Spindle step/direction analog 0-10v volt manual output scaling????
« Reply #7 on: October 18, 2014, 08:59:36 PM »
Thank you, I am going to read about macros.... Lol.  That sounds like a viable solution, and I'm sure learning macros is something I need to get to any how...

That and brains.... Every time I consider investigating brains.... I always somehow find something else to busy myself with... Lol

Thanks Hood!
« Last Edit: October 18, 2014, 09:04:58 PM by lcvette »
Re: Spindle step/direction analog 0-10v volt manual output scaling????
« Reply #8 on: October 19, 2014, 01:19:44 AM »
I had the very same problem. Couldn't tune RPM to match what I wanted. Either tune low end and the higher RPM was way higher or tune higher RPM and lower wouldn't turn at all. Using a C6 board for the analog signal to a KBMM 225 DC speed controller.

I installed a C3 index pulse board from CNC4PC. http://www.cnc4pc.com/Store/osc/product_info.php?cPath=25&products_id=129. Then I went to ports and pins/spindle setup. Under motor control I have Use Spindle Motor Output and Step/Dir Motor clicked on. In special functions Use Spindle Feedback in Sync Modes, Closed Loop Spindle Control, and Spindle Speed Averaging are all clicked on. In Input Signals use the pin that the C3 board is connected to.

I now have Mach 3 RPM monitoring and when I command M3 S500 it's 500 RPM the same the higher RPM range. Also put a load on the spindle motor and the spindle motor will compensate for the load and maintain the requested RPM.

« Last Edit: October 19, 2014, 01:27:09 AM by handsmfg »
(No subject)
« Reply #9 on: October 19, 2014, 11:36:05 AM »
Thanks handsmfg, 

My controller has a built in hall sensor with one pulse per revolution, I'm researching now how to hook it up through the breakout board.  But unfortunately my instruction booklet for the motor is written in a way that is difficult to follow in its Chinese to English translation and I'm having some frightening images of burning up something electrical.

The link to the motor controller is here:


Being I have only hooked up inputs for a tool touch pad and probe that used onboard connections and no external power source, I'm a little apprehensive about connecting this thing.

I am running the cnc4pc c11g rev. 8 BOB and I couldn't find any information on the site or manual about this. 

Link to BOB here:


I'm sure it's simple, however I generally over complicate electrical components because I have historically found when I screw up it is expensive with lots of waiting for new parts to arrive to correct things... And trying to put the smoke back into things is not something I have mastered yet... Lol..

If the manual is clear to an electronics guru and they have a few spare moments to explain the connections and a rough explanation of what the functions are so I understand better it would be greatly appreciated!