Mattis Seehaus Mattis Seehaus - 6 months ago 21
Vb.net Question

PI ACE NextEvent() is not read in (.vb)

I am new to PI ACE Servers, but i wrote that code depending on a DataSet with Dates and Values (like "phase of X" and "Phase of Y").
The Problem is, that this code just reads in the first Date and the Phase before the Phase at t1.

I don´t see a mistake in the code so i hope you can help me out here:

Public Overrides Sub ACECalculations()

Dim t1,t2 As Date
t1= "13.05.2016 00:00"
t2= "13.05.2016 05:00"

Do
t1 = TableStep.NextEvent(t1).LocalDate
If TableStep.Value(t1) = "Phase X" Then
Debug.Print(t1 & "" & "Phase X)
Else
Debug.Print(t1 & "" & TableStep.Value(t1).ToString)
End If
Loop While t1<=t2

End Sub

Answer

oh you´re right and thx for your reply, but i fixed it myself by referring to t1 and t2 as New PITimeServer.PITime instead of Date.