Michelle Posted April 18 Share Posted April 18 (edited) I am trying to only show values of the maximum difference between my temperature setpoint and PV ($hssp) within a certain period ($hrs). I used the below to set up my capsule (hopefully using the right notation) but am getting all the values during my condition range ($hrs which I identified which steps of the process to consider). $hssp.within($hrs).toCondition('Heater_Sag') I will like to ONLY show the maximum value seen during this condition range. I tried the following below but got an error message as it seems that I am not using the proper notation: $hssp.maxValue($hssp.within($hrs).toCondition('Heater_Sag')) No variant of function 'maxValue' consumes the parameters (Signal, Condition) at 'maxValue', line=1, column=7 I then tried the below and received another error message: $hd.aggregate(maxValue(), $hsis) ⬆ No variant of function 'aggregate' consumes the parameters (Signal, Stat:Sample:Scalar, Condition) at 'aggregate', line=1, column=5 Edited April 18 by Michelle Link to comment Share on other sites More sharing options...
Seeq Team Solution John Brezovec Posted April 18 Seeq Team Solution Share Posted April 18 Your last formula is pretty close! You also need to include where you want to place the result of the aggregation - do you want it to display for the duration of the capsule, or maybe put it at the start or the end? $signal.aggregate(maxValue(), $condition, startKey()) // could replace startKey() with endKey(), middleKey(), durationKey(), maxKey() or minKey() This aggregation could also be performed using the Signal from Condition tool, which will let you pick your inputs in a point-and-click UI Link to comment Share on other sites More sharing options...
Michelle Posted April 18 Author Share Posted April 18 (edited) Hi John, Thank you it worked! Had to set a maximum duration, is there a way where I can use the duration of my capsule instead of a fixate number? $hssp.aggregate(maxValue(), $hs.setMaximumDuration(40h), durationKey(), 0s) Edited April 18 by Michelle New question Link to comment Share on other sites More sharing options...
Seeq Team John Brezovec Posted April 19 Seeq Team Share Posted April 19 The max duration always has to be specified as a scalar (fixed number) -- you should try to pick the shortest max duration you're comfortable with for performance reasons, but if your use case requires a super long max duration then that's what your use case requires! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now