Variable table inputs in Simulink Coder

9 vues (au cours des 30 derniers jours)
Jose
Jose le 26 Oct 2011
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.

Réponse acceptée

Kaustubha Govind
Kaustubha Govind le 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).

Plus de réponses (0)

Catégories

En savoir plus sur Simulink Coder dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by