Engee documentation

Memory

Outputs the value of the input from the previous calculation step.

memory

Description

The Memory block delays the input by one basic calculation step. This block accepts signals of any supported type (in terms of signal sampling type).

The block accepts one input signal and generates one output signal.

The block output for the first time step is set by the Initial condition parameter. Correct selection of this parameter can minimise undesired behaviour of the output signal. It is not possible to specify the calculation step of the block. The calculation step of this block depends on the type of solver used or is inherited.

The Inherit sample time parameter defines whether the calculation step is inherited or depends on the solver and input sampling type.

When the Memory block inherits a discrete calculation step, it is similar to the block Unit Delay.

Ports

Input

Port_1 - input signal
scalar

Input signal. The input data can be continuous or discrete.

Data types: Float64, Int64.

Support for complex numbers: Yes

Output

Port_1 - input delayed by one calculation step
scalar

The output is the input signal from the previous calculation step.

Data types: Float64.

Parameters

Main

Initial condition - initial condition
0 (by default) | scalar

The value of the output signal at the first simulation step.

Usage in program code

Block parameter

InitialCondition

Values

scalar | vector

By default

0

Inherit sample time - calculation step inheritance
Off (by default) | On
  • On - the calculation step is inherited from the control block.

  • off - the block calculation step depends on the type of solver used to run the model:

    If the solver is a variable step solver and:

    • the control block has a continuous calculation step, the calculation step will be of type FiM.

    • the control block has a discrete calculation step, the calculation step will be of discrete type.

      If the solver is a constant step solver and:

    • the control block has a continuous calculation step, the calculation step will be a discrete step inherited from the solver.

    • the control block has a discrete calculation step, the calculation step will be discrete.

      Usage in program code

      Block parameter

      InheritSampleTime

      Values

      off | on

      By default

      off