Borrar filtros
Borrar filtros

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

1 visualización (últimos 30 días)
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.

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 9 de Dic. de 2009
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.

Más respuestas (0)

Categorías

Más información sobre Modeling en Help Center y File Exchange.

Productos


Versión

R2009a

Community Treasure Hunt

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

Start Hunting!

Translated by