Interfacing to the PLC best practice

Hi there

So I actually started out this project by reading a lot of your posts, and this post got me going.

So just to clarify, I am not planning on reading straight from the AOI (Thank you for that, that saved me a huge amount of effort on site), and I am breaking it up into different segments. it differs a bit from the _cmd, _fbk, _cfg you described there, but it follows the same principals.

Most of the Control module's data is a Global tag, connected to the AOI with an In/Out parameter. But certain segments/UDTs are accessible from the SCADA and the rest I deem 'internal' to the control module

Now setting a bit, for example AlarmEnable in the Config section/Udt, triggers a set on the inside of the AOI and AlarmEnable is reset. Then that status, AlarmEnabled is given back in another UDT. So I have a write section, and a read section, and nothing is directly making changes to the AOI's internals. AlarmEnabled isn't directly linked, there's a layer in between.

Here's a screenshot for the Auto Command, which changes the mode to Auto:

The mode is then mapped back out to Sts

The only part accessible to the SCADA is the Cmd UDT, and the Sts UDT, Mode is not. That is my 'internal' data

The question is, when it comes do Integers and Reals. Stuff like Alarm setpoints, do you follow this same way of doing it? Would you have a AlarmHighSP Command, and a AlarmHighSP Status/Feedback?

How do you handle a Setpoint?