Why do I receive an error when I run SIL simulation of a model, which includes a Model block of a Stateflow chart with custom code in Simulink 7.8 (R2011b)?

6 vues (au cours des 30 derniers jours)
I have a Simulink model that contains a Model block. The referenced model has a Stateflow chart which calls a custom C function. When I run simulation in SIL mode, I receive the following error:
fatal error LNK1120: 1 unresolved externals
C:\MATLAB32\R2011B\BIN\MEX.PL: Error: Link of '..\..\..\mySfModelRef_customC_msf.mexw32' failed.

Réponse acceptée

MathWorks Support Team
MathWorks Support Team le 22 Mai 2020
Modifié(e) : MathWorks Support Team le 22 Mai 2020
The ability to simulate a model that contains Model blocks with custom code in SIL mode has been incorporated in R2010a. For this, you will need to enable the option 'SupportModelReferenceSimTargetCustomCode' for the referenced models by executing the following command on the MATLAB Command Window:
set_param(gcs, 'SupportModelReferenceSimTargetCustomCode', 'on');

Plus de réponses (0)

Catégories

En savoir plus sur Programmatic Model Editing dans Help Center et File Exchange

Produits


Version

R2011a

Community Treasure Hunt

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

Start Hunting!

Translated by