One-Shot Output Definition

This MotoHawk™ block allows a one-shot pulse behavior to be installed on the selected resource.

Block ID

motohawk_oneshot

Library

MotoHawk_lib/Advanced Digital I/O

Description

This MotoHawk™ block allows a one-shot pulse behavior to be installed on the selected resource. A one shot, when triggered, will assert for a specified duration (subject to any limitations associated with the selected resource). Triggers (no matter the source) that are observed while the one shot is asserted are ignored. Altering the duration of an asserted output will have no affect on that particular excitation unless the Allow Active Update option has been selected. A one shot can be terminated at any time via the cancel input.

Set Functionality

The Show Ports option allows the definition block to be used in the same manner as the One Shot Output Set block. With Show Ports checked, the selected resource will assert for the supplied Duration when the Trigger input is TRUE provided the Cancel input is not also TRUE. Duration has units of microseconds. A negative value can be used to imply direction, which is applicable to directional resources like an H-Bridge.

The Cancel input, when TRUE, will immediately negate an active pulse.

The Duration value is still applied if the Trigger input is FALSE. This allows the duration to be controlled by the application when the Trigger by Input Capture feature has been enabled.

Some resources have limited resolution control.

Access Blocks

The OneShot can be controlled by one or more of the One Shot Output Set blocks in addition to this definition block if the Show Ports option is checked.

The OneShot Pulse Complete Trigger block will execute when the OneShot pulse completes.

Trigger by Input Capture

Some OneShot resources support a Trigger by Input Capture Option. This allows the synchronous edge of the referenced Input Capture to trigger the OneShot. This trigger will have a lower latency than if the application were to use the Input Capture Trigger block to manually trigger a OneShot via the One Shot Output Set block. The latency between observing the edge on the InputCapture and asserting the OneShot can be very short in some cases. For example, an Input Capture and the OneShot that both reside on the eTPU won't even involve the maincore to trigger the OneShot.

The Duration of a OneShot triggered in this manner will be the last Duration that was applied to the OneShot by this block or the One Shot Output Set block. Set the Duration with Trigger set to FALSE if the OneShot is to be triggered exclusively by an Input Capture block.

A OneShot that has been configured to be triggered by an InputCapture can still be manually triggered via this block of the One Shot Output Set block. Multiple triggers still behave the same in that any trigger is ignored while a OneShot is asserted.

Resolution Limitations

Some resources, particularly those on some Classic modules, are not able to control to the commanded microsecond resolution. These resources are typically not implemented on an output that supports "timed" operation. The tasking kernels base RTI rate is used to time the OneShot event in these cases. Thus typical resolution is in milliseconds rather than microseconds.

The target cross reference can help to identify the outputs that have this limitations. They are said to have a behavior of OneShot(RTI) rather than just OneShot

Allow Active Update

Normally the duration is latched when the one shot is triggered. The Allow Active Update feature allows changes made to the duration of an output that has already been triggered, but that is still asserted (active), to affect the output. This feature allows the delivered duration of an active pulse to be extended or shortened, even to the point of causing a current output to terminate when the newly supplied duration is less than what has already been delivered.

An output that is currently asserted (active), but that has not specified the use of this feature via the Allow Active Update Checkbox, or that does not support the feature, will ignore changes of duration.

An output employing this feature would behave as follows given these scenarios

An output that didn't select this feature, or wasn't able to select this feature because it was not supported by the output, would deliver a duration of 40ms in each of the above scenarios.

Block Parameters

Parameter Field Values Comments/Description
Name Alpha-numeric text, single-quote enclosed The name should be unique and not contain special characters, such as spaces, dashes, commas (underscore allowed). This name allows the Set OneShot block and the OneShot Pulse Complete Trigger block to access this definition.
Resource Drop-down list Choose the resource, as listed from available, per selected target.
Show Ports Check box (enable) Enable to show input ports on the block.
Trigger by Input Capture Check box (enable) Allow the referenced Input Capture to trigger the Oneshot as if this block had executed with the Trigger port set to TRUE.
Input Capture Definition Name Alpha-numeric text, single-quote enclosed The name of the Input Capture block that is to provide triggers.
Allow Active Update Checkbox (enable) Check to enable this one shot definition to use the Allow Active Update feature. This option won't be visible if the selected resource is unable to support the feature.
Allow I/O pin to be calibrated Check box (enable) Name, Access Levels and Instrumentation Group fields available. This field is only available on Classic modules, see ModuleTypes for help.
Read Access Level 0-8 Sets security level 1 lowest, 8 highest, for user access to read value. A setting of zero indicates unsecured access is allowed.
Write Access Level 0-8 Sets security level 1 lowest, 8 highest, for user access to write value. A setting of zero indicates unsecured access is allowed.
Instrumentation Group Alpha-numeric text, single-quote enclosed Defines the folder name and hierarchy to be used by a suitable instrumentation tool. Use "|" character between folder names to delineate subfolder structure.