Why does the UDP Send Block not work with Code Generation?

5 visualizaciones (últimos 30 días)
I am trying to compile a signal generator and send the signal through the UDP Send Block to other systems in my computer, but the UDP Send Block cannot be Code Generated, what can I do?

Respuesta aceptada

MathWorks Support Team
MathWorks Support Team el 21 de Mzo. de 2022
Editada: MathWorks Support Team el 21 de Mzo. de 2022
Only the UDP Send Block from the DSP System Toolbox is available for code generation. This UDP Send Block relies on precompiled DLLs that contain functions to pack the data in the required protocol. You can read more about it here in the C/C++ Code Generation section:
Fortunately, there is an option in the Configuration Parameters that allows you to pack these DLLs so that they're easy to find in the generated code. The instructions to use this option is here:
Once we have packed the code in a zip, we just need the DLLs to be placed next to the EXE if no further changes are made to "UDP Send Block". 
This EXE runs as fast as possible. In order to accurately run the EXE in real-time, we recommend Simulink Desktop Real-Time. More information here:
Otherwise, you can build your own logic into the main.c function (using Sleep() or similar) to try and achieve real-time performance. 

Más respuestas (0)

Etiquetas

Aún no se han introducido etiquetas.

Productos


Versión

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by