L9_JSR: Jump to Subroutine (2 Nodes)
(Original Document)
Naming
Name in LL984 Editor
Function Block Name
name of legacy 984 instruction
name in other tools and editors like:
  • Type Library Browser
  • Data Editor
  • Animation Tables
  • Search Results
Function Description
When the logic scan encounters an enabled JSR function block, it stops the normal logic scan and jumps to the specified source subroutine in the subroutine segment of ladder logic.
You can use a JSR function block anywhere in user logic, even within the subroutine segment. The process of calling one subroutine from another subroutine is called nesting. The system allows you to nest up to 100 subroutines; however, we recommend that you use no more than 3 nesting levels. You may also perform a recursive form of nesting called looping, whereby a JSR call within the subroutine recalls a subroutine.
Representation
Parameters
Input Pin
Name
Data Type
Address Range
Meaning
Top
ENABLE
ON = enables the source subroutine
Node
Node Type
Name
Data Type
Address Range
Meaning
Top
IN
SOURCE
UINT
%MW
Source pointer (indicator of the subroutine to which the logic scan will jump), entered explicitly as an integer or stored in a memory word; range:
1 ... 1 023
Bottom
IN
CONST
UINT
1
always enter the constant value 1
Output Pin
Name
Data Type
Address Range
Meaning
Top
OUT
BOOL
echoes state of the top input
Bottom
ERR
BOOL
event in subroutine jump
ON if jump can not be executed, label does not exist or nesting level > 100