Warning PLCNext variable name

Hello, After change of library PLCNextbase from 1.3 to 1.41 I get this warning in PLCNextEng. [attachment]WarningMessage.png[/attachment] Why is there a warning on the same variable name? Best regards Stefan

I don’t know why this has suddenly appeared with the new library version, but that type of warning makes sense, and can be reproduced as follows: - Create a new enum data type: [attachment]2021-09-08_10-16-36.jpg[/attachment] - Create new program variables, one of which has the same name and type as one of the enum elements: [attachment]2021-09-08_10-18-26.jpg[/attachment] - Use the variable with the ambiguous name in a code worksheet. A warning immediately appears, saying that the variable name is ambiguous. [attachment]2021-09-08_10-20-26.jpg[/attachment] - Reference the ambiguous variable a second time, and a second warning appears. [attachment]2021-09-08_10-22-56.jpg[/attachment] - If you really want to reference the enum element, qualify the variable name (i.e. MyEnumType#Green), or give your variable a name that isn’t the same as an element of an enum type. .

2021-09-08_10-16-36.jpg



Thanks for reply, Maybe I can contact PlcNextbase team to change the enum name, test is a quite common variable name. Br Stefan

Yes, that’s a good idea. :slight_smile: You could suggest that they prefix their enum elements with PBCL_, like they do with other parts of their library.