Simulink Test: Error in Conversion Subsystem (Port width or Dimensions)

6 visualizzazioni (ultimi 30 giorni)
Hello,
I am trying to generate a simple test using simulink test for my model. When I create my test harness, Simulink auto generates a Conversion subsystem as part of the test harness to adapt the output of the source blocks to the interface required by the harness component (Not really sure what that means, this was pulled from Simulinks description of the Conversion Subsystem).
When I try to run a simple test using the test sequence block (I tried assigning all the variables to 0, but it doesn't matter what I set their values to), I get 2 Errors that says the following:
Error 1: 'Error in port widths or dimensions. Output port 5 of 'Diag_FaultCounter_Lib_Harness1/Input Conversion Subsystem' is a one dimensional vector with 1 elements'.
Error 2: 'Error in port widths or dimensions. Input port 5 of 'Diag_FaultCounter_Lib_Harness1/DeactClutchDisengagementProhibit' is a one dimensional vector with 2 elements'.
The error references the Conversion Subsystem that Simulink Auto generated, and notes that it's outport is a one dimensional vector of 1 elements in the first Error. In the second error, it references the same signal outport going into the inport of 'DeactClutchDisengagementProhibit' (The block being tested), and it notes that the signal there is now a one dimensional vector with two inputs. I am confused how the signal might've changed dimensions between ports and I don't know how to fix this. Any help?
I attached pictures of the error message as well as the test harness set up (Where you can see the test sequence block, assesment block and the subsytem being tested) and the test sequence.
Thank you,
Mohamed Elyaman
  3 Commenti
Mohamed Elyaman
Mohamed Elyaman il 9 Lug 2020
Hello Ankit,
Unfortunately that does not work. Changing the dimensions throws a dimension error:
Size mismatch (size [1 x 1] ~= size [1 x 2]). The size to the left is the size of the left-hand side of the assignment.
Please let me know what else I can do. I attached a picture of the error for you to see.
Thanks,
Mohamed Elyaman

Accedi per commentare.

Risposte (0)

Prodotti


Release

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by