Mapping external inputs from Excel file to Test Harness fails

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?

Risposte (1)

Suman
Suman il 18 Giu 2024
Modificato: Suman il 18 Giu 2024
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.

Prodotti

Release

R2015b

Richiesto:

il 13 Ago 2019

Modificato:

il 18 Giu 2024

Community Treasure Hunt

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

Start Hunting!

Translated by