Simulink variable in Code Composer Studio stops incrementing
조회 수: 1 (최근 30일)
이전 댓글 표시
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
답변 (1개)
Mark McBroom
2024년 2월 10일
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
참고 항목
카테고리
Help Center 및 File Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!