Hi,
I have a Simulink desktop real-time model that has a Packet Output set up to do UDP. I want to be able to set it up so it is sending to the correct IP in the InitFcn, rather than hard-coding the IP from the Simulink UI. Does anyone know if it is possible to do that?
I tried a couple approaches:
- Try accessing with get_param(), but eally cannot find the right model path.
- Try setting CLIENT_IP = '127.0.0.1' in the base workspace and fill in the IP field with CLIENT_IP instead of the actual IP address. At compile, I get error that this cannot be resolved.
Matlab R2018b, Windows 10.
Blessings,
Spencer
4 Comments
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/521864-programmatically-change-udp-packet-output-ip-desktop-real-time#comment_929825
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/521864-programmatically-change-udp-packet-output-ip-desktop-real-time#comment_929825
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/521864-programmatically-change-udp-packet-output-ip-desktop-real-time#comment_955612
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/521864-programmatically-change-udp-packet-output-ip-desktop-real-time#comment_955612
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/521864-programmatically-change-udp-packet-output-ip-desktop-real-time#comment_955621
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/521864-programmatically-change-udp-packet-output-ip-desktop-real-time#comment_955621
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/521864-programmatically-change-udp-packet-output-ip-desktop-real-time#comment_960253
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/521864-programmatically-change-udp-packet-output-ip-desktop-real-time#comment_960253
Sign in to comment.