
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.
댓글 수: 0
답변 (1개)
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'))
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Inputs에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!