Attention
These docs are a bit ambitious. The steps described are accurate but IronPLC cannot yet run programs.
P0003¶
- Code
P0003
- Message
Structure has more than one element with name
This error occurs when a structure type declaration has duplicate element names.
Example¶
The following code will generate error P0003:
TYPE
CustomStruct : STRUCT
Name: BOOL;
Name: BOOL; (* Error: Duplicate element name *)
END_STRUCT;
END_TYPE
The structure has two elements with the same name Name, which is not allowed.
To fix this error, ensure all element names in a structure are unique:
TYPE
CustomStruct : STRUCT
Name1: BOOL;
Name2: BOOL; (* Different name *)
END_STRUCT;
END_TYPE