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
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Chris Jablonski
el 28 de Feb. de 2017
Comentada: Chris Jablonski
el 9 de Mzo. de 2017
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 comentarios
Respuesta aceptada
Más respuestas (2)
Antonin
el 1 de Mzo. de 2017
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 comentarios
Antonin
el 9 de Mzo. de 2017
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.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!