How to latch the value of an array signal at a particular timestep using Simulink

4 visualizaciones (últimos 30 días)
Hi,
How to latch(hold) the value of an array signal of size 200(input), if a required condition is met(condition may be provided using a Switch block) at a particular timestep using Simulink ?
The input needs to be latched at that instant when the condition to latch the value becomes true and it should hold that value throughout.
Note: The array input is uint8 type.
Any feedback is appreciated.

Respuestas (1)

Abhaya
Abhaya el 2 de Sept. de 2024
Hi Geethika,
To latch the value of a signal at a particular timestep, you can use Simulink “Enabled subsystem” block in the Simulink model. Set the "Output when disabled" property of the subsystem's "Outport" block to "held" to maintain its last value when the subsystem is disabled.
The condition for enabling the subsystem can be provided by Simulink “Switch” block or Simulink comparator blocks.
An example model for holding the value of a signal is provided below.
To explore other methods to hold a value of a signal please follow the blog link given below.

Categorías

Más información sobre Simulink en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by