Polybench® Reference
Results in the time interval in seconds between two pseudo-boolean trigger pulses.

Interval Detector

Overview

This operator is used to measure the time between pulses in seconds. A pulse is represented by a positive trigger from ResetValue (False) to DetectionLevel (True), or the other way around.

The Interval Detector has two modes: Normal, which measures time between detects, or Dwell, which measures time between detect and reset.

Operator ports

Input S: Floating point values

Output T: Floating point values

Properties

Find more information about changing properties here: link

Dwell
type: True or False
Choose True to measure time between Detect and Reset, or False to measure time between Detects.
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'


TriggerLevel
type: Real value
The input level that triggers the timer and sets the previous timer value to the output.


ResetLevel
type: Real value
The input level that resets the interval timer.


Caption
type: Word or phrase
The name of the object in the project. This name must not contain '.' or '$' characters.

Every object has the Caption property. This property is very important, because it is the name by which Polybench recognizes this object.
It is allowed to give multiple objects the same name, as long as the objects are of the same type. In that case, a reference to this caption includes all the objects with the same caption.
In Polybench, every object can be addressed by an Address specifier, which starts with the dollar sign, for example: $My Page.My Object. 'My Page' would be the Caption of a page, and 'My Object' the Caption of an object on that page.

Documentation
type: See description
Optional documentation of this object.

It is good practice to write in short notes why you have used this object, and why its properties are set the way they are set. If this object is an operator, the Documentation text is displayed below the operator symbol.

Details

The difference in Normal and Dwell mode is best illustrated with following figures:
(In both cases the DetectionLevel is set to 1, and the ResetLevel is set to 0)


Normal mode: each time the Pulse signal changes from 0 to 1, a Detect is generated. The Interval Detector puts out the time in seconds between each detect.
Note that the first pulse leaves the Interval Detector 0, because the detector waits for the second pulse in order to calculate the time between them.


Dwell mode: the Interval Detector measures the time between the moment the Pulse signal goes from 0 to 1 and the moment it goes from 1 to 0 again. So, in effect the duration of the high value is calculated.

After a RESET action, the output of the Interval Detector will be reset to 0.

Note that for very slow rizing signals in a signal with a high sample frequency, the timing of the Detect and Reset pulses may be less precize, because the detect/reset signal level can deviate +/-0.0001%.