Subroutine Handling
(Original Document)
JSR / LAB Method
The example below shows a series of 3 user logic networks, the last of which is used for an up-counting subroutine.
When input 100001 to the L9_JSR block in network 2 of segment 1 transitions from OFF to ON, the logic scan jumps to subroutine #1 in network 1 of subroutine segment.
The subroutine will internally loop on itself ten times, counted by the L9_ADD block. The first nine loops end with the L9_JSR block in the subroutine (network 1 of subroutine segment) sending the scan back to the L9_LAB block. Upon completion of the tenth loop, the L9_RET block sends the logic scan back to the scheduled logic at the L9_JSR node in network 2 of segment 1.