Sam White Posted November 13, 2018 Share Posted November 13, 2018 I have a Boolean signal and would like to count the number of events over a specified time period. How can this be accomplished in Seeq? Thanks, Sam Link to comment Share on other sites More sharing options...
Administrators Lindsey.Wilcox Posted November 13, 2018 Administrators Share Posted November 13, 2018 Hi Sam- This can be accomplished using a combination of capsules and signal from condition. Follow these steps to perform this calculation. 1. Create capsules for each value change in the Boolean Signal. This is done using the .toCapsules() function in Formula. 2. Create capsules for the time period of interest. This can be done using Periodic Condition (creates hourly, daily, weekly, monthly, etc. capsules) or Custom Condition (Specify start and end times). 3. Calculate the number of Capsules (Step 1) over the time period of interest (Step 2) using Signal from Condition. Please let me know if you have any additional questions. Thanks, Lindsey 1 Link to comment Share on other sites More sharing options...
Administrators Lindsey.Wilcox Posted June 28, 2019 Administrators Share Posted June 28, 2019 Update as of R21.0.41: As of the release of R21.0.41, the .toCapsules() operator has changed. As of this version, the operator may be used to create a condition that contains a capsule for every valid sample in an input signal (regardless of whether the value has changed). To create a condition that contains a capsule for every value change in an input signal (as done in the previous post), the toCondition() operator must be used. 1 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