.net Using a complex Simulink model as a realistic real time simulation

11 次查看(过去 30 天)
I am developing a .net software (C# or C++) that will use a complex Simulink model of a motor to do realistic simulations. I have just started looking in to this and would need some pointers of which direction to go.
The software will have basic inputs like throttle, brake and gear. These values need to be sent to a running simulation and the values for speed, rpm etc needs to be read from the model and presented in the software.
I have successfully been able to use the MLapp com object to start simulation and change values. But it is to slow (it will take about a second to change a value) and I have figured out have to read values yet.
I read somewhere that the model can be compiled to C code and used as a dll. How do I do that? Is that the right way to go?
/J

采纳的回答

TAB
TAB 2012-6-12
You can generate the shared library (dll) from your model. For that you need two more products Simulink Coder (Real time workshop) and Embedded coder. If you have these products, you can generate DLL by selecting ert_shrlib.tlc target.
For more information see

更多回答(0 个)

类别

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

产品

Community Treasure Hunt

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

Start Hunting!

Translated by