Error when generating code from model with S-Function Builder block

There is a model (2022b) containing custom code, implemented as S-Function Builder block. The block has one output of "bus" type. When i trying to generate code (system target file : ert.tlc, generate code only, toolchain: MSVS 2019), an error appears.
Cannot initialize the width of data type work vector 1 of 'Test_IO_22/S-Function Builder'. The data type work vector width is set to dynamically sized (-1). Initialize the data type work vector width in mdlInitializeSizes or mdlSetWorkWidths
The same example created in 2019b generates code without problems.

1 commentaire

I am encountering the same error in version 2023b. How did you resolve this error.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Simulink Coder dans Centre d'aide et File Exchange

Produits

Version

R2022b

Question posée :

le 7 Sep 2023

Commenté :

le 9 Fév 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by