Why does the Simulink block mask initialization run twice?

8 Ansichten (letzte 30 Tage)
If you are debugging a mask initialization, use the keyboard function to stop the code inside the Simulink block mask initialization. You'll notice that the mask is always run twice when a change is made to the mask. Why does the mask run twice?

Akzeptierte Antwort

Jason Nicholson
Jason Nicholson am 21 Mär. 2018
The initialization runs twice if "Icons & Ports"-->"Run initialization" is set to "On" or "Analyze" (assuming MATLAB detects the initialization needs to run). When the initialization runs twice, the order of execution seems to be:
  1. Run "Initialization"
  2. Run "Icons & Ports"
  3. Run "Initialization"

Weitere Antworten (0)

Kategorien

Mehr zu Author Block Masks finden Sie in Help Center und File Exchange

Tags

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by