GetTagQuality(szTagName) reads the quality of an existing tag. The manual lists Good = 192, Bad = 0 and Uncertain = 64. Uncertain indicates that the value has not yet been assigned or updated. Its argument is an internal or external tag name.

Consider both value and quality in your logic. For example, check GetTagQuality("Simulator.Channel_1.Device_1.Tag_1") == 192 before using its value in a calculation. Define the response to invalid quality for the actual control task; an old displayed value is not proof of a valid current measurement.

Download X2View software and its bundled help documents