Generate ST code from a look-up table with CONSTANT attribute
Afficher commentaires plus anciens
Hi,
I am using the 'Direct Lookup Table (n-D)' block in Simulink to load a matrix and extract the values given a row and a column number as inputs.
The Simulink setup is shown in the attached figure "lookup-table.png".
With this setup a PLC function block in structured text is generated from MATLAB/Simulink and everything is working as expected. However, the look-up table is defined within the function block as "VAR". I would like, if possible, to define it as "VAR_CONSTANT" instead. I have tried setting the in the lookup table attribute "StorageClass" type to "Const" but that has not worked.
Any idea/suggestion on how to store this table as "VAR_CONSTANT"?
Thanks in advance.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Simulink PLC Coder dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!