tinklerj

Exception when reading Blob PIValue

Discussion created by tinklerj on Mar 10, 2010
Latest reply on Mar 12, 2010 by spilon

I am retrieving data from a Blob tag using PI-SDK (C#, Visual Studio 2005).  The line where I get the data into a Byte[] array is:

PISDK.PISDK oSDK = new PISDK.PISDK();
byte[] bval;
PIValue pvl;
pvl = oSDK.Servers[sServer].PIPoints[sTag].Data.Snapshot;
if (pvl != null)
{
    bval = (byte[])(pvl.Value);
}

Where sServer and sTag are strings read from text boxes.  This code runs perfectly well on my own Windows XP machine (PI-SDK 1.3.8.387).

 

When run on a Windows Server 2008 system (not sure of SDK version but I think it is 1.3.6.364), the last line causes an exception.  I don't have access to the system to get the exception detail right now, but it is something to do with being unable to convert from a COM object to Byte[].

 

Is this a known issue that has been fixed?

Outcomes