Get Simulink Coder executable to communicate with other running processes using input and output streams in R2018b

3 vues (au cours des 30 derniers jours)
I would like to get the executable I generate from Simulink Coder to communicate with a different process I have running on my machine. I have a executable program we created independently and I would like this program to send inputs to and read outputs from the executable generated from my Simulink model using Simulink Coder. I was wondering if I could use a process similar to input and output streams as in the following link:

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 22 Oct 2021
Modifié(e) : MathWorks Support Team le 26 Oct 2021
Directly generating an executable from Simulink to interface with other another custom processes is not directly supported by any Simulink feature such as blocks, Configuration Parameters, Support package, etc. Unfortunately, such functionality will have to be implemented through manual edits of generated C code and/or integrating the generated C code with you own code.
This is a common workflow for our customers and there are features in Simulink Coder that allow you to control how code is generated to make integrating the generated code with your own code easier. See the link below for controlling how Inport/Outport blocks show up in the generated code:
For more ways to control how to interface your code with external code, see the following links:
Also there is the C API that helps in accessing model information like signals and parameters, see the link below:
The Embedded Coder product would have even more features to help with this, including: model-to-code tracing, interface code report, and more interfacing options. See the link below for details.

Plus de réponses (0)

Catégories

En savoir plus sur Simulink Coder dans Help Center et File Exchange

Tags

Aucun tag saisi pour le moment.

Produits


Version

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by