AnsweredAssumed Answered

Calculating Yearly Run Time - timespan creating string

Question asked by JaredGoretzky on Mar 22, 2019
Latest reply on Mar 22, 2019 by JaredGoretzky


I'm working on calculating the run time for a piece of equipment. I'm looking at using the TimeEq in AF Analysis to determine when it is in the Run State. The tag being monitored is a digital "RUNNING" is when the pump is running.


A summary of the logic I was using:

1. Calculate the run time every time an event is stored.

2. Reset the value at the start of the year (we need this to be a yearly total)


Using TimeEq I was going to use the start time to now to essentially remove the need to reset the tag value. But, what I have run into is creating the timespan for the start time. I'm trying to create the Text using the Text function but when I concatenate the '*- or d' the character ' is removed. You can see below in the Value at Last trigger that is only shows *-81d whilst I need '*-81d'


Even using the String() example below it also ignores the '1 and returns 1


Does anyone have an idea of how to mark out the ' special character?