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

3 次查看(过去 30 天)
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:

采纳的回答

MathWorks Support Team
编辑:MathWorks Support Team 2021-10-26
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.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink Coder 的更多信息

标签

尚未输入任何标签。

产品


版本

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by