Simulink not running script
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
Benjamin Thompson
2023-1-24
Also verify your firewall settings allow the MATLAB process to send UDP data grams to the port number you want.
回答(1 个)
Alvaro
2023-1-27
编辑:Alvaro
2023-1-27
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!