Attention

These docs are a bit ambitious. The steps described are accurate but IronPLC cannot yet run programs.

P0011

Code

P0011

Message

Program task configuration reference not defined

This error occurs when a program configuration references a task that is not defined in the resource.

Example

The following code will generate error P0011:

CONFIGURATION config
    RESOURCE res ON PLC
       PROGRAM plc_task_instance WITH plc_task : main;  (* Error: plc_task not defined *)
    END_RESOURCE
END_CONFIGURATION

The program plc_task_instance references a task named plc_task, but this task is not defined in the resource.

To fix this error, define the task before referencing it:

CONFIGURATION config
    RESOURCE res ON PLC
       TASK plc_task(INTERVAL := T#100ms, PRIORITY := 1);  (* Define the task *)
       PROGRAM plc_task_instance WITH plc_task : main;  (* Correct: task is now defined *)
    END_RESOURCE
END_CONFIGURATION