Memory
Outputs the input values from the previous calculation step.
Description
Block Memory 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 parameters Initial condition. Correct selection of this parameter can minimise undesired output behaviour. It is not possible to specify the block calculation step. The calculation step of this block depends on the type of solver used or is inherited.
Parameters Inherit sample time defines whether the calculation step is inherited or depends on the solver and input sampling type.
When the block Memory inherits a discrete calculation step, it is similar to the block Unit Delay.
Ports
Input
#
IN_1
—
input signal
scalar
Details
Input signal. The input data can be continuous or discrete.
Data types |
|
Complex numbers support |
Yes |
Output
#
OUT_1
—
output signal
scalar
Details
The output signal is the input signal from the previous calculation step.
Data types |
|
Complex numbers support |
Yes |
Parameters
Main
#
Initial condition —
initial condition
Scalar / array of real and/or complex numbers
Details
The value of the output signal at the first simulation step.
Default value |
|
Program usage name |
|
Tunable |
Yes |
Evaluatable |
Yes |
#
Inherit sample time —
calculation step inheritance
Logical
Details
If this check box is selected, the calculation step is inherited from the control block.
If this checkbox is unchecked, 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, then the calculation step will be of type
FiM
. -
the control block has a discrete calculation step, then 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, then the calculation step will be a discrete step inherited from the solver.
-
the control block has a discrete calculation step, then the calculation step will be discrete.
-
Default value |
|
Program usage name |
|
Tunable |
No |
Evaluatable |
No |