Engee documentation

Trigger

The subsystem execution trigger.

blockType: TriggerPort

Path in the library:

/Basic/Ports & Subsystems/Trigger

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 triggered subsystem.

Adding both blocks to the subsystem Trigger Type and Enable creates triggered and activated subsystem triggered enabled subsystem.

Adding a block to the subsystem Trigger with the value function-call the Trigger Type parameter creates Function-call subsystem 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:

  • 1 for the signal that triggers the rising trigger.

  • -1 for the signal that triggers the falling trigger.

  • 2 for the function call event.

  • 0 in all other cases.

Dependencies

To use this port, check the box Show output port.

Data types

Float64

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

rising | falling | either | function-call

Default value

rising

Program usage name

TriggerType

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:

  • 1 for the signal that triggers the rising trigger.

  • -1 for the signal that triggers the falling trigger.

  • 2 for the function call event.

  • 0 in all other cases.

Uncheck the box to delete the output port.

Default value

false (switched off)

Program usage name

ShowOutputPort

Tunable

No

Evaluatable

No

Additional options

C code generation: Yes