Explicitly stop the block execution via set_param(...)

11 visualizaciones (últimos 30 días)
Dimitri
Dimitri el 1 de Dic. de 2025
Respondida: Aditya el 17 de Dic. de 2025
Hello,
I’m working from the priorityDemon demo:
openExample('simulink_features/BlockPriorityExample').
In my model, I have EEPROM-reading blocks that dispose an operationFinished flag.
Given the priority queue structure shown in the example, is it possible to use a set_param(...) call to explicitly stop a EEPROM-reading block from executing?
Thank you,

Respuestas (1)

Aditya
Aditya el 17 de Dic. de 2025
Hi Dimitri,
You cannot use set_param to stop a block from executing during simulation—set_param can only change parameters like priority, which affects execution order, not whether the block runs.
To control whether an EEPROM-reading block executes, put it inside an Enabled Subsystem and use your operationFinished flag as the enable signal. This way, the block only runs when enabled.

Categorías

Más información sobre Programmatic Model Editing en Help Center y File Exchange.

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by