Attention
These docs are a bit ambitious. The steps described are accurate but IronPLC cannot yet run programs.
P4013¶
- Code
P4013
- Message
POU declaration name is duplicated
This error occurs when a POU (Program Organization Unit) declaration name is duplicated within the same scope.
Example¶
The following code will generate error P4013:
FUNCTION_BLOCK MyFunction
END_FUNCTION_BLOCK
FUNCTION_BLOCK MyFunction (* Error: Duplicate POU name *)
END_FUNCTION_BLOCK
The function block MyFunction is declared twice, which is not allowed.
To fix this error, ensure all POU names are unique within their scope:
FUNCTION_BLOCK MyFunction1
END_FUNCTION_BLOCK
FUNCTION_BLOCK MyFunction2 (* Correct: Different name *)
END_FUNCTION_BLOCK