This bug has been fixed for Release 14 SP1 (R14SP1). For previous releases, please read below for any possible workarounds:
This has been verified as a bug in Real-Time Workshop in the way that it handles
code generation for a model with a 'while subsystem'.
You are likely to encounter this issue if the model satisfies the following conditions:
1. Iterator subsystem containing another atomic subsystem
2. An input to the atomic subsystem is also a canonical input to the iterator subsystem
3. The Atomic subsystem does not require output and update to be combined
4. At least one of the sources of the Atomic subsystem executes after the atomic subsystem
5. Atomic subsystem does not have direct feed through
Currently, to work around this issue, try adding a Gain block between the atomic subsystem and the input port of the iterator subsystem so it will no longer be a canonical input to the iterator system.
Best Answer