Skip to content

PLCgen: location pointers have names ending in '.'

See !1054 (comment 2817415):

WARNING: Renaming "M2." to "M2_1".

Is this correct? The name is not "M2.", but "M2". Why does it need a rename? It didn't before.

And !1054 (comment 2817427):

The name generator joins good parts of a name by underscores. The . is not a good character, and thus gets removed. Only M2 remains as good part, and it doesn't need a _ as there is only one part, so there is nothing to join.

M2 is now a name to avoid for S7-300/S7-400, since it overlaps with address identifiers.

I think the M2. comes from introducing location pointers for automata. We opt for "" as location pointer variable name. Then we get for an automaton named M2, M2. as location pointer name. Through PLC name generation, the . disappears. Now, since it renames, we see the . in the warning message. That is indeed not so nice. It would be nicer if it indicates WARNING: Renaming "M2" to "M2_1"..

Addresses #679

Edited by Dennis Hendriks