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!