In blockset designer, how do I add a test harness to a subsystem that has a bus input?
1 view (last 30 days)
Show older comments
Jeremy Quandt
on 2 Dec 2021
Answered: Abhiroop Rastogi
on 14 Feb 2022
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.
tldr;
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?
0 Comments
Accepted Answer
Abhiroop Rastogi
on 14 Feb 2022
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 Comments
More Answers (0)
See Also
Categories
Find more on Inputs 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!