hy blastermaster i can't be specific, because :
... that code seems to be in inch, and i'm metric
... i don't have an okuma with sub spindle
... i don't know :
...... what G111 does on your machine; may be a macro, or turret b ccs, etc
...... where is the home for your machine ( x40 z0.05 or x40.0 z5.0 )
...... why the coordinates from 1st line <> last line
*but here are a few sugestions, so to make it execute faster / kindly
Code:
// some comment
N**** home_position
T050505 ( M66 ) G96 S M03 M08 G0 X2.1598 Z0.5 M63 G141 G111 F0.001 G95/G94 (*1)
G1 X0
Z0.01 (*2)
G0 home_position T0500 M05 M63 M09 ( M230 ) (*3)
(
*1 you may avoid G90, as it should be implicit
G95/G94 is missing from your code
such things depends on machine defaults, your programing style/method, etc
*2 your code continues with X0.75; it seems to be a face operation; going to X0.75
should be in rapid, or even better, it should be avoided, as long as turret will
continue it's movement, on z, away from the part
*3 your code:
... is passing the actual g96 rpm into g97, then rpm stops;
you may stop directly, without switching modes
... turret is leaving the operation by executing 2 motions, instead of only
one; also your 1st motion is too short, and is executed before the spindle
stops, and as a result, turret will wait for rpm to drop below stop confirmation
)