필터 지우기
필터 지우기

Simulink not running script

조회 수: 5 (최근 30일)
Marco Lucchese
Marco Lucchese 2023년 1월 24일
편집: Alvaro 2023년 1월 27일
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
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.
Marco Lucchese
Marco Lucchese 2023년 1월 24일
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.

댓글을 달려면 로그인하십시오.

답변 (1개)

Alvaro
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.

카테고리

Help CenterFile Exchange에서 Subsystems에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by