2 Replies Latest reply on Jan 3, 2011 6:08 PM by cguimaraes

    Little help with IPICalculation

    cguimaraes

      Hi Everyone,

       

      This is my first post, so first of all, thanks for the help.

       

      What I`m trying to perform I believe that is simple, the idea is to work with 3 float 32 tags. ("_Raw"," _Comp" and " _Error")

       

      The Tag  "_Comp" is the tag "_Raw" with a greater compression parameter.

       

      I Want to perform the calc "_Raw" - "_Comp" (interpolated) and store the diference at tag _Error.

       

      I have tried:

       

      Dim _point1 As PISDK.PIPoint = _server.PIPoints("_Raw")
      Dim _point2 As PISDK.PIPoint = _server.PIPoints("_Comp")
      Dim _point3 As PISDK.PIPoint = _server.PIPoints("_Error")
      Dim x As IPICalculation
      Dim Calc As PIValues
      x = myPIServer
      Calc = x.Calculate("y","t", "'_Raw' - '_Comp'", SampleTypeConstants.stRecordedValues, "")
      _point3.Data.UpdateValues(Calc, DataMergeConstants.dmReplaceDuplicates)

       

      The problem is that when I double check the calculated data at excel, I don't have the same results.

       

      Any Ideas what I'm doing wrong?

       

      Thanks,