I need to receive UDP data in real time and do some light processing of the data (mixing and decimating). I eventually want to run my model in real time as a standalone executable so that it can run in a separate process and then pass data to Matlab for further processing. It seems like I have two options for receiving the UDP data (UDP Receive or Packet Input) and two options for the system target file (grt.tlc or sldrt.tlc) used for code generation.
If I use the grt.tlc system target file, I have to use the UDP Receive block. I can use Coder to create an executable, which seems to run, but because it is running as fast as possible the output data has lots of repeated values becuse the UDP Receive block is executing faster than data is being input to the UDP buffer.
If I build the model for desktop real-time execution using a Real-Time Sync Block and Packet Input block, I can run the model in Simulink with the 'Run in Real-Time' execution in the Desktop Real-Time app. The data I get looks good and is sampled at the same rate it is populated over UDP. The problem is that when I try to generate an executable using Simulink Coder (with sldrt.tlc selected as the system target file), no executable is generated.
My question is how to I received UDP data in real-time on a model that still allows me to generate an executable using Simulink Coder?