Help on compiling Simulink model with UDP send/receive

1 vue (au cours des 30 derniers jours)
Brad
Brad le 17 Mai 2023
I made a Simulink model that communicates with a Unity app via UDP send/receive (picture below).
I have verified that it works in real-time with 2 different configurations in the Simulink model running with the Simulink Desktop Real-Time app:
Config 1: Simulink Desktop Real-Time "Packet Input" and "Packet Output" blocks using UDP protocol
Config 2: DSP System Toolbox "UDP Receive" and "UDP Send" blocks
Ultimately, I want to compile the model to a .exe file so I can run it separately from Matlab/Simulink. My understanding is I have to choose the "System target file" in Code Generation options as grt.tlc (Generic Real-Time Target) to get a .exe file.
Problem with Config 1 is "Packet Input/Output" blocks just aren't setup to compile.
Problem with Config 2 is per this post that I have to somehow relocate the networkdevice.dll file into the same folder as the .exe file but I don't understand how to generate that file. Also I need the "Real-Time Sync" block from the Simulink Desktop Real-Time toolbox to run in real time but when I have that in my model I get a different error: Error: The system target file is set to "grt.tlc". Simulink Desktop Real-Time block 'udp_test/Real-Time Synchronization' requires it to be set to either "sldrt.tlc" or "sldrtert.tlc". Ok but sldrt.tlc does not build to a .exe file...does sldrtert.tlc build to a .exe file?? But sldrtert.tlc requires I pay for the "Embedded Coder" app for Matlab which I don't own...but could purchase if it can create a .exe file??

Réponses (0)

Catégories

En savoir plus sur Troubleshooting in Simulink Desktop Real-Time dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by