- Create a new test case.
- Select the required model and test harness.
- Under Inputs, click on Add and navigate to the required input Excel file.
- Select the require sheet.
- Select mapping method as “Signal Name”.
- Click on “Map Inputs”.
- Click on “Apply”.
- Run the test case.
How can I load input data for a bus from an Excel sheet to a test harness model?
16 views (last 30 days)
Show older comments
MathWorks Support Team
on 9 Apr 2018
Edited: MathWorks Support Team
on 29 Feb 2024
How can I load input data for a bus from an Excel sheet to a test harness model?
Accepted Answer
MathWorks Support Team
on 18 Jan 2024
Edited: MathWorks Support Team
on 29 Feb 2024
To import data for a bus signal from an Excel sheet to a test harness model, the Excel sheet should be formatted as shown below:
The first column is Time and the other columns should represent the signals.Timesignal_1(double)signal_Bus.VALVE1 (busSignalName.busElement)signal_Bus.VALVE2(busSignalName.busElement)signal_Bus.a1(This is an Enum)(busSignalName.busElement) Bus: CONTROL (Bus: busName) 0121One1241Two2361Three3481One
Please note that the names for the output signals from the Input port in the test harness should match the column names in the Excel sheet.
Steps to map data from the Excel Sheet to the input ports:
Please refer to the following documentation link for more information regarding specifying Excel file format for signal data:
Please run the below command in the MATLAB R2018b command window to get the release specific documentation
web(fullfile(docroot, 'sltest/ug/specify-microsoft-excel-file-format-for-signal-data.html'))
Please follow the below link to search for the required information regarding the current release:
0 Comments
More Answers (0)
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!