Variable table inputs in Simulink Coder
2 views (last 30 days)
Show older comments
Hello - we are generating code in Embedded Coder. Our application requires that we load X-Y-Z table data from existing variables from the legacy code we are integrating with our model-generated code. I can't seem to find where any of the Table Lookup blocks in Simulink allow the table data to be loaded dynamically (i.e. at runtime) from an external signal input. I expected that I could define a data object which would define the C array from which I would load the table data. Any help greatly appreciated.
0 Comments
Accepted Answer
Kaustubha Govind
on 26 Oct 2011
AFAIK, only the Lookup Table Dynamic allows you to provide data at runtime - I don't think such a block is available for 2-D data. However, what you can do is specify the table data parameters as Simulink.Parameter objects and specify their storage class as ImportedExtern, so that the actual definition is picked up from your legacy code. As far as I know, this can be done with tunable parameters, but you could try and see if the same idea works for your Lookup Table data (which I believe should be non-tunable).
0 Comments
More Answers (0)
See Also
Categories
Find more on Simulink Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!