Trigger
The subsystem execution trigger.
blockType: TriggerPort
Path in the library:
|
Description
Block Trigger adds an external signal to control the execution of the subsystem. To use this functionality, add a block to the block Subsystem. The subsystem will be executed once at each step when the value of the control signal is changed in the specified way.
The block icon changes depending on the value selected for the parameter. Trigger Type.
Adding to subsystem of the block Trigger creates the triggered subsystem
.
Adding both blocks to the subsystem Trigger Type and Enable creates triggered and activated subsystem
.
Adding a block to the subsystem Trigger with the value function-call the Trigger Type parameter creates Function-call subsystem
.
Ports
Output
#
OUT_1
—
control signal
scalar | vector | the matrix
Details
If the trigger type is — rising, falling, either or function-call, then 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:
-
1for the signal that triggers the rising trigger. -
-1for the signal that triggers the falling trigger. -
2for the function call event. -
0in all other cases.
Dependencies
To use this port, check the box Show output port.
| Data types |
|
| Complex numbers support |
No |
Parameters
Main
#
Trigger Type —
select the type of control signal
rising | falling | either | function-call
Details
Select the type of control signal that the subsystem or model performs.
-
rising— starting the execution of a subsystem or model when the control signal is raised from a negative or zero value to a positive one. If the initial value is negative, raising the signal to zero causes execution. -
falling— starting the execution of a subsystem or model when the control signal drops from a positive or zero value to a negative one. If the initial value is positive, then dropping the signal to zero triggers execution. -
either— starting the execution of a subsystem or model when the control signal either increases or decreases. -
function-call— starting the execution of a subsystem or model when the control signal receives a call event from the block Function-Call Generator.
| Values |
|
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |
#
Show output port —
control of the output port display
Logical
Details
Controls the display of the output port for the signal that identifies the trigger signal or the function call event signal.
Check the box to display the output port and determine which signal triggered the trigger signal or function call event. The width of the output port signal is equal to the width of the control signal. The signal value is as follows:
-
1for the signal that triggers the rising trigger. -
-1for the signal that triggers the falling trigger. -
2for the function call event. -
0in all other cases.
Uncheck the box to delete the output port.
| Default value |
|
| Program usage name |
|
| Tunable |
No |
| Evaluatable |
No |