I figured it out. I realized that you also need to store each state variable into a Cla1DataRam storage class. Not sure if this is in the documentation, if it is I missed it.
C2000 Support Package - Can't get CLA code to inline parameters
2 ビュー (過去 30 日間)
古いコメントを表示
Hi - I am trying to use the CLA on a F2035 development board with DRV8321 and am having issues. Some background: 1) The CLA example model c28035pmsmfoc_cla.slx builds and runs perfect my hardware. 2) I have read all the documentation I can find. As a result, I made sure that "Inline" parameters option was checked at the highest level (and all levels underneath). 3) All inputs to CLA function block are of object class tic2000demospkg.Signal and CpuToCla1MsgRAM and the outputs are Cla1MsgToCpuRAM. 4) I did notice there are 2 instances of the object class tic2000demospkg.Signal in the pull down menu, not sure if this is related.
It seems that no matter what I do the .cla file generated will reference the Simulink global variables modelname_B and modelname_DWork.
Help is much appreciated. I need to figure this out quick I have wasted too much time on this.
Thanks
0 件のコメント
採用された回答
その他の回答 (2 件)
Antonin
2017 年 3 月 1 日
Hi Chris,
Sorry that you had to go through this pain. We are working on better integration of the CLA in Simulink, unfortunately Simulink hasn't been designed to handle all the special cases that the CLA introduces. In the meantime you have to pay attention to limitations. Declaring discrete state variables in a specific way is one of them. I'll make sure this is better documented in the future.
Thanks,
Antonin.
0 件のコメント
Antonin
2017 年 3 月 9 日
Hi Chris,
In the CLA Example, under "Using the CLA with an LED blinking example", the section "Discrete State Variables" explains that all discrete state variables have to be stored in the Cla1DataRam.
We'll make sure that this is easier to find in the future.
Thanks,
Antonin.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!