Programs
Programs, also known as program organization units (POUs), are logical programming units
describing operations between variables of a process. Programs describe either
sequential or cyclic operations. Cyclic programs are executed at each target system
cycle. Sequential programs, representing sequential operations, are grouped together.
The execution of sequential programs has a dynamic behavior.
Programs before and after sequential programs describe cyclic operations. These are
cyclic programs which are not time-dependent. Cyclic programs are systematically
executed at the beginning of each run time cycle. Main sequential programs (at the top
of the hierarchy) are executed according to their respective dynamic behavior.
- Begin: Cyclic operations (FDB, LD, ST)
- Sequential: Sequential operations (SFC, SFC child)
- End: Cyclic operations (FDB, LD, ST)
Programs located at the beginning of a cycle (before sequential programs) typically
describe preliminary operations on input controllers to build high level filtered
variables. Sequential programs frequently use these variables. Programs located at the
end of the cycle (after sequential programs) typically describe security operations on
the variables operated on by sequential programs, before sending values to output
controllers.
Programs are described using the available graphic or literal languages. Specify the
programming language when creating a program; the programming language cannot be changed
for an existing program.
POUs defined as programs are executed on the target system respecting the order shown in
the Programs section.
Respect the hierarchy of programs. Programs are linked together in a hierarchical tree.
Those placed at the top of the hierarchy are activated by the system. Child-programs
(lower level of the hierarchy) are activated by their parent.
Projects can contain up to 65 536 programs.
For programs within a project and the global library, names are limited to 128 characters
beginning with a letter followed by letters, digits, and single underscores. The last
character for a program name must be a letter or digit; program names cannot end with an
underscore character. Reserved words, defined words, or data types such as, elementary,
structures, or arrays, are not valid names. The same type of elements within a scope
must have unique names.
Provide Feedback