Real-Time-Workshop access to Simulink Model
2 views (last 30 days)
Show older comments
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 Comments
Kaustubha Govind
on 6 Nov 2012
What is the System Target File selected in the Configuration Parameters > Code Generation pane?
Answers (1)
Kaustubha Govind
on 20 Nov 2012
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.
0 Comments
See Also
Categories
Find more on Deployment, Integration, and Supported Hardware in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!