Question
How do I correct the 'Invalid root outport connection in the referenced model 'referenced_model' error in Simulink 7.2 (R2008a)? I have a model, which contains a referenced model. When I update the main model I receive the following error: Invalid root outport connection in the referenced model 'referenced_model'. Two different blocks drive the root Outport block 1. To be a valid connection, the root Outport block must be driven by one source port. Use the 'Invalid Root Inport and Outport block connection' option on the 'Model Referencing' group of the Diagnostics page of the Configuration Parameters dialog box to control reporting of this condition. What can I do in order to avoid this error?
Expert Answer
Prashant Kumar
PhD Expert
Answered Aug 20, 2026
As your referenced model has the 'Invalid root Inport/Outport block connection' diagnostic set to error, Simulink will not automatically fix any problems regarding Inport/Outport connections. Your model violates one of the rules by muxing the outputs of two different blocks and feeding it directly to the outport. As stated in the documentation it is now allowed to have the following situation in your model: "A root Output port is connected directly or indirectly to more than one nonvirtual block port".
In order to resolve this problem, you can use one of the following approaches:
1) Set the diagnostic 'Invalid root Inport/Outport block connection' to 'none', which will cause Simulink to automatically handle this kind of situations by inserting additional blocks. The diagnostic can be found under: Simulation > Configuration Parameters... > Diagnostics > Model Referencing
2) Insert a gain block with value 1 between the Mux and Outport block. This will make sure only one block is directly fed into the Outport
100% Run Guarantee
3-Hour Fast-Track Delivery
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here
Related matlab Questions & Solutions
Browse All →
Explore similar technical troubleshooting questions and verified MATLAB solutions:
Ready-to-Run MATLAB & Simulink Projects
Browse All Projects →