Here are my attributes. The Sodium Hypochlorite Stock Remaining in Hours is my result and I want to add that value as hours to the current time to give a prediction of the tank being empty and display that time stamp as a PI tag.
You should be able to implement a simple analysis to add that value to the current time:
Because the default time unit is seconds, you may have to multiple the "Hours" value by 3600.
Triggering it on a change of the "Hours" attribute should suffice. I would ensure that the output attribute is a DateTime value type:
The point type of the PI Point on the Data Archive can also be changed to Timestamp:
An analysis with this expression:
'*'+('Sodium Hypochlorite Stock Remaining In Hours'*60*60)
should do the trick.
The default time unit in the PI System is seconds, so we need to convert your number of hours to number of seconds. You can then output this to a PI Point with a TimeStamp Point Type.
What's the data reference of the triggering input 'Sodium Hypochlorite Stock Remaining In Hours' ?
How did you want to schedule this analysis?
Retrieving data ...