IO-Link - Best Practices for handling Boolean Process Data

Unfortunately that’s the tradeoff between specificity and customizability; there are pros and cons to both.

It’s just my opinion, but I think that your first option (Dedicated Task + PV Mappings) would be easier to maintain in the long run. You can map an input to multiple PVs, but as you said mapping an output to multiple sources would be really messy. If you put enough thought into the program/function that packs and unpacks the I/O though you could make something that seems fully customizable to the end user. Maybe you could configure the entire I/O layout from a recipe file or something like that.

Normally I like to keep I/O local so datapoints are only available to one program. That program can then pass along a global status to others if it needs to. However, this may be a good case for a global “gIO” structure that allows access to the unpacked datapoints. The PV mapping is also an option but I personally find it a little cumbersome to use. If you map everything in code, you could access pointers to values which allows for more flexibility.