Root-cause of the error:
This error is thrown due to a combination of the following two factors:
1. There is a mismatch between the reference model outport and the reference block in the top model:
- The top model is expecting a nonvirtual bus.
- But the reference model checkbox is not selected to" output as nonvirtual bus in parent model":
2. Plus, "Ports and parameters mismatch" is set to "error" in Diagnostics > Model referencing in the configuration parameters.
How to fix this error:
- If you want to output a nonvirtual bus from the reference model, you can check the option "output a nonvirtual bus in parent model" in the outport inside the reference model (see image above), and the error will be fixed.
- If you want a virtual bus, you will need to update the reference model block from the top model, so that the configuration is updated based on the referenced model:
If the "Ports and parameters mismatch" diagnostic were set to "none", the model reference block is automatically updated. Because it is set to "error" here, you will need to update it manually.
Best Answer