Trigger (FPScript)

21.09.2021

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:

Constant

Meaning

EVENT_INDEX

The indices of the values or points where the trigger is in the condition TRUE are saved in the result data set. The result in this case is a data series with 64-bit integer values.

EVENT_EXTRACT

Only the points or values where the trigger is in the condition TRUE are transferred into the result data set.

EVENT_SETVOID

Points or values where the trigger is in the condition FALSE are copied into the result data set too, but there they are marked as void.

+ EVENT_COMPLEMENT

This constant can be added as an option and then the selected operation is reversed. For example in the case of EVENT_EXTRACT the points are then copied where the trigger is in the condition FALSE.

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}.

See Also

ValuesAboveLevel Function

ValuesBelowLevel Function

Event Isolation Analysis Object

Share article or send as email:

You might be interested in these articles