필터 지우기
필터 지우기

Is it possible to use #define macros in stateflow?

조회 수: 4 (최근 30일)
Michael
Michael 2016년 6월 14일
답변: Mixajlo 2020년 2월 26일
Hello all,
I'm involved with converting old C code to Stateflow. In C, many #define macros are used. I'd like to use them also in stateflow. For example, in a c header file, i have the following macro:
#define ENABLE_IGBT output1=1;
Then I used this in a stateflow transaction:
{
ENABLE_IGBT
}
During Code Generation, Matlab puts out a warning: "Transition (#5076) has an action with no side effect." In C code, the stateflow transaction is missing. #defines in the same c header file like
#define TEST_VALUE 123
work without any problems in stateflow. I'm using R2014a. Where's the fault?
  댓글 수: 1
Sruthi Geetha
Sruthi Geetha 2016년 8월 2일
It would be helpful if you would provide the model on which you are working.

댓글을 달려면 로그인하십시오.

답변 (1개)

Mixajlo
Mixajlo 2020년 2월 26일
Does anybody have the answer for the question from Michael?

카테고리

Help CenterFile Exchange에서 Stateflow에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by