- It's best to set the mapping mode to "Block Name" and make sure the input names in the excel sheets are same as the blocks names in your test harness.
- Make sure your excel file has the data in correct format. I've attached a sample file. For more complex use cases, you please refer to this documentation, https://www.mathworks.com/help/sltest/ug/create-data-files-for-test-case-input.html
- The excel file cannot be empty, it must contain valid data.
Mapping external inputs from Excel file to Test Harness fails
8 次查看(过去 30 天)
显示 更早的评论
Hello All,
i am using MATLAB R2015b and trying to run an equivalence test (MIL vs SIL) using SL Test Manager.
I have created a test harness for the model. In the "INPUT" section I am adding the input as external inputs since the inputs are defined in a excel file.
This simple model has only 2 inputs (boolean and uint8) and 1 ouput (boolean).
The first column of my excel file contains the time vector, the second and third one contain the input signal values.
When mapping the inputs I get the following message:
"Failed to map inputs. Use a different file or a different mapping mode."
I have tried the other mapping modes but still get the same error message.
Can anyone advise how to fix this issue?
0 个评论
回答(1 个)
Suman
2024-6-18
编辑:Suman
2024-6-18
Hi Jency,
It seems from this answer, https://www.mathworks.com/matlabcentral/answers/345380-mapping-test-harness-inputs-to-an-excel-xlsx-file#answer_276541 provided by a MathWorks staff that only double data type is supported for inputs in MATLAB R2015b. So, you could try to change the inputs to double type.
There are a few other things you can verify as mentioned in this documentation, https://www.mathworks.com/help/sltest/gs/create-a-simple-baseline-test.html, that may be causing this issue:
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!