0

Is there a way to get the quality of the result of an Aggregate function?

I am trying to do something like this 

if(IsQualityGood(DeltaBounds('[Energy.%Asset%.EnergyMeter]', '1h')),DeltaBounds('[Energy.%Asset%.EnergyMeter]', '1h'),if(IsQualityGood(Delta('[Energy.%Asset%.EnergyMeter]', '1h')),Delta('[Energy.%Asset%.EnergyMeter]', '1h'),Range2('[Energy.%Asset%.EnergyMeter]', '1h')))

but figured out that IsQualityGood takes tags and defaults to false here, is there a way that i can create a function does does what i intend here without having to create a tag for each of the functions withing the if?

5 replies

null
    • smason
    • 12 days ago
    • Reported - view

    Hi ,
    The IsQualityGood() function will return a True/False, depending on the quality of the result. If you just want to return the actual quality, you will want to use Quality(). It will return the decimal quality format (192 = Good, 64 = Uncertain, 0 = Bad, etc.)

      • rory_ucer
      • 8 days ago
      • Reported - view

      Thanks  , is there a way to get the quality of the result of a function like i was trying to do above? or is there a way to find out if the quality of a tag has been good for a set range like for the past 5 minutes? or maybe even exactly 5 minutes ago?

      • smason
      • 8 days ago
      • Reported - view

       Yeah. My U/I looks a little different here because I'm running a beta of 25.4, but you'll want to use 2 expressions, one for the function and one for the quality check. If you set the function equal to a variable, you can pass that variable name into the Quality() function.

      • rory_ucer
      • 8 days ago
      • Reported - view

      Great help as always, Thanks  

      • smason
      • 8 days ago
      • Reported - view

      You're welcome,  !

Content aside

print this pagePrint this page
  • Status Answered
  • 8 days agoLast active
  • 5Replies
  • 31Views
  • 3 Following