Polybench® Reference
Triggers an Action if the Trigger input signal gets equal or greater than 1.0, and sends the captured sample value to the specified address.

Capture Action

Overview

This operator uses an Action (link) to send the currently captured value to another object in the project. The Action is generated if the Trigger input changes its state from 0 to 1.

Use this operator to change the mathematical behavior of other operators, based on signal conditions.

See also the Constant to Action operator (link) as an alternative.

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

Action
type: Select from the list
Select the code of the Action that is performed when the input value is greater or equal to 1.0.
Select one of those presets:


Value
type: See description [this value cannot be changed]
The value to set at the Address is determined automatically


Address
type: Address, starts with '$' sign (see link)
Fill in the address of the object that should receive the Action.

You may type or paste the address, or you may press the small button on the right to open the Address Searcher dialog (link)

AutoExtendAddress
type: True or False
Set to True if the Address should be extended by the channel name that triggered the Action.
Select one of those presets:
True or False
True may also be read like 'yes' and false like 'no'

The address is extended intelligently. For example, if the address is $Design.Input Field.Text$, then the channel name is added to Design.Input Field and not to Text. If a signal channel is called '10', then the address that is used becomes $Design.Input Field10.Text$. AutoExtendAddress also works for global variables, for example $MyVar$ could become $MyVar10$.

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.

Details

Place this operator in between a signal connection. The signals at the input are copied unchanged to the output, also independent of signals at the Trigger input. A trigger at the trigger input will only take the sample that is currently flowing through the Capture Action, and send its value via an Action.

If the trigger input has 1 channel, then the trigger on that channel will cause the specified Action to be performed for every signal channel. So, if the signal input has 4 channels, then a trigger will cause four actions to be performed.
If the trigger input has the same number of channels than the signal input has, then every trigger channel causes its own Action to be performed on the captured value of the signal channel with the same index.

If you use the AutoExtendAddress property, it is possible to change the specified action address by extending it with the channel name.
For example, if AutoExtendAddress is True, and the address is $Design.Action, then if a channel is called 'Channel 1', the address is internally changed to '$Design.ActionChannel 1'. Note: You could use a Channel Terminal (link) to deliberately change channel names.

Examples

Example: Capture Action with AutoExtendAddress Demo
Demonstrates the Capture Action that reads values from 3 signal channels. If the Constant Button is pressed, this triggers the Capture Action. It then issues 3 SET_PARAMETER actions - for each channel one.

Another feature that is demonstrated here is the AutoExtendAddress. The address of the SET_PARAMETER action is extended by the channel name for which the action is issued. For example, the second channel is called '2'. The second Input Field is called 'Input Field2'. The action address in the Capture Action is 'Input Field.Text' - so without a number. The AutoExtendAddress feature now takes care that channel name '2' is added to the address name 'Input Field', resulting in 'Input Field2'.
Examples\DF0411125_001_Capture_Action_and_AutoExtendAddress_Demo.xmc