2-18 Series 90-30/20/Micro Programmable Controllers Reference Manual September 1998 GFK-0467K
2
Examples of Using Subroutine Blocks
As an example, the logic for a program could be divided into three subroutines, each of which
could be called as needed from the program. In this example, the program block might contain
little logic, serving primarily to sequence the subroutine blocks.
a45661
PROGRAM
SUBROUTINE
4
SUBROUTINE
3
SUBROUTINE
2
A subroutine block can be used many times as the program executes. Logic which needs to be
repeated several times in a program could be entered in a subroutine block. Calls would then be
made to that subroutine block to access the logic. In this way, total program size is reduced.
PROGRAM
a45662
SUBROUTINE
2