An identifier is accepted for ST, but not in the PLC-object. Refactoring of the identifier does not work as expected
Symptom:
-
It is possible to use an →identifier within an ST-object. However, the same identifier within the PLC-object is highlighted as an error.
Example: The identifierINTERVAL
for a →program can be entered within the ST-editor. But whenINTERVAL
is entered as program →instance within the PLC-object,INTERVAL
is highlighted as faulty within this PLC-object. -
When trying to use the refactoring functionality in order to rename the identifier within the ST-editor – this should rename the faulty identifier within the editor for the PLC-object at the same time, only the identifier within the ST-object is renamed. The identifier within the PLC-object is still the original, faulty one.
Cause:
-
The identifier corresponds to a →keyword that is reserved according to →IEC-standard. Some of the keywords are possible for ST but not within an PLC-object. See "Reserved keywords in ST" for more information.
-
The refactoring functionality is not applied to faulty identifiers.
Workaround 1:
-
Open the Problems view where the errors for the objects are listed.
-
Double-click the message in order to go to the appropriate error in the PLC-object.
-
Correct the faulty term so that it is not a keyword anymore.
-
Save the changed content.
-
If the reference for the object cannot be resolved after this change, also correct the identifier within the ST-object (e.g. the identifier for the program).
Workaround 2: If you changed the identifiers to an unaccepted keyword (e.g. by using the refactoring functionality) just a moment ago: Undo this action.