Polybench® Reference
Triggers a data event with a user EventCode if the trigger input becomes 1.0 or greater.

Event Trigger

Overview

Use this operator to insert Event Markers ("Events and Markers") into a signal. The event marker creation is controlled by a trigger signal ("Pseudo-booleans and triggers").

Operator ports

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

Input Trigger: 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, 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.

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. The code may contain variables, and the special variable $IN[n]$.

Details

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

The Event Trigger allows you to add an event marker 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.

To trigger the creation of an event marker, the bottom input should detect a signal with a value greater than 1.0. The first time that happens, will trigger the event.

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

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$, $TRIGTECH$ or $IN[n]$ 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 Trigger Text Demo
Demonstrates the Event Trigger operator. Events are triggered by a Constant Button. If at the same time two events are created in the signal, the events are combined and the viewer shows the event texts below each other.
Examples\DF0305010_001_EventTrigger_Text_Demo.xmc

Example: Event Trigger Text Demo
Demonstrates the Event To Action operator and the feature of the filter to remove an event marker from the signal. In the Debug Actions Monitor the actions that are performed can be monitored.
Examples\DF0305010_002_EventTrigger_Text_Filter_Demo.xmc