How do I create a report of a model such that the subsystems are ordered according to position of block in Simulink 7.6 (R2010b)?

1 次查看(过去 30 天)
I want to generate a report of a model using Simulink Report Generator. The blocks in the report have to be arranged either from left to right or from top to bottom. Basically the generated report should have subsystems ordered as they are visually seen in the model.
For example if you open the shipped demo model "sldemo_househeat": subsystems should be ordered as:
-> First the entire model image on the report
-> Then the image of More Info Block
-> Then the image of the F2C block
-> Then the image of the Thermostat (as in the contents of the subsystem)
-> Then the contents of Heater Subsystem
-> Then the image of the F2C block
-> Then contents of House Subsystem.
-> Finally the image of the C2F block

采纳的回答

MathWorks Support Team
There is no menu option that you can select within the report structure which would order the subsystems visually in the report as they are seen in the model. To do this you will have to write a custom MATLAB code using the Simulink API which would gather all the Subsystems from the model, query the position (of the upper left hand corner of block) and order the subsystems/images based on the position onto the report.
I have attached a simple example 'custom_system_loop' which demonstrates this capability.
On the MATLAB command prompt, type
sldemo_househeat
Double click to open custom_system_loop report.
Right click on Report - custom_system_loop.rpt and select 'Report'.
I have added a component Chapter and a subcomponent EVAL with a MATLAB code along with it which finds the name of the subsystems in the model and sorts them based on 'Position' parameter of the subsystem block. At this point I use the System Snapshot component to capture the image of each subsystem and display them on the report.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink Report Generator 的更多信息

产品


版本

R2010b

Community Treasure Hunt

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

Start Hunting!

Translated by