AnsweredAssumed Answered

How do you get the PI server's time from PI-SDK?

Question asked by jdouglas Employee on May 9, 2017
Latest reply on May 10, 2017 by rdavin

I'm just trying to do some calculations with PISDK.IPICalculation. I noticed that the timestamp from the return data is the client's time. I want the PI server's time from midnight to midnight, not the PC's.

 

Dim m_LocalServer As PISDK.Server

Dim strPE AS string = "If 'sinusoid' > 90 then 1 else 0"

Dim z As PISDK.PIValues = calculation.Calculate(m_LocalServer.ServerTime, m_LocalServer.ServerTime, strPE, stRecordedValues, "")

 

I tried using m_LocalServer.ServerTime. But it comes back with the client's time.

Outcomes