Global variables in simulink - embedded coder
1 回表示 (過去 30 日間)
古いコメントを表示
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?
0 件のコメント
回答 (1 件)
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.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!