Generate ST code from a look-up table with CONSTANT attribute
显示 更早的评论
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.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Simulink PLC Coder 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!