How to latch the value of an array signal at a particular timestep using Simulink
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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.
0 Commenti
Risposte (1)
Abhaya
il 2 Set 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.
0 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!