Documentation Home Page RT-LAB Home Page
Pour la documentation en FRANÇAIS, utilisez l'outil de traduction de votre navigateur Chrome, Edge ou Safari. Voir un exemple.

OpSubsystemTrigger

Library

rtlab/Miscellaneous

Block

The OpPauseModel block allows a user to pause a model.

OpSubsystemTrigger block

Mask


Figure 2: OpSubsystemTrigger mask.

Description

The OpSubsystemTrigger block is used inside a Master or Slave subsystem to asynchronously trigger the execution of one or more Simulink subsystems. It must be used along with an user defined (Keyboard trigger block in our example) Trigger block, which is used to interract with the source of the trigger and to tell which of the subsystems is to be triggered. The trigger block within the subsystem must have its Trigger-Type parameter set to Function Call. A Simulink example is shown below:


It is also possible to trigger the subsystems directly from the model using an optionnal block input.

Parameters

Number of subsystemsNumber of subsystems that will be driven by this block.
Trigger Group LabelSpecifies the group label that is shared between the OpSubSystemTrigger block and its associated OpTrigger block. No group label can be shared with any other OpSubSystemTrigger block.
Dynamic priorityAdds a block inport that allows modifying the initial priority specified below during run-time.
PriorityDefines the priority of the associated triggered subsystems relative to RT-LAB (the model application). If Dynamic priority is checked, this is the initial priority.
  • 0: same priority as RT-LAB
  • >0: a corresponding number of priority levels above RT-LAB
  • <0: a corresponding number of levels below RT-LAB
Use input as an additional trigger sourceUse this option to trigger the subsystems directly from the model like it would be done with a usual Simulink triggered subsystem. An input will appear on the block, where the triggering signals for each subsystem must be applied using a multiplexer. The first input corresponds to the first subsystem, the second input to the next and so on.
Trigger onThis option appears only if the Use input as an additional trigger source option is checked. Indicates the input event on which the subsystems are to be triggered. Available options are rising edge, falling edge or both edges.

Inputs

This block has a maximum of two optional inputs.

TriggerAvailable only if the Use input as an additional trigger source option is selected. It has a width corresponding to the number of triggered subsystems. Simulink triggering signals for each subsystem must be applied to this input.
Priority

Available only if Dynamic priority is selected. Allows changing during run-time the priority of the triggered subsystems relative to RT-LAB (the model application).

  • 0: same priority as RT-LAB
  • >0: a corresponding number of priority levels above RT-LAB
  • <0: a corresponding number of levels below RT-LA

Outputs

The triggering connection is available at the output. Only one outport is available, so a demultiplexer must be used to link all triggered subsystems. This signal has no significance other than indicating the trigerring relation; it cannot be used for other purposes.

Characteristics and Limitations

Direct Feedthrough

No

Discrete sample time

Yes

XHP support

Yes

Work offline

N/A

Since a subsystem triggered with the OpSubsystemTrigger block is executed asynchronously to the model, some management is required when it comes to exchanging signals between the triggered subsystem and the rest of the model. It is to make sure that all the signals read and written by the triggered subsystem are from the same iteration.

To achieve this goal, RT-LAB automatically inserts a block that takes care of this management. These blocks usually add only a minimal computation overhead.

A slightly larger overhead may occur if the subsystem is triggered at the moment its inputs are updating by the model. The same overhead may occur if the model is reading the outputs of the triggered subsystem exactly when they are written by the subsystem. The probability of such collision is very low since they can only occur within very short delays.

Limitations

  • Goto-From exchange between the triggered subsystem and the outside blocks are not fully supported. Though functional, not all signals may originate from the same iteration. Note that Goto-From exchange within the triggered subsystem is fully operational;
  • The same limitation applies to the Data Store Read, and Data Store Write blocks;
  • IMPORTANT: To ensure correct functionality, make sure that all the inports and outports of the triggered subsystem are connected. Also, make sure that the related In and Out blocks within the triggered subsystem are connected to at least another block.



OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323
Follow OPAL-RT: LinkedIn | Facebook | YouTube | X/Twitter