1) consider that machine is not moving; i think you need something like this :
V1=300 ( M / min )
V2=0.15 ( mm / o )
G0 X20 Z2.5 G96 S=V1 M03 M08 M42
i have never tried this kind of syntax, that should buffer S , X and Z motors at the same time. So all movements should start at same moment, and finish not necessary at same moment ...
please, llok at attached file for this, or just check here :
http://www.okuma.com/blog-cycle-time-reduction-spindle-m-spindle
2) pure extra-virgin and eco-bio-code
V1=300 ( M / min )
V2=0.15 ( mm / o )
G0 X20 Z2.5
G96 S=V1 M03 M08 M42 ( start G96 here at V1 speed )
G1 Z-10 F=V2 F95
...X50
...Z-10-20 ( part finished here )
...X50+2*0.3 Z-10-20+0.3 ( tool disengage )
................( variations starts here )
G97 S = V1 * 1000 / [ 3.142 * ABS [ VSIOX ] ] ( var_1 ) ( change from G96 to G97 keeping current rpm )
..... ( or )
G97 S = ... ( var_2 ) ( change from G96 to G97 keeping a desired/specific rpm )
..... ( or )
G97 S = V11 * 1000 / [ 3.142 * new_X ] ( var_3 ) ( change from G96 to G97 targeting desired rpm for next operation )
................( variations ends here )
G0 X.. Z.. ( send turret to safe/indexing/temporary position )
G0 X=new_X Z...
G96 S=V11 M03 M08 M42 ( start G96 here at V11<>V1 speed ) ( if you used var_3 than machine rpm will not change here, only G97 will switch to G96 at current rpm)
let's say you opted for var_3, but you don't like it because machine rpm is to high and there is no use for the spindle to spin like that waiting for the tool to come ... in this case you can go like this:
V1=300 ( M / min )
V2=0.15 ( mm / o )
G0 X20 Z2.5
G96 S=V1 M03 M08 M42 ( start G96 here at V1 speed )
G1 Z-10 F=V2 F95
...X50
...Z-10-20 ( part finished here )
...X50+2*0.3 Z-10-20+0.3 ( tool disengage )
................( variations starts here )
G97 S = V1 * 1000 / [ 3.142 * ABS [ VSIOX ] ] ( var_1 ) ( change from G96 to G97 keeping current rpm )
..... ( or )
G97 S = ... ( var_2 ) ( change from G96 to G97 keeping a desired/specific rpm )
................( variations ends here )
G0 X.. Z.. ( send turret to safe/indexing/temporary position )
G0 X=new_X Z...
G96 S=V11 M03 M08 M42 ( start G96 here at V11<>V1 speed )
but in this case when machine reaches this last line, rpm changing takes too long; is like the tool has arrived and you must wait for the spindle to reach the necessary rpm, and this duration is long, machine reaction time is slow when changing rpm ; so try this :
V1=300 ( M / min )
V2=0.15 ( mm / o )
G0 X20 Z2.5
G96 S=V1 M03 M08 M42 ( start G96 here at V1 speed )
G1 Z-10 F=V2 F95
...X50
...Z-10-20 ( part finished here )
...X50+2*0.3 Z-10-20+0.3 ( tool disengage )
................( variations starts here )
G97 S = V1 * 1000 / [ 3.142 * ABS [ VSIOX ] ] ( var_1 ) ( change from G96 to G97 keeping current rpm )
..... ( or )
G97 S = ... ( var_2 ) ( change from G96 to G97 keeping a desired/specific rpm )
................( variations ends here )
G0 X.. Z.. ( send turret to safe/indexing/temporary position )
M/G_ignore_response_from_S_axis_ON
G97 S = V11 * 1000 / [ 3.142 * new_X ] ( var_4 ) ( still in G97 target desired rpm for next operation )
G0 X=new_X Z... ( turret should start moving while rpm is changing )
M/G_ignore_response_from_S_axis_OFF
G96 S=V11 M03 M08 M42 ( start G96 here at V11<>V1 speed )
i don't know what M or G code will turn OFF/ON confirmation from S axis, but if it works, will allow simultaneously to move the turret and change the rpm
if someone will give you the G/M code, you should be able to use it in the last example
kindly !