AnsweredAssumed Answered

Expressions with Powershell and AFSDK

Question asked by Alec_Karim on Jun 11, 2020

Hi, Im trying to replaicate this expression I used with the AF SDK in Python (PIthon) but in powershell, I managed to get archive an current data but havent been abel to get the syntax right for AFCalculation.CalculateAtTimes

 

Here is the code i used on PIthon:

 

timelist = List[AFTime]()

timelist.Add(AFTime("*"))

syntaxstring = "TimeEQ('RY1.BR06.DTSMachineState', 'T+6.5h', '*', 1 )"

events = AFCalculation.CalculateAtTimes(piServer,syntaxstring,timelist)

for event in events:

print(str(event.Timestamp.LocalTime) + " value: " + str(event.Value))

 

Regards

Outcomes