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 events markers into a signal. The event marker creation is controlled by a signal trigger.

Operator ports

Input S: Floating point values

Input Trigger: Floating point values

Output S: Floating point values

Properties

Find more information about changing properties here: link

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]$.

Read more about variables here: link. 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.

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

Every object has the Caption property. This property is very important, because it is the name by which Polybench recognizes this object.
It is allowed to give multiple objects the same name, as long as the objects are of the same type. In that case, a reference to this caption includes all the objects with the same caption.
In Polybench, every object can be addressed by an Address specifier, which starts with the dollar sign, for example: $My Page.My Object. 'My Page' would be the Caption of a page, and 'My Object' the Caption of an object on that page.

Documentation
type: See description
Optional documentation of this object.

It is good practice to write in short notes why you have used this object, and why its properties are set the way they are set. If this object is an operator, the Documentation text is displayed below the operator symbol.

Variable Parameters

Find more information about Variable Parameters here: link

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

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.

Note that you can connect only one channel to the Trigger (bottom) input of the Event Trigger, because all signal channels share the same event marker.

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