6F3B0250
7. Instructions
FUN 137
SUBR
Subroutine entry
Expression
Function
This instruction indicates the begging of a subroutine.
Execution condition
Input | Operation |
-Execution
Output
-
Operand
|
| Name |
|
| Device |
|
|
|
|
|
| Register |
|
| Constant | Index | ||||
|
|
| X | Y | R | S | T. | C. | XW | YW | RW | SW | T | C | D | I | J | K |
|
|
| n | Subroutine |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Ö (Note) |
|
|
| number |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Example |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The begging of the subroutine number 8 is indicated.
Main program | Subroutine |
[ CALL N.008 ]
Note
[ SUBR (008)]
[ RET ]
·The possible subroutine number is 0 to 15 (T1) or 0 to 255 (T1S).
·Refer to the CALL instruction (FUN 128) and the RET instruction (FUN 129).
·The SUBR instruction can be programmed only in the program type ‘Subroutine’.
·Nesting of subroutine is not allowed. That is, the CALL instruction cannot be used in a subroutine.
·No other instruction cannot be placed on the rung of the SUBR instruction.
Basic Hardware and Function 225
CTi Automation - Phone: 800.894.0412 - Fax: 208.368.0415 - Web: www.ctiautomation.net - Email: info@ctiautomation.net