Trigger (FPScript)
Represents a Schmitt trigger comparator, which performs a threshold observation for a data set.
Syntax
Trigger(DataSet, LowerThreshold, UpperThreshold [ , Operation ])
The syntax of the Trigger function consists of the following parts:
Part |
Description |
||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
DataSet |
The data set to be searched. Permitted data structures are data series, data matrix, signal und signal series. All numeric data types are permitted. For complex data types the absolute value is formed. If the argument is a list, then the function is executed for each element of the list and the result is also a list. |
||||||||||
LowerThreshold |
Specifies the lower switching threshold which is taken into consideration for the switch from TRUE to FALSE. Permitted data structures are scalar value. All numeric data types are permitted. The unit has to be compatible with that of parameter DataSet. For complex data types the absolute value is formed. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
||||||||||
UpperThreshold |
Specifies the upper switching threshold which is taken into consideration for the switch from FALSE to TRUE. Permitted data structures are scalar value. All numeric data types are permitted. The unit has to be compatible with that of parameter DataSet. For complex data types the absolute value is formed. If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
||||||||||
Operation |
Specifies the way the function operates. The argument is optional. If you omit it, the function returns a data series or a data matrix with Boolean values that specify the state of the comparator. The argument Operation can have the following values:
If the argument is a list, then the first element in the list is taken. If this is also a list, then the process is repeated. |
Remarks
The Schmitt trigger can have the states FALSE and TRUE. It switches from FALSE to TRUE when the signal crosses the upper switching threshold, and from TRUE to FALSE when the signal crosses the lower switching threshold. The observation starts in the FALSE state.
Available in
FlexPro Basic, Professional, Developer Suite
Examples
Trigger({1, 3, 5, 7, 9, 8, 6, 4, 2}, 4, 6) |
Results in the following Boolean values: {FALSE, FALSE, FALSE, TRUE, TRUE, TRUE, TRUE, TRUE, FALSE}. |