What's new
What's new

Legacy spindle speed variation macro

mkd

Stainless
Joined
Jun 8, 2013
I seem to remember someone posting a macro for varying the spindle speed on an older okuma lathes that did not have the option.
well now i'm boring a part and badly need it and can't seem to google my way to the post, if it still exists...:scratchchin:

thanks in advance

note osp 200&300 VSS is standard and optional on 100. I'm talking xxx.==OSP7000..
 
Last edited:
i swept through some cases ; i don't think i can code a macro 4 your cnc, but i hope you will spot what you need :) kindly !

Code:
  ( = = = = = = = = = = = = = = = = = = = = = = = = )
  ( constant rpm; V2 is only for design )
  ( = = = = = = = = = = = = = = = = = = = = = = = = )

    V1 = 1900   ( n [ o / min ] )
    V2 = 0.6    ( f [ mm / o  ] )

  ( * )

    G97 S = V1 M03 M42 M08

  ( = = = = = = = = = = = = = = = = = = = = = = = = )
  ( variable rpm for cnc with such a function )
  ( = = = = = = = = = = = = = = = = = = = = = = = = )

    V1 = 200    ( V [ M / min ] )
    V2 = 0.6    ( f [ mm / o  ] )

  ( * )

    G96 S = V1 M03 M42 M08

  ( = = = = = = = = = = = = = = = = = = = = = = = = )
  ( variable rpm for cnc without such a function )
  ( = = = = = = = = = = = = = = = = = = = = = = = = )

    V1 = 200    ( V [ M / min ] )
    V2 = 0.6    ( f [ mm / o  ] )

  ( * )

    V1 = V1 * 320 / diameter
           ( 1000 / 3.142 = 318.269 )
           ( 1000 / pi    = 318.310 )
           ( if you consider 318, than rounding to 320 means 99.375% precision )
           ( i guess you can tolerate 0.625% )

    G97 S = V1 M03 M42 M08

  ( = = = = = = = = = = = = = = = = = = = = = = = = )
  ( variable rpm  for newer cnc / control )
  ( = = = = = = = = = = = = = = = = = = = = = = = = )

    V1 = 200    ( V [ M / min ] )
    V2 = 0.6    ( f [ mm / o  ] )

  ( * )

    V1 = V1 * 320 / VSIOX ( carefull at buffer read ahead / delay )
                          ( does not work inside comp, thus between G41 / G42 and G40 )
                          ( in such a case, use common variables or real numbers )

    G97 S = V1 M03 M42 M08

  ( = = = = = = = = = = = = = = = = = = = = = = = = )
  ( variable rpm for newer cnc / control - handling rpms 2 high )
  ( = = = = = = = = = = = = = = = = = = = = = = = = )

    V1 = 200    ( V [ M / min ] )
    V2 = 0.6    ( f [ mm / o  ] )

  ( * )

    G50 S2000
    CALL OLMT V3 = VSIOX V4 = 2000 ( returns specific rpm for diameter=V3; rpm not higher than V4; V4 should contain same value as G50 )

    G97 S = V3 M03 M42 M08

  ( some code here )

   M02 / RTS

  ( . . . . . . . . . . . . )

   OLMT

    V3 = V1 * 320 / V3 ( or  V1 * 1000 / [ 3.14159265 * V3 ] , thus V1 / V3 * 318.30988618 ; 8 digits max )
    ( i can handle calculations beyond the 9th digit, by multipling & dividing with 10^x, but is not the case, and such cases s**k )
    IF [ V3 LE V4 ] NJUMP ( © teahole )
         V3 = V4
         NJUMP

   RTS

  ( = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = )
  ( variable rpm for newer cnc / control -  S axis ignore response    )
  ( linear axis movement does not wait for spindle to reach exact rpm )
  ( thus, after X+ & Z-, spindle may continue varying rpm during Z-   )
  ( = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = )

    V1 = 200    ( V [ M / min ] )
    V2 = 0.6    ( f [ mm / o  ] )

  ( * )

    G96 S = V1 M03 M42 M08
    G1/2/3 IP ( = in position ) F = V2 G95 M61
    G1/2/3 ... etc
                                           M60
 
ok ... now about ssv :)

... somehow it replaces a tailstock, more exactly it replaces a folowing tailstock
... i said "somehow" because it will fail where a folowing tailstock will work, thus i might say that it replaces a " folowing tailstock " not 100%, but 20%; maybe i exagerated with the 20%, but real numbers are more close to 20% than to 100% :)
... also "folowing tailstock" is not a common cnc option / accessory, thus "ssv" is there to cover 20% of this missing option / accessory

... if a "folowing tailstock" would be there, than you would setup it and go, in no time
... "ssv" requires trials, and is a bit of lotery :
...... what is the amplitude? how much ± on the rpm ?
...... what is the timing ?
...... but i don't wanna hit big amplitude and low timing, because i will compromise the S engine :) is this part payed well ? does it cover the accelerated spindle wear ?
...... about parts :
............ if a lot, thus mass production, than maybe you will be covered and you may be comfortable with the spindle wear
............ if uniques, single parts, than maybe you can ignore this cost, and just deliver that part

so, "ssv" means "folowing tailtstock" *20% * lotery chances :)

