Skip to main content

Compiler Error C0051

Message: Single byte string expected for an attribute value instead of '<value>‘.

Possible error cause: A string does not appear at the displayed location as expected.

Error correction: Replace the current value with a string.

Example 350. Example of the error:
PROGRAM PLC_PRG
{IF hasattribute(pou: MyPOU, MyAttribute)}
{END_IF}

Message:

C0051: Single byte string expected for an attribute value instead of MyAttribute.

Error correction:

PROGRAM PLC_PRG
{IF hasattribute(pou: MyPOU, 'MyAttribute')}
{END_IF}