In this example we have a value box linked to a discrete tag that updates the text of a label based upon the value of the value box. If the value box reads 1, Steve Wins. If the value box reads 0, Steve Loses. The value box is linked to the "OnBeginValueChange" function.
public void ValueBox1_BeginValueChange(object sender, Tag tag, DateTime timestamp, TVQ tvq)
{
if(tvq.ValueToBool())
Label1.Text = "Steve Wins";
else
Label1.Text = "Steve Loses";
}
Comments
0 comments
Please sign in to leave a comment.