
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.
    4 views (last 30 days)
  
       Show older comments
    
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 Comments
Answers (1)
  Altaïr
 on 25 Mar 2025
        
      Edited: Altaïr
 on 25 Mar 2025
  
      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 Comments
See Also
Categories
				Find more on Inputs in Help Center and File Exchange
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
