Attention
IronPLC can only run very simple programs. The steps described are accurate but many language features are not yet supported.
P0003¶
- Code
P0003
- Message
Unmatched character sequence in source text
The compiler encountered an unexpected token while parsing the source text.
This error occurs when the parser encounters text that is not valid IEC 61131-3 syntax.
Example¶
The following code will generate error P0003:
TYPE
CUSTOM_STRUCT : STRUCT& (* Error: Invalid character '&' *)
NAME: BOOL;
END_STRUCT;
END_TYPE
The parser encountered the & character in an unexpected position where it expected valid identifier characters.
To fix this error, remove the invalid character and use valid IEC 61131-3 syntax:
TYPE
CUSTOM_STRUCT : STRUCT (* Correct: No invalid characters *)
NAME: BOOL;
END_STRUCT;
END_TYPE