필터 지우기
필터 지우기

Global variables in simulink - embedded coder

조회 수: 1 (최근 30일)
richard
richard 2024년 4월 6일
답변: Fangjun Jiang 2024년 4월 6일
Using the C2000 blockset with an F28379D. I have a subsystem block that I call with an interrupt (an ADC block).
--> What I want to do is create a "counter" variable in the subsystem, where this counter increments itself by 1 every time the interrupt is called. This way, I can view this variable in Data Inspector to see how often the interrupt is called. Is there an example that shows how to do this?

답변 (1개)

Fangjun Jiang
Fangjun Jiang 2024년 4월 6일
I think you can try this block. Put it inside the Subsystem and specify the sample time as -1, which inherits the interrupt.

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

제품


릴리스

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by