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 Latch Delay

Library

RT-EVENTS Discrete

Block

Description

The RTE Latch Delay block stores in memory the value of the input signal each time an event occurs in the trigger signal. The latch block outputs the value stored in memory when the events that precede the last event occurs. The output value is held until the occurrence of the next trigger event. The block compensates the error due to events occurring between samples.

The RTE Latch Delay block enables you to:

  • Define initial conditions in the block dialog box or as an input to the block.
  • Latch on rising, falling or either edge.

Defining Initial Conditions

You can define initial conditions as parameters in the block dialog box or you can input them from external signals. To define the initial condition as block parameters, specify the Initial condition source parameter as internal and enter the value in the Initial condition parameter fields. To provide the initial condition from external sources, specify the Initial condition source parameter as external. Additional input ports appear under the block input.

Trigger Type

The block can stores in memory its inputs only when a specific edge occurs in the trigger signal.

The trigger type parameter allows to select the type of edge that causes the block to do the storage:

  • Select rising to store the input when rising edges are detected.
  • Select falling to store the input when falling edges are detected.
  • Select either to store the input when rising or falling edges are detected.

Mask

RTE Latch Delay Mask

Parameters

Trigger Type

Determine if the latch occurs on rising, falling or either edge.

Initial condition source

Specify the source of the initial condition as internal or as external.

Initial Condition 1

Value outputs before the first edge is detected.

Initial Condition 2

Values outputs after the first edge is detected and before the second edge is detected.

Sample Time

The time interval between samples.

Input

Input (Double)

Input signal to be latched.

Trigger (RTE Boolean)

RTE Boolean signal uses to trigger the storage.

Initial Condition 1 (Double)

Value outputs before the first edge are detected.

Initial Condition 2 (Double)

Value outputs after the first edge are detected and before the second edge is detected.

Output

Ouput (Double)

Latch signal.

Characteristics

Direct Feedthrough

Yes

Sample time

Fixed discrete

Work offline

Yes

Dimensionalized

Yes

Example

The rte_engine.mdl model demonstrates the precision of the RTE blocks compares to the Simulink discrete blocks in the context of a combustion engine. The firing of the combustion is an event-based behavior and necessitates the use of RT-EVENTS to be simulated correctly in discrete sample time.

In this example, the RTE Latch block is used to simulated the compression phase of the combustion cycle of the engine.

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