Manoel Janio Borralho dos Santos Posted March 18 Share Posted March 18 how to get the start time of the capsules, compare the value of two variables at the exact moment that the capsule starts. Then make a condition compering their values? Link to comment Share on other sites More sharing options...
Seeq Team Solution Chris Harp Posted March 18 Seeq Team Solution Share Posted March 18 (edited) Hello Manoel, To compare values at the start of a capsule, you would use Signal from Condition with a summary statistic "Value at Start" for each variable and use the "Start" placement for the timestamp. This will create two discrete signals at the starting time of your capsule. To create a condition that compares the two values, use Formula. You cannot directly compare discrete values in Formula. You get an error stating "x must be continuous signal at $signal1". Using the resampleHold function, you hold the discrete value for the length of your desired condition. For example, if you want your comparison condition duration to be 1 hour, you would use: $signal2.resampleHold(1h, 1min) < $signal1.resampleHold(1h, 1min) If you wish the have the comparison condition capsule duration be equal to the same duration as the original condition capsule, you could add a .touches() function where the original condition touches the comparison condition. $comparison = $signal2.resampleHold(1h, 1min) < $signal1.resampleHold(1h, 1min) $originalCondition.removeLongerThan(40h).touches($comparison) Alternatively, you could change the timestamp placement in your signal from conditions to Duration for both and then use value search or formula to create the comparison conditions. This will create a conditions equal to the length of the original condition. Please let me know if you have any other questions. Chris Edited March 18 by Chris Harp 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