8.2
Subroutines
The program can consist of one Main program that executes completely during each CPU
sweep.
Main
Program
Or a program can be divided into subroutines. The maximum size of a main program or
subroutine block is 64kB. The program can contain up to 255 subroutines.
Subroutines can simplify programming and reduce the overall amount of logic. Each
subroutine can be called as needed. The main program might serve primarily to sequence
the subroutine blocks.
Program
Subroutine
2
3
4
Subroutine
Subroutine
A subroutine block can be called many times as the program executes. Logic that should
be repeated can be placed in a subroutine block, reducing total program size.
Program
Subroutine
2
In addition to being called from the program, subroutine blocks can also be called by
other subroutine blocks. A subroutine block can even call itself.
Main
Program
Subroutine
2
3
4
Subroutine
Subroutine
The main program is level 1. The program can include up to eight additional nested call
levels.
8.2.1
Declaring a Subroutine
A subroutine must be declared through the block declaration editor of the programming
software.
104
GFK-1503E
VersaMax PLC User Manual
For public disclosure
Содержание VersaMax PLC
Страница 1: ...GE Intelligent Platforms GFK 1503E VersaMax PLC User Manual September 2015 For public disclosure ...
Страница 16: ...Notes 16 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Страница 38: ...Notes 38 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Страница 50: ...Notes 50 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Страница 92: ...Notes 92 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Страница 112: ...Notes 112 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Страница 224: ...Notes 224 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Страница 292: ...Notes 292 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Страница 316: ...Notes 316 GFK 1503E VersaMax PLC User Manual For public disclosure ...
Страница 317: ......
Страница 318: ...GE Intelligent Platforms 1 800 433 2682 1 434 978 5100 www ge ip com GFK 1503E For public disclosure ...