Why does the Simulink block mask initialization run twice?

조회 수: 3 (최근 30일)
Jason Nicholson
Jason Nicholson 2018년 3월 2일
답변: Jason Nicholson 2018년 3월 21일
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?

채택된 답변

Jason Nicholson
Jason Nicholson 2018년 3월 21일
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"

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Functions에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by