How force the call of MdlTerminate() when connect to target with Quarc 2.2 to run real-time simulink model?
Show older comments
Hello,
I work with Quarc 2.2 and I have some trouble with MdlStart of a C s-function. When I connect model to target (quarc_win64.tlc), the MdlStart() function of my c s-function is called a first time, and MdlTerminate() is not called. The problem is when I start the real time code, MdlStart() is called a second time, and I have some blocking operations which can't be executed a second time if there were not terminated propely with MdlTerminate() before...
Is it possible to force the call of MdlTerminate() after I connect the model to target? Or disable MdlStart() call when I connect to target?
1 Comment
Kaustubha Govind
on 17 Aug 2012
I'm not sure if this behavior is being dictated by the Quarc target, or by Simulink, or the way in which Quarc interfaces with Simulink. I don't have access to the target, but it might be a good idea to check this either with Quarc Support or MathWorks Support.
As an aside, is your S-function non-inlined or inlined? If there is a TLC file associated with it, you could make the MdlStart in your S-function MEX code a no-op, but force it to be generated in the target via the TLC.
Answers (0)
Categories
Find more on Simulink Coder 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!