AnsweredAssumed Answered

How to calculate time difference in AF Analysis

Question asked by BarryHu on Nov 15, 2016
Latest reply on Nov 16, 2016 by rdavin

Our DCS and PI system get time from difference source. I'd like to set up an Analysis that will trigger a notification when the times drift apart too much. DCS time is passed to PI via OPC tag in the form of string. I can use ParseTime('DCS Time String') to convert the DCS time stamp into time PI time, and use ParseTime ("*") to get the PI system time. I can also subtract the two times and get the difference. The result is in the form of -00:00:04.466336. I cannot seem to map the result to an attribute though doesn't matter what type of Value Type I choose for the attribute. It always say "Cannot convert '-00:00:04.466336' to DateTime" or whichever type I choose.

 

It also seems that I cannot use Abs around the time subtraction.

 

Any suggestion?

 

Thanks.

Outcomes