Polybench® for biosignals / reference 1.34.1
Triggers an event containing data captured from the Data input with a user EventCode if the Trigger input becomes 1.0 or greater.

Event Data Trigger

Overview

Use this operator to insert events markers into a signal. The events may contain additional data that is captured from the top input. The event marker creation is controlled by a signal trigger.

Operator ports

Input Any: Any sample type. The connection is not limited to one type of signal.

Input Trigger: Floating point values

Input Data: Floating point values

Output Any: Any sample type. The connection is not limited to one type of signal.

Properties

Find more information about changing properties here: "Properties Viewer"

EventCode
type: See description
A free-format code that will be added as Data Event to the signal when the trigger input is 1.0 or greater. The code may contain variables, and the special variables $IN[n]$, $TRIGINDEX$, $TRIGNAME$ and $TRIGTECH$.

Read more about variables here: "Variable Parameters". Please note that variables are not always updated synchronously with data processing. This means that in some cases a variable may not yet contain the value that you expect it to have, at the time you trigger an event.

You may use the special variable $IN[n]$, where n is the channel number (1..N), meaning the value of the nth channel of the regular input signal at the moment of triggering. If you specify a channel that does not exist, or you don't have a floating point signal connected to the input (but another kind of signal), then $IN[n]$ will be substituted by xxxxx.
If you make an error in the syntax of the variable, you will see ?????. Please note that n must be a value, and cannot be a variable itself.
You may also use these special variables:
$TRIGINDEX$ to get the channel number (1..N) on the trigger input that triggered the event;
$TRIGNAME$ to get the name of the trigger channel that triggered the event; or
$TRIGTECH$ to get the technical name of the trigger channel that triggered the event.

NumberFormat
type: See description
The way the captured value is represented in the event marker, e.g.: '.1' for one digit and a decimal point, or ',3' for a time value with three digits and a decimal comma.

For more information about Number Format codes, please refer to "Number format codes".

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

For more information about the rules and usage of the Caption property, please refer to "Caption property - background and usage".

Documentation
type: See description
Optional documentation of this object. If this object is an operator, the Documentation text is displayed below the operator symbol.

Variable Parameters

Find more information about Variable Parameters here: "Variable Parameters"

EventCode
type: See description
A free-format code that will be added as Data Event to the signal when the trigger input is 1.0 or greater.

Details

For more information about the eventing concept of Polybench, see "Events and Markers".

The Event Data Trigger allows you to add an event marker with captured values to the signal. The signal runs unchanged through the operator, until a trigger on the bottom-input generates a new event marker that is then tagged to the signal.

At that moment, the input values of the top input (Data) are captured and are included in the new event marker. Some other operators are able to read those captured values, for example the Event Information ("Event Information") or the Marker Viewer ("Marker Viewer").

To trigger the creation of an event marker with captured values, the bottom input should detect a signal with a value greater than 1.0. The first time that happens, will trigger the event. Read more about triggers here: "Pseudo-booleans and triggers".

The event marker will be attached to the sample that flew through the Event Data Trigger operator at the moment the triggering took place. The data event will stay attached to the sample until it is filtered out.

Note that you can connect only one channel to the Trigger (bottom) input of the Event Data Trigger, because all signal channels share the same event marker.
It is allowed to connect multiple channels to the Trigger input (bottom). A trigger on any of the channels will create the same event marker for the sample. You can use triggers on different channels to copy names or indexes to the event code, by using the $TRIGINDEX$, $TRIGNAME$ or $TRIGTECH$ variables. See the property EventCode for more information.
Please note that in Polybench 1.30.0 and earlier, only one trigger channel could be connected.

The EventCode can be changed in the properties dialog, but also using the Variable Parameter EventCode, so that you can change the EventCode from within an application.

Examples

Example: Event Data Trigger Demo
Demonstrates how an Event Data Trigger captures values from a noise signal on three channels. A Marker Viewer table shows the markers including the captured values they contain.
Examples\DF0600010_001_Event_Data_Trigger_Demo.xmc