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

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

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...