Why does the 'LoadFcn' Callback of a commented block get executed in Simulink R2024b?

6 vues (au cours des 30 derniers jours)
Why does the 'LoadFcn' Callback of a commented block get executed in Simulink R2024b?

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 6 Nov 2024
Modifié(e) : MathWorks Support Team le 12 Nov 2024
As for Simulink R2024b, this is the expected behavior.
We can classify the block callbacks in two categories: edit time and run time.
Edit time callbacks like the 'LoadFcn' callback need to execute even if the block is commented out. Just to display the commented block in the model, the block needs to be loaded, and the load callback is triggered. A similar behavior is observed with the 'DeleteFcn' and 'DestroyFcn' callbacks.
On the other hand, callbacks that are runtime (not needed for editing) like 'InitFcn' and 'StartFcn' are not triggered for commented out blocks and inactive variants.

Plus de réponses (0)

Catégories

En savoir plus sur Model, Block, and Port Callbacks dans Help Center et File Exchange

Produits


Version

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by