How can I load input data for a bus from an Excel sheet to a test harness model?

16 views (last 30 days)

Accepted Answer

MathWorks Support Team
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:
  1. Create a new test case.
  2. Select the required model and test harness.
  3. Under Inputs, click on Add and navigate to the required input Excel file.
  4. Select the require sheet.
  5. Select mapping method as “Signal Name”.
  6. Click on “Map Inputs”.
  7. Click on “Apply”.
  8. Run the test case.
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:

More Answers (0)

Tags

No tags entered yet.

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!