Skip to main content

Compiler Error C0143

Message: The property '<property name>' cannot be used in this context because it lacks the get accessor

Possible error cause: The property does not have Get access.

Error correction: Make sure that the property has a Get access definition.

Example 400. Example of the error:
PROGRAM PLC_PRG
VAR
    i : INT;
    inst: FB;
END_VAR

i := inst.Prop;

FUNCTION_BLOCK FB
VAR
END_VAR

PROPERTY Prop : INT
Set;

Message:

C0143: The property 'Prop' cannot be used in this context because it lacks the get accessor