Assigning program type within PLC-object
Condition for the assignment: You have already created/saved the code or the logic for the program type (e.g. the ST-code). The program type has a unique name (e.g. MyFirstProgram
).
How to assign a →program type within a PLC-object:
-
Open a PLC-object.
-
Search for the following lines in the opened editor for the PLC-object:
Syntax PROGRAM instance-name_1 WITH task-name :
program-type-name_1;
Example PROGRAM Program1 WITH DefaultTask :
Program1;
-
After you have created a project, the existing program type
Program1
(defined in the ST-objectprogram.iecst
) is already assigned within the existing PLC-objects. -
Replace the name of the given program type (e.g.
Program1
) by the name of your program type (e.g.MyFirstProgram
).
Use the content assist to enter the assigned program type within the PLC-object quicker. -
Save the PLC-object: menu File – Save
Do you want to load more than one program onto the PLC for execution? Then you might want to declare more tasks within the PLC-object and assign more program types within the PLC-object.