GSK218M CNC System Connection and PLC Manual
38
Control condition:
ACT=0,execute the next instruction behind CALL.
ACT=1,call subprogram which number is specified.
Parameter:
Subprogram: specifies the subprogram number of a subprogram to be coded following this
instruction. Range: 0~99.
5.4 SP(Subprogram)
Function:
The SP functional instruction is used to create a subprogram. A subprogram number is specified
as a subprogram name. SP is use with the SPE functional instruction to specify the subprogram
range.
Note:
1. A subprogram must be written after END2.
2. Another subprogram cannot be nested into a subprogram.
Format:
Parameter:
Subprogram number: specifies the subprogram label of a subprogram to be coded following this
instruction. Range: 0~99.
5.5 SPE(subprogram end)
Function:
* it is used to specify the range of subprogram when SPE is used with the S P.
* the control will return to the main program which called the subprogram when the
instruction is executed.
* the subprogram is written after END2.
SP
Subprogram number