In blockset designer, how do I add a test harness to a subsystem that has a bus input?
3 views (last 30 days)
Jeremy Quandt on 2 Dec 2021
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 on 14 Feb 2022
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: