this one is more general
CALL OPNL LV01 = ... LV02 = ... LV03 = ...
...... LV01 : 0 for leaving to home, 1 for coming to clamp
...... LV02 : forces a temporary X+limit wherever is the turret
...... LV03 : active_line_from_tailstock_table
examples :
... normal clamp ( turret must be up ) : CALL OPNL LV01 =1 LV02 = 0 LV03 = 1
... fast leave, right after the tool cut and had gone to clearance position ( turret random on X ) : CALL OPNL LV01 =0 LV02 = 1 LV03 = 1
... 2nd (multiple) clamping positions : CALL OPNL LV01 =1 LV02 = 0 LV03 = 2
LV05 is a general on/offCode:OPNL ( 0 >>> , 1 <<< ** 0 check for X+ limit , 1 don't / force X+limit ** SP ) LV05 = 1 IF [ LV05 EQ 0 ] NEND IF [ LV02 EQ 0 ] NSKP1 LV04 = VPVLX VPVLX = VAPAX - 0.1 NSKP1 ( M05 ) M156 G195 SP=LV03 IF [ LV01 EQ 1 ] N1 GOTO N2 N1 M56 GOTO N3 N2 M55 M157 GOTO N3 N3 IF [ LV02 EQ 0 ] NSKP2 VPVLX = LV04 LV02 = 0 NSKP2 NEND RTS
...... LV05 = 0 is good when testing operations, if testing can be done without the tailstock; it allows the program to keep the tailstock lines, but it behaves like there is no tailstock
...... LV05 = 1 is for nomal mode