Simulink not running script

2 views (last 30 days)
Marco Lucchese
Marco Lucchese on 24 Jan 2023
Edited: Alvaro on 27 Jan 2023
What steps can I take to resolve the errors and warnings when running a Simulink script (.slx) that includes a UDP send block and is giving the following errors.
I'm running Simulink on Docker, that was installed through mpm, from the official Mathworks docker hub, reguraly licensed.
Once running the sim command the shell hangs, as if it was running but it's actually not, because I tryed to intercept traffic with wireshark and no traffic is being generated.
>> sim('/usr/local/src/simple.slx')
Warning: 'Output Port 2' of 'simple/Subsystem/UDP Receive' is not connected.
Warning: 'Output Port 2' of 'simple/Subsystem/UDP Receive1' is not connected.
Warning: 'Output Port 1' of 'simple/Subsystem' is not connected.
Warning: 'Output Port 2' of 'simple/Subsystem' is not connected.
Warning: Block diagram 'simple' contains 1 algebraic loop(s). To see more details about the loops use the command <a href="matlab:Simulink.BlockDiagram.getAlgebraicLoops(bdroot);">Simulink.BlockDiagram.getAlgebraicLoops('simple') </a> or the
command line Simulink debugger by typing <a href="matlab:sldebug(bdroot);">sldebug('simple') </a> in the MATLAB command window. To eliminate this message, set Algebraic loop to "none".
Found algebraic loop containing:
simple/Gain
simple/Sum2 (algebraic variable)
  3 Comments
Benjamin Thompson
Benjamin Thompson on 24 Jan 2023
Also verify your firewall settings allow the MATLAB process to send UDP data grams to the port number you want.
Marco Lucchese
Marco Lucchese on 24 Jan 2023
I've attached the Simulink model. I've also ensured that the ports on the container are open and the connections have been successfully tested. Based on these checks, it is highly unlikely that the issue is related to networking.

Sign in to comment.

Answers (1)

Alvaro
Alvaro on 27 Jan 2023
Edited: Alvaro on 27 Jan 2023
These are warnings so your model should still be running but maybe the model is stuck or nothing is being logged.
The top 4 warnings are there because you have not connected the outports of your UDP blocks and your subsystem block to anything else. You may ignore these warning if you wish but note that some data is not being transmitted beyond those blocks.
The other warning is telling you that there is an algebraic loop in your model. The output of one of your sums feeds into a gain block which then is used as an input for the same sum. It might be causing your model to be stuck.
From the model you uploaded, I don't see anything being logged in the top system, I would try addressing these warnings and connecting some output ports to the outports of that subsystem.

Categories

Find more on Simulink Functions in Help Center and File Exchange

Products


Release

R2021a

Community Treasure Hunt

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

Start Hunting!