Why does having a comment with "%%" in a chart in Stateflow result in incorrect code generation using Real-Time Workshop?

2 views (last 30 days)
I have a Stateflow chart with the characters "%%" as a comment on a transition. When I generate code for this chart using Real-Time Workshop code generator, I do not receive any errors. But the generated code gives me incorrect results.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed for Release 14 (R14). For previous releases, please read below for any possible workarounds:
This has been verified as a bug in Stateflow in the way that Stateflow handles generation of TLC files for Real-Time Workshop.
Currently, to work around this issue, try to avoid the following type of usage of the "%%" characters:
/* user comment containing %%*/
{
strcpy(str,"a = %%");
}

More Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!