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

SUBROUTINE 2

 

 

 

 

PROGRAM

 

 

SUBROUTINE

 

 

 

 

3

 

 

 

 

 

 

 

 

 

 

SUBROUTINE 4

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.

a45662

PROGRAM

SUBROUTINE 2

2-18

Series 90-30/20/Micro Programmable Controllers Reference Manual– September 1998

GFK-0467K

Page 38
Image 38
GE 90-30/20/Micro manual Examples of Using Subroutine Blocks