- Check variable scope: Ensure that the local variables are properly scoped within the Stateflow chart and are being used in a way that requires code generation.
- Verify code generation settings: Review the code generation settings for the Stateflow chart to make sure that local data is included in the generated code.
- Use Data Objects: Consider using Stateflow Data Objects instead of local variables, as these are more likely to be represented in the generated code.
- Examine variable usage: Make sure the local variables are actually being used within the Stateflow chart. Unused variables may be optimized out during code generation.
- Update model and regenerate code: After making any changes, update the model and regenerate the code to see if the local variables now appear.

