In this example we link a symbol to a discrete tag then use the "OnBeginValueChange" function to change its color whenever the tag changes from 0 to 1. This functionality can also be accomplished using the "Low Limit" and "High Limit" properties of an object.
public void Symbol1_ValueChange(object sender, Tag tag, DateTime timestamp, TVQ tvq)
{
if (tvq.ValueToBool())
Symbol1.Color = Color.Green;
else
Symbol1.Color = Color.Red;
}
Comments
0 comments
Please sign in to leave a comment.