Mapping external inputs from Excel file to Test Harness fails

5 ビュー (過去 30 日間)
Jency Valiakalail
Jency Valiakalail 2019 年 8 月 13 日
編集済み: Suman 2024 年 6 月 18 日
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?

回答 (1 件)

Suman
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:
  • 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.

カテゴリ

Help Center および File ExchangeInputs についてさらに検索

製品


リリース

R2015b

Community Treasure Hunt

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

Start Hunting!

Translated by