how to get model base sample time programmatically from a shared library generated by Embedded Coder?
6 views (last 30 days)
Show older comments
I use Embedded Coder to generate shared libraries from multiple Simulink models. Each of these shared libraries are dynamically loaded by a generic wrapper that extracts all model-specific information using the CAPI interface and some custome code to access information not provided by the CAPI. This wrapper will drive the model during simulations by: filling the inputs, calling the step function, extracting the outputs, saving/restoring DWork. As different models can have different sample time, the wrapper should know how much time represents a step of its managed model (i.e. the base model sample time), in order to coordinate with other wrappers running other models.
I know that throug the CAPI I can get the SampleTimeMap, but I can't know which one of all the sample times in that array of structures is the base model sample time. By the way I can't know the size of the array.
So my question is: Is there a way to know the base sample time of a model programmatically from the generated code?
Thank You
0 Comments
Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!