Simulink error using dsp.UDPSender in MATLAB function

2 views (last 30 days)
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!!!

Answers (1)

Chidvi Modala
Chidvi Modala on 3 Jun 2021

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!