8 Replies Latest reply on Dec 6, 2016 3:29 PM by avanfosson

    Passing Performance Equation expression in PIPoint.Data.RecordedValues method in C#

    jainc_paresh

      Hi Team,

       

      I want to pass 'Performance Equation' in PIPoint.Data.RecordedValues method in C#.

       

      I tried to pass the equation in the below manner

       

      private void GetPiPointRecordValues(string strPiPoint)
              {
                  try
                  {
                      myServer = piSDK.Servers["JB-3"];
                      myPoints = myServer.PIPoints;
                      myPoint = myPoints[strPiPoint];
                      string strExp = ("strPiPoint= TRIP");
                      
                      //"'H1-GT1_11CJP07EW001' = " + "TRIP" + ""
                      myValues = myPoint.Data.RecordedValues(starttime, endtime, BoundaryTypeConstants.btInside, "'H1-GT1_11CJP07EW001' = " + "TRIP" + "", FilteredViewConstants.fvRemoveFiltered, null);
                      BindDataToDatatable(myValues);
                  }
                  catch (Exception ex)
                  {
                      lblMsg.ForeColor = System.Drawing.Color.Red;
                      lblMsg.Text = ex.Message.ToString();
                  }
              }

       

      So, it is giving 'Performance Equation' parsing error.

       

      Please let me know how can I pass the equation based on the passed 'strPIPoint'.

       

      thanks in advance.