0

Duration a Tag is Greater than a value

Hello,

I am trying to create a calculation that will tell me the total time in the last 24 hours when a tag has a value greater than a set value (example 50)

Has anyone done this already?

I appreciate any help

1 reply

null
    • smason
    • 5 days ago
    • Reported - view

    Hi ,

    You would need to first create a calc that outputs a Boolean anytime the tag is greater than the set value. Something simple like this:

    You would then pass this newly calculated tag into the DurationInStateNonZero function:

    You have a few options as to how often you want to calculate this. In this example, I'm calculating it once a day at midnight where it looks back on the last 24 hours. All of the Duration functions output milliseconds, so you can divide it by however much to transform it into another unit of time.

    Hope this helps!

Content aside

print this pagePrint this page
  • 5 days agoLast active
  • 1Replies
  • 4Views
  • 2 Following