AnsweredAssumed Answered

PI ACE not writing calculation results to PI

Question asked by asif.manzoor on Feb 4, 2015
Latest reply on Mar 11, 2015 by gregor

Hello,

I am developing some calculations in ACE. I need to get PI Tags to be used in calculations from outside source , create PIACETag and stores its reference into an Object array for later use. I am doing in as below. I am doing this in InitializePIACEPoints

 

For Each node In list

 

   Try

 

  arrMappings(cntWellTag, 0) = node.Attributes.GetNamedItem("Name").Value()

 

  arrMappings(cntWellTag, 1) = New PIACEPoint(Context, node.Attributes.GetNamedItem("Choke").Value(), TagAliasUsedType.TagAliasAsInput)

 

  arrMappings(cntWellTag, 2) = New PIACEPoint(Context, node.Attributes.GetNamedItem("P1").Value(), TagAliasUsedType.TagAliasAsInput)

 

  arrMappings(cntWellTag, 3) = New PIACEPoint(Context, node.Attributes.GetNamedItem("P2").Value(), TagAliasUsedType.TagAliasAsInput)

 

  arrMappings(cntWellTag, 4) = New PIACEPoint(Context, node.Attributes.GetNamedItem("T").Value(), TagAliasUsedType.TagAliasAsInput)

 

  arrMappings(cntWellTag, 5) = New PIACEPoint(Context, node.Attributes.GetNamedItem("CV").Value(), TagAliasUsedType.TagAliasAsOutput)

 

  arrMappings(cntWellTag, 6) = New PIACEPoint(Context, node.Attributes.GetNamedItem("CF").Value(), TagAliasUsedType.TagAliasAsOutput)

  

   Catch ex As Exception

 

   End Try

 

   Next

 

 

Under ACECalculations, I am getting saved PIACEPoints references to read PI Tag values , using them in calculation to obtain results. This is going good. However I am unable to write results to the PI Tags. No error shows up nor I get output tags values updated in PI. Below is the code

 

 

 

tmpACEPoint = arrMappings(cntWell, 5)

 

  tmpACEPoint.Value(System.DateTime.Now) = CVValueCalc

 

  tmpACEPoint.PutValue()

 

  boolDataSentoPI = tmpACEPoint.SendDataToPI()

 

 

In debug mode when I look at tmpACEPoint, it shows me pointing to correct PI Tag where it is supposed to write. Any help ???

 

Regards

Asif

Outcomes