AnsweredAssumed Answered

Trying to store values in a string tag using UpdateValue

Question asked by mdspath on Sep 29, 2015
Latest reply on Sep 29, 2015 by ekuwana

Hello:

I'm probably going to smack myself when I find out why but I'm having trouble in a simple function whose job it is to store a string value into a string pinpoint.

Code is below, it does not error but the current value in PI says "BAD"

 

 

try

{

PIPoint piPoint = PIPoint.FindPIPoint(gbPiServ, "BatchID");

// "test" is the string data trying to get stored in PI

 

AFValue newValue = new AFValue("test", dcStartTime.SelectedDate.Value, null, AFValueStatus.Bad); 

 

AFUpdateOption.Insert, AFBufferOption.BufferIfPossible);

}

 

catch (Exception ex)

{

 

MessageBox.Show(ex.Message);

}

 

Outcomes