필터 지우기
필터 지우기

Simulink error using dsp.UDPSender in MATLAB function

조회 수: 3 (최근 30일)
Sarbajit Basu
Sarbajit Basu 2021년 5월 31일
답변: Chidvi Modala 2021년 6월 3일
Hello everyone,
I have a very simple Simulink file. A pulse generator with a frequency of 60 Hz, amplitude of 1 and pulse width of 0.01. I have inserted a MATLAB function in the model that should enable sending a udp packet to an IP address when the pulse is high.
When I run a MATLAB script to send an UDP packet it works fine. When I run Simulink model with MATLAB function minus the UDP send command, it works fine. When I run any Simulink model it works fine.
Only and only when I run a Simulink model with a MATLAB function that has udp sending involved, it throws me a tantrum. Instead of MATLAB function, if I use the UDP send MATLAB function, I have the same error.
If I run the same model with the function on a different computer, it works fine.
It is only and only on one computer that it doesn't run.
The Function is: function y = fcn(u)
udps=dsp.UDPSender('RemoteIPAddress','169.254.8.179', 'RemoteIPPort',25000);
if u>0
udps(u)
y=u;
else
y=0;
end
end
I do have a MinGW compiler in my system.
Already tried re-installing MATLAB.
Thanks in advance!!!

답변 (1개)

Chidvi Modala
Chidvi Modala 2021년 6월 3일

제품


릴리스

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by