Detailed description
2.11 Subroutine call through NC language replacement
Basic logic functions: Mode group, channel, program operation, reset response (K1)
192 Function Manual, 11/2006, 6FC5397-0BP10-2BA0
Example S1 is the leading spindle and S2 is the following spindle:
Typically, the machine manufacturer, is aware of the following spindle(s) that are affected by
a gear stage change in case of a double spindle, and addresses these spindles directly.
N1000 PROC LANG_SUB DISPLOF SBLOF
N1100 IF($P_SUB_AXFCT ==1)
;
Replacement due to gear stage change
N1140
DELAYFSTON ;
Start Stop Delay Area
N1150
COUPOF(S2,S1) ;
Deactivate synchronous spindle coupling
N1160
;Execute gear stage change separately for leading and following spindle:
N1170
M1=$P_SUB_GEAR M2=$P_SUB_GEAR
N1180
DELAYFSTON ;
End of Stop Delay Area
N1190
COUPON(S2,S1) ;
Activate synchronous spindle coupling
N1200 ENDIF
...
N9999 RET
Example of replacement subroutine for gear stage change
Using the system variables $P_SUB_LA and $P_SUB_CA
N1000 PROC LANG_SUB DISPLOF SBLOF
N1010 DEF AXIS _LA
;
Auxiliary memory for leading axis / leading spindle
N1020 DEF AXIS _CA
;
Auxiliary memory for following axis / following
spindle
N1030 DEF INT _GEAR
;
Auxiliary memory for gear stage
...
N1100 IF($P_SUB_AXFCT==1)
;
Replacement due to gear stage change
N1110
_GEAR=$P_SUB_GEAR ;
Save gear stage to be activated temporarily
N1120
_LA=$P_SUB_LA ;
Save axis identifier of the leading spindle
temporarily
N1130
_CA=$P_SUB_CA ;
Save axis identifier of the following spindle
temporarily
N1140
DELAYFSTON ;
Start Stop Delay Area
N1150
COUPOF(_CA,_LA) ;
Deactivate synchronous spindle coupling
N1160
;Execute gear stage change for leading and following spindle:
N1170
M[AXTOSPI(_LA)]=_GEAR M[AXTOSPI(_CA)]=_GEAR
N1180
DELAYFSTOF ;
End of Stop Delay Area
N1190
COUPON(_CA,_LA) ;
Activate synchronous spindle coupling
N1200 ENDIF
...
N9999 RET