Declaration of a program in ST

Syntax
PROGRAM name
 
(* optional: declaration of variables *)
(* optional: body of program *)
 
END_PROGRAM

Meaning

declaration of a →program, name must be an →IEC-identifier.
The declaration is possible within an ST-object – the declaration is done within the global →namespace. After you have created a new project, a program is already declared in the predefined ST-object. PROGRAM and END_PROGRAM are →keywords for the declaration of the program.

Example
PROGRAM Motor
END_PROGRAM

You are able to use the following language elements for ST within a program:

The usage of these language elements makes it possible to use other elements (e.g. declaration of STRING variables within the section VAR ... END_VAR ) as well. Such elements are not listed here.