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

채택된 답변

Chris Jablonski
Chris Jablonski 2017년 2월 28일
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.

추가 답변 (2개)

Antonin
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.

Antonin
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!

Translated by