
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.
6 ビュー (過去 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!