Deployment of Simulink Models

烈酒焚心 提交于 2019-12-18 08:59:03

问题


I have been trying to find out how to deploy a Simulink model. There are possibilities and problems as well.

  • If I use Simulink Coder how can I find the generated code on my computer? Where is it saved as a file or package of files?
  • Can we deploy Simulink as .NET Assembly? If we can, where can I find a detailed documentation about it.
  • Is there any other way to use my Simulink model standalone?

Thank you for any effort.


回答1:


  1. By default all the code gets placed into a folder, in the current directory, called ModelName_CodeTarget, where ModelName is the name of your model and CodeTarget is the particular type of code you are generating. (This folder is created during the build process if it doesn't already exist.)

  2. There is no mechanism for automatically generating a .Net assembly. Simulink Coder generates C code; what you do with it is then up to you (just as it would be with hand written code). Note that the process is fully customizable, so you could create your own build process to autmatically wrap the C code into an assembly (but it would be a very advanced maneuvre to do this).

  3. There are a couple of Simulink Coder "targets" that generate standalone executable files. For instance, the GRT (Generic Real-Time) target generates a simple .exe file; the RSIM target (the Rapid Simulation Target) generates an exe where you can specify different .mat files that can be used to specify different model parameters for different simulation runs, and have the results of the different runs stored to different output .mat files.

Most of these questions are answered by looking at the early chapters of the Simulink Coder documentation. It would be worth you taking some time to look at it to get a feel for how the code generation process works.



来源:https://stackoverflow.com/questions/22516506/deployment-of-simulink-models

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!