What's new
What's new

Is there any way to program SPINDLE SPEED VARIATION? to avoid chatter on long parts. Lathe.

SageGlad

Aluminum
Joined
Apr 16, 2022
Hey people!

I've seen spindle speed variation on HAAS Lathes looks like it's a basik option for them.
I run Doosan and DMG Mori lathes, and I don't see these on the machines.
I was curious if there is a way to program it using G/M codes.
I run ling parts very often last time and I'm doing this variation of a spindle speed by my hand (turning knob up/down or plus/minus) I hate to do so, It looks like manual machining on expensive cnc machines. Waste of resources.

Please advise if you know how can I program it..

Thank you all!
 
I'm sure those smarter then me could create a Macro that adjusts your Cutting Speed in SFPM depending on what percentage of you Z axis move the machine is currently at and adjust the SFPM accordingly.

For those only as smart as me, just break you Z axis move up into multiple G1 sections and at the beginning of each new G1 move, change your SFPM amount in the same block. This will keep your IPR cutting feed constant throughout the cut. You will want to turn on any Look Ahead you might have and you will have to make sure your machine parameters are set so that the machine does not stop moving while waiting for the Spindle SAR (Speed Arrival Signal) to be satisfied. This can be done on the fly with a G10 parameter change call. Meaning it can also be set back to normal after the cut.
 
Last edited:
I doo this on some bigger D cuts on a much bigger lathe - where I am running slow and it doesn't respond real quick, so that actually works to my benefit, but in an app like this - boy, he could have a long line of code!

Maybe it would be best to call a sub-routine [several times] along the lines of:

W-.03 S600
W-.03 S700
W-.03 S600
W-.03 S500
M99

???

Otherwise, I too would like a macro like you are looking for.


-------------

Think Snow Eh!
Ox
 
On your DMG machines they might be able to use G950 if it's included in your options package. It varies your spindle speed by a percentage specified by you.
 
Hey people!

I've seen spindle speed variation on HAAS Lathes looks like it's a basik option for them.
I run Doosan and DMG Mori lathes, and I don't see these on the machines.
I was curious if there is a way to program it using G/M codes.
I run ling parts very often last time and I'm doing this variation of a spindle speed by my hand (turning knob up/down or plus/minus) I hate to do so, It looks like manual machining on expensive cnc machines. Waste of resources.

Please advise if you know how can I program it..

Thank you all!
Doosan has an option for spindle speed "arbitrary" for any 2012 or later machine. Call your distributor.
 
Most machine manufacturers, including Doosan, and Mori have options for this.
Depending how much you want to vary it by you could do it with a macro, but if you exceed what the accel/decel of the machine can do you're going to see it and your sizes will change as the machine will stop and wait for the speed to be hit.

Okuma in particular does this very well, they have spindle speed variation as standard on the lathes, but there's also functions to make it even whizzier. Like I can use "functions to improve cycle time" to improve performance, for example there's an M-code to ignore G96 spindle speed confirmation, so if I use the macro way it won't wait for the spindle to hit the commanded speed it will just do its best and adjust the feed to match what it did. Also we have machining navi which gives us a microphone and it suggests settings to put in variables in your program to make it reliable over many parts. It's pretty nifty but it'd be better if it actually intervened.
 
Waiting for "AT SPEED" would be the last thing that I would want for this app.
If I was writing this macro (I don't write macros) I would have one of the line items be "how long to ramp?"

It's the ramp it'self that is what I want, not a "different" speed.


--------------------

Think Snow Eh!
Ox
 
Pass your spindle speed override signal through a microcontroller and have it do it for you. You could even provide it with an input command from your controller IO ports via M command to make it programmable directly from the machine.
 
Pass your spindle speed override signal through a microcontroller and have it do it for you. You could even provide it with an input command from your controller IO ports via M command to make it programmable directly from the machine.
Where to get this specific microcontroller?
 
Where to get this specific microcontroller?
I'm not aware of a product that is simply plug and play for this purpose, but any off the shelf programmable microcontroller could be used. Most, if not all of them will require a level shifter to interface with the controller IO as most controller IO I believe are 24V while microcontrollers work with either 3.3V or 5V logic. I personally use ESP32 based microcontrollers, but you could use anything you like so long as it has enough IO (probably 7 ports minimum at first guess, most microcontrollers have more than enough).. ATMega, STM32, ESP8266, etc.. You can source them from Mouser, Digikey or even Amazon, Ebay and Aliexpress if you like.
 
I'm not aware of a product that is simply plug and play for this purpose, but any off the shelf programmable microcontroller could be used. Most, if not all of them will require a level shifter to interface with the controller IO as most controller IO I believe are 24V while microcontrollers work with either 3.3V or 5V logic. I personally use ESP32 based microcontrollers, but you could use anything you like so long as it has enough IO (probably 7 ports minimum at first guess, most microcontrollers have more than enough).. ATMega, STM32, ESP8266, etc.. You can source them from Mouser, Digikey or even Amazon, Ebay and Aliexpress if you like.
If you have a spindle speed override on the front of the machine you could most likely rewire it through an Arduino and have it Loop the cycle. If wired and programmed correctly you can retain the override function with a pot, some buttons to adjust the RPM modulation percentage with a Min and Max setting. 0% would simply turn off the modulation. The Loop cycle can have a time delay and duration to control how fast it ramps up and down.
 
If you have a spindle speed override on the front of the machine you could most likely rewire it through an Arduino and have it Loop the cycle. If wired and programmed correctly you can retain the override function with a pot, some buttons to adjust the RPM modulation percentage with a Min and Max setting. 0% would simply turn off the modulation. The Loop cycle can have a time delay and duration to control how fast it ramps up and down.
That's similar to what I was thinking, but all the overrides on my machines are encoders with programmable speeds and not analog pots. I'd wire an IO from the machine controller to turn it on via an M code to vary the spindle speed via encoder signal emulation or pass the signal through when turned off to retain manual control. Maybe add a button to be able to turn it on and off manually as well. The exact spindle speeds available to the microcontroller would need to be set in the machine parameters. I doubt you would need more than one encoder position from 100% in either direction to be effective and the frequency should just be matched to the spindle acceleration. If it were not; too fast and it never reaches the target speed and too slow and it would stabilize before changing. In fact, you could pull the "on speed" signal from the servo drive and have the microcontroller wait for that signal to vary the speed again so the frequency is always in tune with spindle acceleration regardless of how much mass you're turning.
 
Some of the Doosan machines have spindle speed variation. Like Douglas Rizzo said, call your didtributor. The option is called DSSV and I think it is a variation of some kind of the Fanuc option. Anyway, we have it on some of the DN Solutions lathes, not all, so you should speak with your distributor.
 
Okuma in particular does this very well, they have spindle speed variation as standard on the lathes, but there's also functions to make it even whizzier. Like I can use "functions to improve cycle time" to improve performance, for example there's an M-code to ignore G96 spindle speed confirmation, so if I use the macro way it won't wait for the spindle to hit the commanded speed it will just do its best and adjust the feed to match what it did. Also we have machining navi which gives us a microphone and it suggests settings to put in variables in your program to make it reliable over many parts. It's pretty nifty but it'd be better if it actually intervened.
I think it's called "Cycle Time Reduction Function." You can also have the machine index the turret "on the fly" as well as unclamp/clamp the spindle while still rotating for bar feed out.
 








 
Back
Top