Syntax error during MBD development with Stateflow

Hello,
I am currently working on MBD development using Stateflow and have a question.
A syntax error occurs while writing the during: section of a specific state, but I am having trouble identifying the exact cause. I would greatly appreciate your help.
Thank you.

댓글 수: 1

Haelee
Haelee 2026년 7월 24일 8:55
편집: Haelee 2026년 7월 28일 0:28
Hi, 현민.
Since the screenshot appears to use C syntax, could you confirm which Action Language is selected for the chart? The supported syntax differs between MATLAB and C Action Language:
You can check this by right-clicking a blank area of the chart, selecting Properties, and reviewing the Action Language setting.
As the documentation mentions, only MATLAB action language supports "if", "for", and "while" statements in state actions. You may utilize MATLAB action language or Pattern Wizard to implement conditional logics.

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

답변 (1개)

Haelee
Haelee 대략 11시간 전

0 개 추천

Hi, 현민.
Since the screenshot appears to use C syntax, could you confirm which Action Language is selected for the chart? The supported syntax differs between MATLAB and C Action Language:
You can check this by right-clicking a blank area of the chart, selecting Properties, and reviewing the Action Language setting.
As the documentation mentions, only MATLAB action language supports "if", "for", and "while" statements in state actions. You may utilize MATLAB action language or Pattern Wizard to implement conditional logics.

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

제품

릴리스

R2024b

질문:

2026년 7월 23일 16:02

답변:

대략 11시간 전

Community Treasure Hunt

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

Start Hunting!