Trigger
Purpose
Control execution of an atomic subsystem
Library
System
Description
The Trigger block is used in an atomic subsystem (see Virtual and Atomic Subsystems) to create a triggered subsystem. When you copy a Trigger block into the schematic of a subsystem, a corresponding trigger terminal will be created on the Subsystem block. In order to move this terminal around the edges of the Subsystem block, hold down the Shift key while dragging the terminal with the left mouse button or use the middle mouse button.
A triggered subsystem is executed when the trigger signal changes in the manner specified by the Trigger type parameter:
- rising
- The subsystem is executed when the trigger signal changes from 0 to a non-zero value.
- falling
- The subsystem is executed when the trigger signal changes from a non-zero value to 0.
- either
- The subsystem is executed when the trigger signal changes from 0 to a non-zero value or vice versa.
The trigger signal may be a vector signal. In this case the triggered subsystem is executed when any trigger signal changes in the specified manner.
If the sample time of the Subsystem block is not inherited, the trigger signal will be evaluated only at the instants specified by the sample time parameter.
Note A triggered subsystem can only contain components that have an inherited or constant sample time. In particular, it cannot contain any physical components.
Parameters
- Width
- The width of the trigger signal. The default auto means that the width is inherited from connected blocks.
- Trigger type
- The direction of the edges of the trigger signal, upon which the subsystem is executed, as described above.
- Show output port
- When this parameter is set to on, the Trigger block shows an output terminal with the same width as the trigger signal. The output signal will be 1 when the trigger signal has a rising edge, -1 when the trigger signal has a falling edge and 0 at all other times.
Probe Signal
- Output
- The output signal of the Trigger block as described for the parameter Show output port.