How can I use named RAM arrays in the Simulink 1-D Interpolation block?

2 ビュー (過去 30 日間)
Glen Tallarek
Glen Tallarek 2022 年 8 月 10 日
コメント済み: Glen Tallarek 2022 年 8 月 11 日
I am working on a automotive control project. I need to change our system control code so that a supplier can modify a calibration table via CAN messages using a rapid prototype system and then have the system use that data for some control functions. This means that the "table" will be in RAM instead of ROM as normal. I can get the "external" data into two RAM arrays (one array for the breakpoints and one array for the table data) but I can't figure out how to specify those RAM arrays in the 1-D Interpolation block. I tried using the names of the RAM arrays in the block fields but am getting an error message saying the variables are not defined when I try to simulate it. Do I need to "declare" the arrays in the model workspace? Currently, I am just "naming" the signal lines in the part of the code that takes the CAN signal value and stores it to the array elements -- that method normally creates our global RAM variables when we generate the autocode. Thanks!

採用された回答

Fangjun Jiang
Fangjun Jiang 2022 年 8 月 11 日
  1 件のコメント
Glen Tallarek
Glen Tallarek 2022 年 8 月 11 日
Thank you very much for your reply and suggestion. I will take a look at this and give it a try. It looks like it is exactly what I am looking for!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

製品


リリース

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by