Jump to content

Recommended Posts

  • Seeq Team

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.

ToCapsules.png.dced5f08c1942330f39d8dc849aab963.png

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).

days.png.b80fe8e78f2a40dc53da8540e15e90bd.png

3. Calculate the number of Capsules (Step 1) over the time period of interest (Step 2) using Signal from Condition.

CapsuleCount.png.bf50f142a067d2221e106e7925543861.png

Please let me know if you have any additional questions.

 

Thanks,

Lindsey

  • Like 1
Link to comment
Share on other sites

  • 7 months later...
  • Seeq Team

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).

image.png

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.

image.png

  • Like 1
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...