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.

RTE Switch

Library

RT-EVENTS Signal Routing

Block

Description

The RTE Switch block passes through the first input or the third input based on the value of the second control input. When the control input is an RTE signal, the switch also compensates for events that occur during the calculation step. The second input is called the control input.

You select the conditions under which the first input is passed with the Criteria for passing the first input parameter. You can make the block check whether the control input is greater than or equal to the threshold value, purely greater than the threshold value, or nonzero. If the control input meets the condition set in the Criteria for passing the first input parameter, then the first input is passed. Otherwise, the third input is passed.

Mask

RTE Switch Mask

Parameters

Port data types

Select the port data type.

Criteria for passing first input

Select the conditions under which the first input is passed. You can make the block check whether the control input is greater than or equal to the threshold value, purely greater than the threshold value, or nonzero. If the control input meets the condition set in this parameter, then the first input is passed. Otherwise, the third input is passed.

Threshold

Assign the switch threshold that determines which input is passed to the output.

Interpolate

When checked, allows interpolating the value outputted

Maximum number of events

The maximum number of events or transitions that can occur during a single step. Over this number, events are ignored and not outputted.

Input

u1

Output when the second input meets the criteria.

u2

The control signal that selects which input is output.

u3

Output when the second input doesn’t meet the criteria.

Output

Output

Output signal

Characteristics

Direct Feedthrough

Yes

Sample time

Inherited and fixed discrete

Work offline

Yes

Dimensionalized

Yes

Examples

The rte_resetwalk.mdl model shows the difference between a compensated event-based discrete system, an uncompensated simulated event-based discrete system, and a continuous system and demonstrates the accuracy of the RTE blocks compared to the equivalent discrete block.

In this example, the RTE Switch block is used to activate or deactivate RT-EVENTS compensation. When the compensation is enabled, the RT-EVENTS system gives the same result as the continuous system. When the compensation is disabled, the RT-EVENTS system gives the same erroneous result as the discrete system.

OPAL-RT TECHNOLOGIES, Inc. | 1751, rue Richardson, bureau 1060 | Montréal, Québec Canada H3K 1G6 | opal-rt.com | +1 514-935-2323