Table of Contents
One Shot
The One Shot block produces a pulse signal with the specified width whenever the input signal meets user defined trigger condition.
Library
MATLAB Command Line
Click to copy the following command line to the clipboard. Then paste it in the MATLAB Command Window:
qc_open_library('quarc_library/Discontinuities')Description
The One Shot block produces a pulse signal with specified width whenever the input signal meets user defined trigger condition. The trigger condition can be defined through the Trigger type parameter, while the width of the pulse is defined by the Pulse width (samples) parameter. The behavior of the block, when it comes to redundant trigger signals, is regulated by the Redundant pulse parameter. A redundant trigger signal is a trigger signal fed to the trigger port while the block is processing a previous trigger signal. Please refer to Redundant pulse section for more details.
Input Ports
trigger
An edge on this signal triggers a change in the block output.
untriggered output
Output signal when the input signal is not triggered.
triggered output
Output signal when the input signal is triggered.
width
This port appears when the Source of pulse width is set
to External input port
, and sets the width (in samples) of output pulse.
Output Ports
output
Outputs triggered output signal when there is an edge signal at input meets the settings of Trigger type and Redundant pulse, otherwise outputs the signal at untriggered output.
Data Type Support
The block outputs are of type double
.
Parameters and Dialog Box
Trigger type (tunable online)
Specifies the condition when the input signal is considered triggered. The options
are Falling
, Rising
, and Either
.
Redundant pulse (tunable online)
Specifies the behavior of the output signal when redundant triggered signal is received.
Take the following model for example (Trigger type is Falling
):
If this parameter is set to Ignore extraneous pulse
, the redundant signals are ignored,
while the block is dealing with the output signal from the previous trigger signal.
If this parameter is set to Extend pulse width
, the width of the output pulse
is recalculated from the last trigger signal.
Source of pulse width
The source of the pulse width, and options are Specify via dialog
and External input port
.
Pulse width (tunable online)
This parameter appears when the Source of pulse width is set
to Specify via dialog
, and sets the width (in samples) of output pulse.
Targets
Target Name |
Compatible* |
Model Referencing |
Comments |
---|---|---|---|
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
Last fully supported in QUARC 2018. |
|
Rapid Simulation (RSIM) Target |
Yes |
Yes |
|
S-Function Target |
No |
N/A |
Old technology. Use model referencing instead. |
Normal simulation |
Yes |
Yes |
Copyright ©2024 Quanser Inc. This page was generated 2024-10-17. Submit feedback to Quanser about this page.
Link to this page.