on the other side :
... if this is a rough operation, than, if constant rpm fails, "ssv" may save the day
... if this is a finish operation, than "ssv" will deliver better surface finish, but not as good as a grinder; again, a grinder is faster to setup and stable, while "ssv" is .... it just is :) thus, when "cilindricity" is required, "ssv" has a big chance to fail

so, "ssv" work very well :
... requires setup time
... comes with S axis motor accelerated wear on "big amplitude + low timing"
... comes with less S axis motor accelerated wear on "low amplitude + big timing", and in this case, if there is no "ssv" i think you may just change the rpm / G97
... more for roughing

it can not win against a "folowing taistock" or a "grinder", and cases that it covers are particular ; it may work, or it may not work, and when it does, it does not eliminate vibrations, but it reduces :)
 
actually, the "ssv" does not reduce vibrations

yes, it reduces chatter :) actually changing cutting specs, changing the spindle speed harmonic does not eliminate vibrations, it just "moves" the energy from one place to another

"chatter" = "tool vibration" + "material vibration"

"ssv" makes that "tool oscilating vibration" + " S axis motor oscilating vibration "

if this oscilation is little, than maybe is ok :)

imagine your phone on low vibrations, as low as you can feel, but all day vibrating in your pocket :) this is what happens with the machine
 
in the end, why do you need a macro ? is just 2-3 codes / coding this is simple

Seems like the math and setup should be fairly simple. Not being expert in Okuma variables = not so simple.
How to integrate a time factor for the oscillation.... I'm clueless.
 
Seems like the math and setup should be fairly simple. Not being expert in Okuma variables = not so simple.
How to integrate a time factor for the oscillation.... I'm clueless.

G4 F1. (= 1 second dwell)

That's not the part that would stump me. What gets me is the machine can either move an axis or perform variable calculations. Really, the spindle variation needs to happen in the background during axis movement. I'm not sure how to get that happening on an older control.

I would like to be proven wrong but I don't think this will work. You could get the spindle to oscillate just like the newer machines will (m695 on the LB3K) but I don't see how you could move an axis at the same time. I suppose you could try to include small incremental axis movements into the spindle variance loop but the motion wouldn't be very smooth I don't think.

You'd calc a new rpm, move a little then loop it. I guess if your time was 1 second you'd have to limit axis motion to however far it could travel in, say, .9 seconds so that it was never waiting on axis motion to stop before performing the next rpm calc.

Just a few thoughts I had.
 
Oooh oohh! I got it.

But you'd have to have a sub spindle machine with two turrets.

You could have the sub drive the work piece and perform the continual rpm variance.

Then, on the other spindle, you could use the main spindle turret to perform the turn work.

Half the machine moves the axis at a constant rate, the other half screws around with the rpm on a continual basis.

If I had such a machine here, i'd try it.
 
Seems like the math and setup should be fairly simple. Not being expert in Okuma variables = not so simple. How to integrate a time factor for the oscillation.... I'm clueless.

hy :) you need to determine main parameters for the ssv and code them

i would post how i would do that in my lathe :) in the movie you shared, at 3.07 are the parameters for Haas :
... rpm variation = np [ rpm ]; thus rpm will vary between n-np ... n+np, where n is reference, base value for rpm
... cycle time = ct [0.1s]; if ct=12, than period of cycle will be 12*0.1=1.2seconds

thus, the variations/harmonic is determined : boundings, limits, by "np", and timing, by "ct"

coding for that sould be

G0 approach
G97 S=n=base
G??? parameter_1=np parameter_2=ct
cut
disengage tool from material
G???-1 > generally, a code with "-1" order disables a function

do you know those codes for your machine ?
the activation and deactivation code ?
activation code should have a syntax, in which to present parameters_1 and _2 :)
 
Last edited:
do you know those codes for your machine ?

so far i found only infos about rpm variations when threading; i don't have examples for SSV for okuma

this one is for threading :

G00 X200 Z200
M816 ←VSST function VALID
M1211 ←Spindle speed auto change control ON
VFLTW=50 VFLTC=2 ←Change to W = 50 and C = 2.
G31 X150 Z50 F1.5
X149
M1210 ←Spindle speed auto change control OFF
M817 ←VSST function INVALID
G00 X500 Z500

it makes sense, if u ask me ... just search codes for your cnc, and i will help you implement them, if you wish :)
 
Deadly, the issue is that his machine does not have the option to use Okumas spindle speed variation.
 
hy, just be sure that your machine delivers ssv

i would ask the dealer if this is installed on the machine, and after i would ask for codes :) is good to know that the machine can do that

if not, than ... life goes on :) ssv not there is not a big loss :) u can not run this function if it is not installed

maybe i am wrong, but i think you are more curious about this ssv, rather than you actually need it :)
 
hy, please check attachement :)

do you have the optional spec " harmonic spindle speed control ( hssc ) " ? this is how Okuma calls it :)

if so, than you may tune it :) kindly !
 

Attachments

  • 01.jpg
    01.jpg
    22.4 KB · Views: 761
hy, please check attachement :)

do you have the optional spec " harmonic spindle speed control ( hssc ) " ? this is how Okuma calls it :)

if so, than you may tune it :) kindly !

Check the first post. He's got osp7000. No hss on that one.
 
i have experience only with osp300 :)

today i was looking for something, and i saw this function by accident, so i thought to post it ...
 








 
Back
Top