lchaylian

Reading the value of a timestamp tag

Discussion created by lchaylian on Aug 27, 2010
Latest reply on Aug 27, 2010 by spilon

Hi, we are using the next code to read the values of a tag which its data type is timestamp:

if (myValue.Value.GetType().IsCOMObject)
{
    PISDK.DigitalState myDigState;
    myDigState = (PISDK.DigitalState) myValue.Value;  // Aqui es donde marca error
    textBox4.Text = myDigState.Name;
}
else
{
    textBox4.Text = myValue.Value.ToString();
};

The problem is that the SDK take it as IsCOMObject and is trying to read it as a digital state and we get an error.

 

What do we need to do in order to read a timestamp tag?

 

Regards

 

Luis

Outcomes