In mapping inputs for Simulink test manger for test harness with model references the test manager asks to untick compile option. Is there a way to do this using scripts.

조회 수: 5 (최근 30일)
In mapping inputs in Simulink test manger for a test harness with model referencing the test manager asks to untick compile option. Is there a way to do this using scripts.

답변 (1개)

Altaïr
Altaïr 2025년 3월 25일
편집: Altaïr 2025년 3월 25일
The desired option can be found in the map method of the sltest.testmanager.TestInput class. To access the documentation, use the following command:
web(fullfile(docroot, 'sltest/ref/sltest.testmanager.testinput.map.html'))
The 'CompileModel' argument allows for specifying whether to compile the model during input mapping. It is set as a comma-separated pair with true or false. For example, if an Excel sheet exInputs.xlsx contains a sheet inpSheet with timestamps in the first column and signals input1 and input2 in the next columns, and tc is a sltest.testmanager.TestCase object, the following snippet demonstrates how to use the map function for mapping the signals in excel by block name:
% Add Excel data to Inputs section
% Specify two sheets to add: Acceleration and Braking
inpPath = fullfile('<full path to>','exInputs.xlsx');
inpArray = addInput(tc,inpPath,'Sheets',["inpSheet"]);
% Map the input by block name
map(inpArray(1),'Mode',0,'CompileModel',false);
map(inpArray(2),'Mode',0,'CompileModel',false);
Use the following command to read more about sltest.testmanager.TestInput object:
web(fullfile(docroot, 'sltest/ref/sltest.testmanager.testinput-class.html'))

카테고리

Help CenterFile Exchange에서 Inputs에 대해 자세히 알아보기

제품


릴리스

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by