Filter löschen
Filter löschen

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

12 Ansichten (letzte 30 Tage)
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.

Antworten (1)

Abhaya
Abhaya am 2 Sep. 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.

Kategorien

Mehr zu Simulink finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by