When an IO connection is lost, the default behavior is for the last good value to be retained while the quality goes to "bad". Some users would rather have the IO "drop" completely in such a case, meaning that all the numerical values go to zero and all the boolean values go to false. A workaround to accomplish this via scripting is to use IOSetAccessName to toggle the topic name. As an example, the following script could be triggered based on a heartbeat tag with quality not equal to 192:
IOSetAccessName("ABCIP", "localhost", "DASABCIP", "Fake");
IOSetAccessName("ABCIP", "localhost", "DASABCIP", "Distributing");
This will cause the IO to reinitialize, which will force the tag values to return to the initial value configured for the tag
Sample script screenshot below:
- Author: Kevin Modlin
- Published: 04/06/2014
- Applies to: Only tested on InTouch 11. Should work on other versions as well.