In blockset designer, how do I add a test harness to a subsystem that has a bus input?

7 ビュー (過去 30 日間)
1.) Create an "Empty Subsystem".
2.) Once it is created and opened, attach the model to a data dictionary that contains a bus object.
3.) Once attached to the data dictionary, set the inport datatype to the bus in the dictionary.
4.) Save the model and return to the blockset designer. For the block, under test, click "Create".
Once I do this I get the following error from the UI,
Additionally, on the MATLAB command line the following message will be displayed,
'An error occurred while trying to generate the simulation input. Check your model configuration and ensure the external input interface is configured properly.'
Looking at model options for the block there are only codegeneration options.
I am just trying to create an "Empty Subsystem" block in the blockset editor that can take a bus (defined in a data dictionary) as an input and create a Test (harness model) for it. Reference manual and examples all only take in 'double' data types, so how to do this?


Abhiroop Rastogi
Abhiroop Rastogi 2022 年 2 月 14 日
Hi Jeremy,
This is as issue with the automatic test harness creation feature in Blockset Designer. The issue occurs when a bus object is specified on the input of the library block. Blockset Designer isn't correctly identifying that the input to the block needs to be a bus, so the harness fails to compile.
The currently workaround is to create the block tests manually, and add them in the Blockset Designer as shown in the documentation link below:

その他の回答 (0 件)


Find more on Dependency Analysis in Help Center and File Exchange





Community Treasure Hunt

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

Start Hunting!

Translated by