PI ACE PIAcePoint.value

Discussion created by janseng on Nov 27, 2013
Latest reply on Nov 27, 2013 by lZheng



I want to to some calculation on a hourly time period.


delta_Level= level1(current_time) - level1(current_time-1h)
flow_value.Avg(current_time-1h,current_time, 80)


For reading the level I want to use PiAcePoint.Value(Time), but which value will this function provide?

  • interpolated value or
  • archive value next to the timestamp

For the avg function I get different values in comparison to datalink (but very small).


What is the best way (precise) to calculate?  Should I read the values with SDK functions ?


Public Overrides Sub ACECalculations()






        Dim iMonth, iHour, iDay, iYear As Integer


        Dim Test As Double


        Dim Test2 As Object


        Dim test3 As Object


        Dim ST, ET As Date 'Starttime, Endtime




        iHour = Hour(DateTime.Now)


        iDay = Day(DateTime.Now)


        iMonth = Month(DateTime.Now)


        iYear = Year(DateTime.Now)




        ST = DateSerial(iYear, iMonth, iDay)


        ST = DateAdd(DateInterval.Hour, iHour - 1, ST)


        ET = DateAdd(DateInterval.Hour, 1, ST)




        Test = FC2538_PV.Avg(ST, ET, 80)


        Test2 = FC2538_PV.Value(ST)


        test3 = L1011_Schwimmdach_T101_Masse_U.Value(ST)


    End Sub