
16.CUSTOM MACRO PROGRAMMING B-63944EN/02
- 460 -
16.7.12 Subprogram Calls Using an S Code
By enabling subprograms to be called with an S code in a parameter, a
subprogram can be called each time the S code is specified in the
machining program.
O0001 ;
:
S23 ;
:
M30 ;
O9029 ;
:
:
:
M99 ;
Bit 1 of parameter No. 6007 = 1
Explanation
- Call
By setting bit 1 (SCS) of parameter No. 6007 to 1, subprogram O9029
can be called each time a S code is specified in a machining program.
An S code specified in a machining program is assigned to common
variable #147.
- Repetition
As with a simple call, a number of repetitions from 1 to 99999999 can
be specified at address L.
- Argument specification
Argument specification is not allowed.
Limitation
• To call another program in a program called using an S code, only
G65, M98, G66, or G66.1 can be used normally.
• When bit 6 (GMP) of parameter No. 6008 is set to 1, a call using a
G code can be performed in a program called using an S code.