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!