How to use a tag value to determine if the object is visible

Problem Description:

This FAQ describes how to create an object. And its visibility is determined by a certain tag value.
When the tag value exceeds a certain value, the object will be invisible.
Otherwise, it can be visible

Brief Solution - Step by Step:

  1. Go to the 2D sketchboard, click + New Sketchboard.
    01

  2. Create a new rectangle and a text.
    02

  3. Bind the tag value to a tag in your SCADA node.
    03
    04

  4. Select the rectangle, click the paperclip icon in “visible” property
    05

  5. Select the same tag in step 3.
    06

  6. Go to “Animation”, Choose “Advanced”. And enter below script.

 function(input) { 
   if(input > 5) {
     return true;
   } else {
     return false;
   }
 }

And press OK.
07

  1. Save the sketchboard, you can verify that when tag value exceeds 5, the rectangle will show up;
    otherwise it will be invisible
    08
    09