Table of Contents
Memory
The Memory block holds and delays its input by one major timestep. This version supports variable-size signals and discrete sample times.
Library
Description
The Memory block holds and delays its input by one major timestep. The QUARC version of the block acts like both the Memory and Unit Delay blocks combined, since the QUARC block accepts a continuous or discrete sample time. Also, the QUARC Memory block accepts the built-in Simulink data types, bus signals and variable-size signals. The Simulink version of the block does not currently accept variable-size signals.
To set the initial conditions for a bus signal, either use a scalar for the Initial condition parameter, which will initialize all the bus elements to the same value, or use a MATLAB structure which mirrors the bus signal in the order of the fields, the names of the fields, and the data types of the fields.
Helpful Hints
Variable-size signals
When using the Memory block with variable-size signals in subsystems, make sure any Action Port, Enable or Trigger ports are configured to propagate the sizes of variable-size signals during execution.
Input Ports
The input signal to be delayed.
Output Ports
The output is the delayed signal.
Data Type Support
This block accepts the built-in Simulink data types, as well as bus signals and variable-size signals. See Using Bus Objects with QUARC for more information on bus signals. See Variable-Size Signals for more information on variable-size signals.
Parameters and Dialog Box
Initial Condition
Specifies the initial value of the output.
Sample Time
The sample time of the block. A sample time of 0 indicates that the block will be treated as a continuous time block. A positive sample time indicates that the block is a discrete time block with the given sample time.
A sample time of -1 indicates that the block inherits its sample time. The default sample time is set to -1 to inherit the sample time.
To use the fundamental sampling time of the model, set the sample time to qc_get_step_size, which is a QUARC function that returns the fundamental sampling time of the model.
Targets
Target Name |
Compatible* |
Model Referencing |
Comments |
---|---|---|---|
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
||
Yes |
Yes |
Last fully supported in QUARC 2018. |
|
Rapid Simulation (RSIM) Target |
Yes |
Yes |
|
S-Function Target |
No |
N/A |
Old technology. Use model referencing instead. |
Normal simulation |
Yes |
Yes |
Copyright ©2024 Quanser Inc. This page was generated 2024-04-16. Submit feedback to Quanser about this page.
Link to this page.