For Simumink blocks with an internal state (such as as unit delay, discrete time integrator, etc …) the code generated for initialization differs depending on the numerical value of the initial conditions. If the initial condition is zero no initialization code is produced, while if it is not zero some initialization code is produced. Why ? This may cause troubles if the used C compiler does not force zero initialization. In such a case random initialized variables may occur.
MATLAB: Real Time Workshop – variables initialization
real time workshopsimulinksimulink codervariables initialization
Related Question
- Initial zero value of every variable in Simulink
- Does the Simulink Coder ignore the ‘remove zero initialization’ options, when the model for which code is generated contains a stateflow chart with Bus variables
- When using Variant Models is it possible to select a model at run time, instead of at compile
- Is code not generated for a subsystem which has an Infinite sample time in Real-Time Workshop 7.3 (R2009a)
Best Answer