How do I execute "Running All Signal Groups" on Signal Builder GUI from the command line in Simulink 7.2 (R2008b)?

1 回表示 (過去 30 日間)
I have created several signal groups with the Signal Builder GUI. I would like to know if there is an equivalent command line functionality for the "Run All" button.

採用された回答

MathWorks Support Team
MathWorks Support Team 2009 年 12 月 9 日
The ability to run all signal groups from the command line is not available in Simulink.
To work around the limitation, see below.
If you are using Simulink 7.1 (R2008a) or later, execute the following commands:
% Assuming the Signal Builder Editor is open
t=findall(0,'Type','figure','Tag','SignalBuilderGUI');
sigbuilder('playAll',t)
If you are using Simulink 6.3 (R14SP3) to Simulink 7.0 (R2007b), please see below. Consider the 'sf_car' demo. To run all the signal groups, you need to use the following code:
open_system('sf_car')
time = signalbuilder('sf_car/User Inputs')
% Check to see if there are only one group.
if iscell(time)
numtabs = size(time, 2)
else
numtabs = 1
end
% Loop through signal groups
for k = 1:numtabs
signalbuilder('sf_car/User Inputs','activegroup', k);
sim('sf_car');
end
If you would like the coverage information collected as well (which the 'Play All' does
by default if you have Simulink Verification & Validation) then you should
use CVSIM instead of SIM command in the above code.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeModeling についてさらに検索

製品


リリース

R2009a

Community Treasure Hunt

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

Start Hunting!

Translated by