MATLAB: Do I receive an error when I build a model with a Model Reference block that contains a fixed point signal entering a Stateflow diagram

blockblocksetbuildchart;codedatadatatypefixedfixed-pointgenerateinputmodelpointreal timereferencertwsimulinksimulink coderstateflowtypeworkshop

Why do I receive an error when I build a model with a Model Reference block that contains a fixed point signal entering a Stateflow diagram?
I have a main model which uses a Model Reference block. The referenced model contains an Inport with fixed-point settings and a Stateflow chart. When I try to generate code for the main model, I receive an error.
Error FxSubNG.c: 37 undeclared identifier `FxSubNG_U'
Error FxSubNG.c: 37 left operand of . has incompatible type `int' 2 errors, 0 warnings
gmake: *** [FxSubNG.obj] Error 0x1

Best Answer

This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
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 Real-Time Workshop 6.0 (R14) and later in the way that it handles fixed point data and Model Reference blocks.
Currently, to work around this issue, try inserting a gain block after the inport of the model which is referenced.