FAQ:
I've created a condition for a particular event of interest and now I would like to create a signal that is the running count of these events in a given time period.
This analysis is common in equipment fatigue use cases when equipment degrades slowly based on a number of cycles (thermal, pressure, tension, etc) that it has undergone during it's life or since a last component replacement.
Solution:
We can convert each of these capsules into a signal comprised of a single sample (with value of 1) per capsule, then take a running sum of this new signal over the current equipment life condition.
1) Use Formula to create a signal with a constant value of 1 and a sample every 1 second.
(1).toSignal(1sec)
2) Use Signal from Condition to create a new signal with a single sample of value 1 per capsule. Take the average of the "1 signal" during each of the event capsules.
3) Use Formula to calculate the running sum of the 1 sample per capsule signal during the Current Equipment Life capsule.
$OneSamplePerCapsule.runningSum($CurrentLife).toLinear(7d)