Hello Guest it is April 17, 2024, 11:32:35 AM

Author Topic: Mach4 Spindle Control and Tuning ?s  (Read 5709 times)

0 Members and 1 Guest are viewing this topic.

Mach4 Spindle Control and Tuning ?s
« on: November 17, 2014, 07:15:41 PM »
I am considering taking the plunge to Mach4 but have not found any specific information regarding spindle control except for the brief paragraph in the available literature.  My question is regarding the tenability of the spindle RPM.  I know in Mach3 I have had nightmares trying to get it close and wondered if Mach4 had been given a scaling table to manually assist in setting the voltage output curve?  Or if someone could enlighten me on how the spindle can be calibrated?  it appears that it can be controlled as a motor but I didn't see any information on tuning it.

Thanks Guys!

(No subject)
« Reply #1 on: November 19, 2014, 02:42:33 AM »
No body?  Wow, figured someone would have setup a spindle a few different ways by now...

Any help appreciated!


Offline dude1

  •  1,253 1,253
    • View Profile
Re: Mach4 Spindle Control and Tuning ?s
« Reply #2 on: November 19, 2014, 03:10:21 AM »
more info needed on you set up

Offline poppabear

  • *
  •  2,235 2,235
  • Briceville, TN, USA
    • View Profile
Re: Mach4 Spindle Control and Tuning ?s
« Reply #3 on: November 19, 2014, 05:33:17 PM »
like daniellyall, said,

How are you driving your spindle motor? 
Step/Dir? (through what motion device?), over Modbus? (what functions?, what bit resolution), through some other method?

What functions are you wanting to control?
i.e. On/Off, CW/CCW, Enable, fault reset, speed profiles, read spindle speed, read fault(s), etc. to include reading a speed encoder if there is one.
There is A lot of possibilities so BE SPECIFIC in your questions!

and having said, the above, there may not be an answer, since perhaps no one is using a set up like yours,
and has nothing to test against........ also, Mach4 is still in Beta.......

fun times
Re: Mach4 Spindle Control and Tuning ?s
« Reply #4 on: November 19, 2014, 07:16:12 PM »
Thanks for the replies fellas!

I am looking for much more generic answers I suppose...  I am ready to change my system currently to move to a external motion controller which is why I am asking.  I have been using Step/Dir but think I will be moving to PWM.  my current motor/driver configuration is the keling 2.2kw BLDC.  I have been successful running the motor in step/dir but without any accurate commanded to actual RPM.  the curve is off by a good bit mainly in the lower RPM range, See attached PDF chart.  My setup's RPM range is 400-6000.

I was wondering if Mach4 had a simple calibration table that would allow the user to define the voltage output or PWM output vs. sword commanded speed that was fairly simple or even a initial voltage and final voltage per RPM request.  For example, I can tune the motor to be accurate at the midpoint of the RPM and off at the beginning and end OR I can tune it to be correct at the top but off everywhere underneath (commanded RPM being higher than actual until max at which point it is correct).

It would be fabulous to have two boxes to input the Min. RPM voltage required to achieve the min RPM and then of course the max RPM and voltage to command the max RPM and have the linearity file be based on those two points which should bring the linear output inline with what is actually required to achieve correct speeds and be more accurate then the current configuration.  My biggest obstacle has been the low speed range and there does not seem to be any way to adjust this.  I'm sure most are gearing up to recommend pulley settings and motor tuning, but believe me when I say I have experimented with everything systematically including a clean mach install and at this point nothing seems to net the correct result. 

I was wondering if Mach4 has any additional tuning parameters to be able to make these adjustments?


Re: Mach4 Spindle Control and Tuning ?s
« Reply #5 on: November 19, 2014, 07:50:09 PM »
There is no such function in Mach4 at this time. I suspect that this will be left up
to the plug-in and hardware providers.

We will keep this in mind when working on spindle control for the PMDX-422,
but it will come behind many other features that need to be implemented.

It should also be possible with a script. Using LUA in Mach4 can do almost
Steve Stallings
Re: Mach4 Spindle Control and Tuning ?s
« Reply #6 on: November 19, 2014, 08:04:39 PM »
I did write a function to get one of these to work with mach4, thou it says PWM it uses what i'd call PWTiming or PWDuty  as the input signal duration sets the 0-10volt output.
Odd creature but it worked pretty well.


(No subject)
« Reply #7 on: November 19, 2014, 08:59:52 PM »
More stuff,

Thanks for the info!  I guess I need to learn the LUA method..,..   Time to research!