Simulink variable in Code Composer Studio stops incrementing
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I am trying to calculate the total battery consumption (in watt/hours) using simulink model. For this ,using 2 ADC modules, i first scale the adc values to get the correct voltage and current values. Then, i divide the power with 3600(watt/hours) * 20000(adc sample time) to find the power value for cycle. The data type is single. The problem is, when i generate ccs project and run it, the consumption value is type float, and when i constantly have 64V and 1A, about 5 minutes later, the total consumption stops at value 32.0 . A counter(type double) that i put in the code to watch the cycles per second also stops at about 16.770.000. How can i fix this? (F280025C)
0 comentarios
Respuestas (1)
Mark McBroom
el 10 de Feb. de 2024
It sounds like that section of your code is no longer running. You can use CCS to set a breakpoint to confirm this or you can add blocks to your simulink model that toggle an output/LED to make sure your code is still running.
0 comentarios
Ver también
Categorías
Más información sobre Deployment, Integration, and Supported Hardware en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!