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

124 Ansichten (letzte 30 Tage)
MathWorks Support Team
MathWorks Support Team am 11 Aug. 2011
Bearbeitet: MathWorks Support Team am 2 Apr. 2024 um 0:00
I am looking for documentation on the result of selecting 'Update Diagram' in Simulink.

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 1 Apr. 2024 um 0:00
Bearbeitet: MathWorks Support Team am 2 Apr. 2024 um 0:00
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.

Weitere Antworten (0)

Kategorien

Mehr zu Simulink Functions finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by