eWON Tag Bad Quality: Configuring a ViewON Indicator

Karen Mitchell2 min read
HMI ProgrammingOther ManufacturerTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

eWON and ViewON do not provide an evidenced setting that automatically forces a bad-quality tag value to zero. Detect the tag quality in an eWON BASIC script, write the result to a separate status tag, and use that status tag in a ViewON animation or JavaScript.

Separate Process Value from Quality State

Do not overwrite the process tag when its quality becomes bad. The supported method preserves the original value and exposes quality through an auxiliary tag. For the supplied example, Tag1_Quality equals 0 when TagQuality returns the string "0"; otherwise it equals 1.

TagQuality result Quality interpretation Tag1_Quality value
"0" Bad 0
Any other returned value Good under the supplied logic 1

Implement the BASIC Quality Check

The script loads Tag1, reads its TagQuality system property, and updates the auxiliary quality tag from a timer-driven routine.

TSET 1,5
ONTIMER 1, "GOTO CHECKQUALITY"
END

CHECKQUALITY:
SETSYS TAG, "LOAD", "Tag1"
Q$ = GETSYS Tag, "TagQuality"
PRINT Q$
IF Q$ = "0" THEN
  PRINT "Quality BAD"
  Tag1_Quality@ = 0
ELSE
  PRINT "Quality GOOD"
  Tag1_Quality@ = 1
ENDIF

The evidence does not define the time unit associated with TSET 1,5. Confirm that timer behavior in the applicable eWON documentation or runtime before relying on a required detection interval.

Configure and Verify the ViewON Indication

  1. Create or expose the Tag1_Quality tag so ViewON can read the value written by the BASIC script.
  2. Bind Tag1_Quality to a ViewON JavaScript action or animation. One supported presentation is controlling the visibility of a warning text when the value equals 0.
  3. Force or reproduce a bad-quality condition and confirm that the script prints Quality BAD, sets Tag1_Quality to 0, and displays the configured ViewON indication.
  4. Restore good quality and confirm that the script prints Quality GOOD, sets Tag1_Quality to 1, and clears or hides the indication.

The supplied logic treats every quality result other than "0" as good. If the runtime can return additional quality states, identify those states before extending the condition; they are not defined by the available evidence.

FAQ

Can eWON force a tag value to zero when quality is bad?

No supported setting is identified for forcing the process value to zero. Use BASIC to set a separate quality tag to 0 instead.

How do I detect bad tag quality in eWON BASIC?

Load the tag with SETSYS TAG, "LOAD", "Tag1", read TagQuality with GETSYS, and test whether the returned string equals "0".

How do I show bad tag quality in ViewON?

Bind the auxiliary Tag1_Quality tag to JavaScript or an animation. Configure a warning text to become visible when that tag equals 0.

Back to blog