Real-Time-Workshop access to Simulink Model
显示 更早的评论
I have exported a Simulink model to C using Matlab R2012a and initialized the model by calling 'void Model_initialize(void);'. When I exported the same model using R2012b it seems that this function was split into 'void Model_initialize(void);' and 'RT_MODEL_Model *Model(void);'.
A.1) In R2012b, do I need to call 'Model(); Model_initialize();' to initialize? (For example the initialization of the static model mapping information ('Model_InitializeDataMapInfo()') moved to 'Model()' in R2012b).
A.2) If so, why is 'RT_MODEL_Model *Model(void);' not in the header 'Model.h'? (Furthermore it seems to be part of the "classic call interface", according to source code comments, which indicates that I don't have to use it, but then the model mapping is never setup.)
Thank you for your consideration.
2 个评论
Kaustubha Govind
2012-11-6
What is the System Target File selected in the Configuration Parameters > Code Generation pane?
Micha
2012-11-7
回答(1 个)
Kaustubha Govind
2012-11-20
0 个投票
Ah. I see that you have probably configured Code Generation>Interface>Data exchange>Interface to "C API" on the Configuration Parameters window. I just tried this with a demo model (rtwdemo_counter) in R2012a, but see that rtwdemo_counter_InitializeDataMapInfo is indeed called in rtwdemo_counter_initialize. I wonder if what you're seeing has something to do with your model? In that case, it might be best to report this issue to MathWorks Technical Support to see if they have a solution.
类别
在 帮助中心 和 File Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!