部署Simulink模型 [英] Deployment of Simulink Models

查看:178
本文介绍了部署Simulink模型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在试图找出如何部署一个 Simulink 模型。还有可能性和问题。

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


  • 如果我使用Simulink Coder,如何在计算机上找到生成的代码?可以将其作为文件或文件包保存在哪里?

  • 我们可以部署 Simulink 作为.NET程序集吗?如果可以,我可以在哪里找到有关它的详细文档。

  • 有没有其他方法可以使用我的Simulink模型独立?

  • 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?

感谢您的努力。

推荐答案


  1. 默认情况下,所有代码都放在一个名为ModelName_CodeTarget的当前目录中的文件夹中,其中ModelName是模型的名称,CodeTarget是要生成的特定代码类型。 (如果文件夹在构建过程中不存在,则创建此文件夹。)

  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.)

没有自动生成.Net程序集的机制。 Simulink Coder生成C代码;你所做的是由你决定(就像用手写的代码一样)。请注意,该过程是完全可定制的,因此您可以创建自己的构建过程以自动将C代码包装到程序集中(但这将是一个非常先进的操作)。

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).

有几个Simulink编码器目标生成独立的可执行文件。例如,GRT(Generic Real-Time)目标生成一个简单的.exe文件; RSIM目标(快速模拟目标)生成一个exe,您可以在其中指定不同的.mat文件,可用于为不同的模拟运行指定不同的模型参数,并将不同运行的结果存储到不同的输出.mat文件。

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.

大多数问题都是通过查看Simulink编码器文档的早期章节来回答的。
值得你花一些时间来看看它,以了解代码生成过程的工作原理。

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.

这篇关于部署Simulink模型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