The Threshold Detector Transform sets its Boolean output signal, Reached, to True when its input signal, Level, meets the threshold value specified in its properties. The output signal, Reached, changes when the Threshold is crossed in either direction. Repeated input transitions on the same side of the Threshold do not change the value of Reached. Set the Type of Detection property to Above Threshold, Below Threshold, or Within Tolerance. If using Within Tolerance, also set the Tolerance property. The TestCase below shows the behavior of the Transform when the Threshold Level property is set to 5 and the Type of Detection property is set to Above Threshold.
The Threshold Trigger Transform is similar to the Threshold Detector with two important differences:
•Its outport is of type Event.
•The Threshold value can be set by a Signal rather than a property. Therefore, the Threshold can be changed during test execution.
For most applications, the Threshold Detector Transform is recommended.
The Threshold Trigger Transform has two numeric input ports. The In signal is compared to the Threshold signal. The type of comparison (equal, greater than, less than, greater than or equal, less than or equal) is determined by the Trigger Type property. Note that if you are using a continuous Signal it may not be possible to meet the equal condition, so <= or >= are recommended.
The Detection Type property has two options:
•When Level Detection is set, the trigger is fired every time a transition on the In Signal passes the comparison test.
•When Edge Detection is set, the trigger is fired the first time a transition on the In Signal passes the comparison test. Repeated input transitions on the same side of the Threshold do not fire the trigger again. However, if the Threshold (the "edge") is crossed again, edge detection is reset. After the reset, the trigger fires the next time the In Signal passes the comparison test.
The Fire outport is an Event signal. A transition is transmitted when the trigger is fired.
If there is no transition on the Threshold port, the Transform uses the value of the Threshold property for comparisons. Note that the transition may be in another TestCase. For example, there could be an Input Reset in a previous TestCase. The Input Reset sets the Threshold Signal/port to its initial value. Because of the reset transition, the value in the Threshold port property is no longer used.