MATLAB: Am I receiving an error regarding signal propagation when using an S-function in Simulink 6.0 (R14)

dimensioninitializationpropagations-functionsignalsimulinkwidth

I have a model with an S-function block. Every so often I get an error regarding signal propagation that mentions either signal width, complexity, datatype, etc. As far as I can tell everything is correct.

Best Answer

This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
We have verified that there is a bug in Simulink 6.0 (R14) in the way that it handles signal dimensions at model initialization. A signal propagation error involving width, complexity, or datatypes may occur involving a custom S-function when the user would not expect an error.
To work around this issue, when default port methods are called for S-functions, you can explicitly state what the S-function should return by including these methods in the custom S-function. Please refer to the following documentation for more information (particularly the Default Methods section):
S-Function Callback Methods (Writing S-Functions)
web([docroot,'/toolbox/simulink/sfg/callback_intro.html'])
(You can copy and paste the above command into the MATLAB command window to bring up the documentation.)