I want to calculate Downtime and store it in a tag real time basis.
I understand we can calculate using TimeEq function, but it give me total downtime in that range of time.
I want to calculate last downtime duration and when the turbine is up it should reset to zero.
And whenever the turbine is in fault(OFF) then it should count time automatically till it state changes to ON.
Say, I have one digital tag say output as ON and OFF.
I want to calculate the OFF time duration and store it in one of the PI ACE Tag.
Based on that that if the duration is more than 30 mins than I m triggering some webservice only once.
And when the digital tag goes to ON state I reset a timer counter and store it as 0 and wait until digital tag to transit to OFF state.
I need some ace code help, to ccalculatedowntime thro ace of the digital tag.