32.6.2.1 Specifying Subroutines - JSR/JSRP
To create a subroutine screen, on the [Screen List Window]
select [New Screen], or on the [Screen] menu click [New
Screen].
The destinations you can specify for a subroutine instruction
are SUB-01 to SUB-32.
The subroutine name is fixed and cannot be arbitrarily
named.
Program Example
JSR
When the normally open instruction is turned ON to indicate a
problem, the JSR instruction will be executed. The JSR instruction
jumps to the subroutine screen "SUB-01" and executes the program.
When "SUB-01" ends, the program will return to the rung after the
JSR instruction and continue executing. After the first scan, if
the normally open instruction is closed and power is ON, the JSR
instruction will execute.
Place JSR instructions at the end of rungs.
JSRP
When the upward transition of a normally open instruction is
detected the JSRP instruction executes. The JSRP instruction jumps
to the subroutine screen "SUB-01" and executes the program. When
"SUB-01" ends, the program will return to the rung after the JSRP
instruction and continue executing. After the first scan, even if
the normally open instruction is closed and power continues to
flow, the JSRP instruction will not execute.
After one scan, the subroutine processing is not performed, and
the processing in the next rung is performed.
Place JSRP instructions at the end of rungs.
|