Thanks. That's a good idea for posting a visual snip here. I use VS Code for pretty much any editing.
Is there any documentation for the L5X syntax?
Nothing substantial. There's a KB article QA1778, but it says nothing about XML/L5X.
There's an elusive BITFIELD modifier. Haven't found the time to try implementing it, but any insight beats no insight.
I started toying with the auto-magic "ZZZZZZZZ_" ones and tried mapping the bits to INTs and DINTs of my own. Led to *lots* of opportunities for code improvement. Many of my overlays are DINT-sized to reduce memory block ballooning caused by smaller types. See my PF525 UDT snippet.
Inside its AOI the LogicStatus (INT) provided by the Class 1 connection is simply assigned to the UDT's LogicStatus DINT now.
Code:
Local.LogicStatus := Ref_LogicStatus;
This handily beats the following in code use and performance:
Code:
Ready := LogicStatus.0;
Active := LogicStatus.1;
DirectionCmd := LogicStatus.2;
...
So each AOI has a nested .Local UDT. The AOI input/output parameters are aliased to its members and it results in an overall structure that can be modified to different naming schemes without altering the underlying code.
Another subtle perk of the AOI-represented-by-nested-UDT™ approach is that the ExternalAccess rules automatically propagate to the aliased parameters. No need to set each status BOOL to Read Only.