What does it mean to 'Update Diagram' in Simulink?

조회 수: 57 (최근 30일)
MathWorks Support Team
MathWorks Support Team 2011년 8월 11일
편집: MathWorks Support Team 2024년 4월 2일
I am looking for documentation on the result of selecting 'Update Diagram' in Simulink.

채택된 답변

MathWorks Support Team
MathWorks Support Team 2024년 4월 1일
편집: MathWorks Support Team 2024년 4월 2일
Documentation on the 'Update Diagram' functionality can be found under the Model Compilation section of the documentation below:
Here is additional information on 'Update Diagram':
The Simulink compilation phase propagates signal and sample time attributes. It is equivalent to selecting the "Edit -> Update Diagram" (Ctrl-D) menu item from the Simulink menubar.
Before every simulation and when the user requests it, Simulink performs an 'Update Diagram' (Ctrl-D) to ready the model for simulation. During the update process, Simulink does the following:
1. Evaluates the model's block parameter expressions to determine their values.
2. Determines signal attributes, e.g., name, data type, numeric type, and dimensionality, not explicitly specified by the model and checks that each block can accept the signals connected to its inputs.
Simulink uses a process called attribute propagation to determine unspecified attributes. This process entails propagating the attributes of a source signal to the inputs of the blocks that it drives.
3. Performs block reduction optimizations.
4. Flattens the model hierarchy by replacing virtual subsystems with the blocks that they contain.
5. Determines the block sorted order (see Controlling and Displaying the Sorted Order for more information).
6. Determines the sample times of all blocks in the model whose sample times you did not explicitly specify.
7. Evaluates the INITFCN callbacks for the model and blocks in the model.
Stateflow and Embedded MATLAB Function blocks perform simulation through code generation, which means that 'Update Diagram' would also generate and compile code for these blocks.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Buffers, Switches, and Counters에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by