Trigger
Subsystem Execution Trigger.
Description
The Trigger block adds an external signal to control the execution of a subsystem. To use this functionality, add the block to the Subsystem block. The subsystem will be executed once per step when the value of the control signal changes in the specified way.
The block icon changes depending on the value selected for the Trigger type parameter.
Ports
Output
Port_1 - control signal
scalar
| vector
| matrix
If the trigger type is rising
, falling
or either
, the port outputs a value that identifies the control signal returned as a scalar or vector. For each element of the input signal, the value at this time step is:
-
1
for a signal that causes a rising trigger. -
-1
for a signal that causes a falling trigger. -
2
for a function call event. -
0
for all other events.
Dependencies
To use this port, select the Show output port checkbox.
Data types: Float64
.
Parameters
Trigger type - select the type of triggering signal
rising (by default)
| falling
| either
Select the type of control signal that the subsystem or model performs.
-
rising
- start execution of the subsystem or model when the control signal rises from a negative or zero value to a positive value. If the initial value is negative, raising the signal to zero triggers execution. -
falling
- triggers execution of the subsystem or model when the control signal falls from a positive or zero value to a negative value. If the initial value is positive, a falling signal to zero triggers execution. -
either
- starts execution of the subsystem or model when the control signal is either rising or falling.
Block parameter |
|
Values |
|
By default |
|
Show output port - control output port display
off (by default)
| on
Output port display control for the signal that identifies the start signal or function call event signal.
Select the check box to display the output port to identify which signal triggered the start signal or function call event signal. The width of the output port signal is equal to the width of the control signal. The signal value is as follows:
-
1
for a signal that causes a rising trigger. -
-1
for a signal that causes a falling trigger. -
2
for a function call event. -
0
for all other events.
Clear the check box to remove the output port.
Block parameter |
|
Values |
|
* By default* |
|