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 views (last 30 days)
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.
More Answers (2)
Antonin on 1 Mar 2017
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.