Subroutines - Toshiba PROSEC T1-16S User Manual

Programmable controller basic hardware and function
Hide thumbs Also See for PROSEC T1-16S:
Table of Contents

Advertisement

6.6.5

Subroutines

In the program type 'Subroutine', The following number of subroutines can be
programmed.
The T1-16S supports up to 256 subroutines.
The subroutine is not a independent program. It is called from other program types
(main program, sub-program, interrupt program) and from other subroutines.
One subroutine is started with the SUBR instruction, and ended by the RET
instruction.
It is necessary to assign a subroutine number to the SUBR instruction. The available
subroutine numbers are 0 to 255.
[ SUBR (000) ]
Subroutine number
The RET instruction has no subroutine number.
The instruction that calls a registered subroutine is the CALL instruction. The CALL
instruction has the subroutine number to be called.
[ CALL N.000 ]
Subroutine number
Main program
[ CALL N.000 ]
NOTE
(1) Multiple subroutines can be programmed in a block. However, one
(2) From the inside of a subroutine, other subroutines can be called
Execution
subroutine in one block is recommended.
(nesting). Its allowable level is up to 3 levels.
6. Programming Information
Subroutine
flow
[ SUBR (000) ]
Basic Hardware and Function
6F3B0253
[ RET ]
97

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents