Action To One Shot
Overview
The Action to One Shot listens to actions that are issued in the system. If it filters out specific actions, values or addresses, it changes the output signal for the time of one sample period.Use this operator to convert actions into a signal.
Operator ports
Input Any: Any sample type. The connection is not limited to one type of signal.Output one shot: Floating point values
Properties
Find more information about changing properties here: "Properties Viewer"TriggerValue
type: Real valueThe output value in case of an action (one shot, so this value is at the output for just one sample period).
RestValue
type: Real valueThe output value in case there is no action detected
Action to filter
type: Select from the listSelect the code of the Action that should be filtered
Select one of those presets:
AND Value to filter
type: See descriptionFill in a parameter value that should be filtered, or leave empty
AND address to filter
type: Address, starts with '$' sign (see "Address - how to address objects and variable parameters")Fill in the address of an object, if this operator should filter on a specific address as well.
You may type or paste the address, or you may press the small button on the right to open the Address Constructor ("Address Constructor")
Caption
type: Word or phraseThe 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 descriptionOptional 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"Action
type: See descriptionThe Action type that should be filtered. If you change this value into an unknown action type, then it is set to 'None'.
Value
type: See descriptionA parameter value that should be filtered, or leave empty
Address
type: See descriptionThe address of an object, if this operator should filter on a specific address as well.
Details
The action filter is set in the properties that describe the Action code, the Value, and the Address. Those three filter parameters have a logical AND relation, so:filtered are actions with the specified action AND the specified value AND the specified address.
If any of those is left empty (or action 'None'), it is not used for the filter.
So, for example, if you would only specify an action code to filter, and no value or address, then the output signal will get single-sample spikes on every occurance of that action; independent of value and address.
If you leave all three items empty (Action is 'None'), every action in the system will trigger the output.
Each action is filtered separately
If more than one action occurs within one sample period, then still every filtered action will result in a separate pulse. The pulses will 'clutter' to a pulse with a longer duration, so you could use the trigger pulses to count specific actions.Input signal
Any timed signal can be connected to the input. The contents of the signal are not used; only its timing. The Action to One Shot operator creates a new signal, that is however timed by the input signal. If you connect a constant, the operator symbol shows a warning, because a constant is not a timed signal.ACTIONSEQUENCE is special
Please note that the action ACTIONSEQUENCE itself cannot be filtered. Of course, all other actions that occur in an action sequence can be detected by the Action to One Shot; the only exception is ACTIONSEQUENCE.Examples
Example: Action To One Shot Demo
Demonstrates how actions, that are issued somewhere in the application, can be filtered and translated to a single-sample pulse on a signal.Als if multiple actions occur at one click of a button, every action becomes a separate pulse. Watch the 'Count triggers' counter which counts all SET_PARAMETER actions.
Try to set the SampleFrequency property of the Signal Generator to a high value and see that the counter still counts every action, also that in the action sequence.
Examples\DF0507008_001_Action_To_One_Shot_Demo.xmc