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:

  1. Open a PLC-object.

  2. 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-object program.iecst) is already assigned within the existing PLC-objects.

  3. 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.

  4. Save the PLC-object: menu fileSave

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.