In this example we have linked an integer tag to a value box that has values ranging from 0-5. This tag determines which "Step" the process is on. If the tag value is 3, a label is updated to display "Step 3". (Note: Value boxes and other controls can have their "Visibility" turned off if their display is not vital to the dashboard screen.)
public void ValueBox1_EndValueChange(object sender, Tag tag, DateTime timestamp, TVQ tvq)
{
TVQ tvq1 = ValueBox1.Value;
double step = tvq1.ValueToDouble();
if(step == 0)
{
Label1.Text = "Step 0";
}
else if(step == 1)
{
Label1.Text = "Step 1";
}
else if(step == 2)
{
Label1.Text = "Step 2";
}
else if(step == 3)
{
Label1.Text = "Step 3";
}
else if(step == 4)
{
Label1.Text = "Step 4";
}
else
{
Label1.Text = "System Meltdown!!!";
}
}
Comments
0 comments
Please sign in to leave a comment.