AnsweredAssumed Answered

Switching the polarity of a Boolean in AF

Question asked by RyanCarpenterAd on Oct 1, 2020
Latest reply on Oct 2, 2020 by skwan

I have several Boolean tags being brought into my Pi Server (2018) with polarities inconsistent with my AF templates/enumeration sets (i.e. the state on one system is 0=Auto and 1=Manual and another similar system is 0=Manual and 1=Auto).   My template is currently setup with an enumeration set for this that maps the value to 0=Manual, 1=Auto and I would like to apply a correction to this somewhere on the server without touching the PLC's (non-starter).


Values are currently coming over from a remote historian (Wonderware) through an OPC interface and stored as Int32's.


I have tried the below methods without success and was curious if anyone else has solved a similar problem.

1) Switched the pi point to digital and mapped to a custom digital state where 0=1 and 1=0.  When I put this into AF, it pulled the raw value and not the digital state.

2) I tried running this through a unit conversion, but they are not compatible with AF enumeration sets

3) I looked into scaling on the OPC interface, but I would need both a scale (-1) and an offset +1 and it appears to only offer a scale

4) I looked into custom analysis for these, but that seems like it will burn through quite a few Pi Points (very common problem) and make my structure quite messy.


Thanks in advance for the ideas and let me know if I can provide more info.