MATLAB: Does the Data Store Write block in the model seem to not update the destination memory when used with S-function Target in Real-Time Workshop

blockdatafailincorrects-functionsfunctionsimulink coderstoretargetupdatewritewrong

The Data Store Write block in my model seems to not update the destination memory when used with S-function Target in Real-Time Workshop.

Best Answer

This bug has been fixed in Release 14 Service Pack 3 (R14SP3). For previous product releases, read below for any possible workarounds:
This is a bug in Real-Time Workshop in the way that S-function Target handles code generation for the Data Store Write block.
To work around this issue, try increasing the 'Loop rolling threshold' in Simulation parameters / Real-Time Workshop / Code Generation Options to a number greater than the size of the Data Store Memory Block that is being written to.