How can I run a Simulink model with a C S-Function on a Simulink Real-Time PC?
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a Simulink model with an S-Function Builder block in it. The S-Function Builder block defines a custom Outputs function and includes 2 extra C files which implement necessary functionality. I can successfully build the code for the Simulink Real-Time target, and it gets deployed on the Simulink Real-Time PC. However, after deployment, I see the following message in red in the bottom-right corner of the Real-Time PC screen:
To run the generated code outside the MATLAB environment, use the packNGo function.
I can build a .zip-file with the packNGo function, however I have no idea what to do with it and how to deploy it on the Real-Time PC.
How can I run a model with some custom C code on a Simulink Real-Time PC?
The build log and the project files are attached.
0 commentaires
Réponses (1)
Jon Lobo
le 3 Juil 2018
Hi Mikhail,
I took a look at your example. It looks like you did everything right. The only issue is that you are using the UDP Send block from the DSP Systems Toolbox. This is not supported in Simulink Real-Time.
I was able to find this by using SimulinkRealTime.utils.getConsoleLog to see the line above "To Run the generated code outside the MATLAB environment...". The line above reads "Error: Could not open library: networkdevice.dll'.
0 commentaires
Voir également
Catégories
En savoir plus sur Target Computer Setup dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!