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 comentario

Haelee
Haelee el 24 de Jul. de 2026 a las 8:55
Editada: Haelee el 28 de Jul. de 2026 a las 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.

Iniciar sesión para comentar.

Respuestas (1)

Haelee
Haelee hace alrededor de 15 horas

0 votos

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.

Categorías

Más información sobre Simulink en Centro de ayuda y File Exchange.

Productos

Versión

R2024b

Preguntada:

el 23 de Jul. de 2026 a las 16:02

Respondida:

hace alrededor de 15 horas

Community Treasure Hunt

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

Start Hunting!