Why do I get an error when creating test harness for model reference with bus object as input and output?

I tried to create a test harness for my model reference block. The model has inputs and outputs that are defined by bus objects.
I create the test harness by right click > Test Harness > Create Test Harness. Then, I select Test Sequence as the sources and sink, and check the add separate assessment block option.
After selecting "OK", I receive the following error message in a pop up window:
The model 'mymodel' failed to compile. Select 'No' to see error messages from compile. Select 'Yes' to create a harness configured for Prototyping (this can be changed later).
I select "Yes". Then, I get a test harness where the Test Sequence block does not have the bus variables defined correctly.
How do I fix this?

 Accepted Answer

The reason the test harness is not created correctly is because there are some errors when compiling the model. To see the errors, instead of selecting "Yes" in the pop up dialog, select "No". Then, open the Diagnostic Viewer to see the full error messages. Once the errors are resolved, the test harness is created correctly with the bus information in it.

More Answers (0)

Products

Release

R2017b

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!