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 Ansichten (letzte 30 Tage)
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.

Akzeptierte Antwort

MathWorks Support Team
MathWorks Support Team am 22 Mai 2020
Bearbeitet: MathWorks Support Team am 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');

Weitere Antworten (0)

Kategorien

Mehr zu Programmatic Model Editing finden Sie in Help Center und File Exchange

Produkte


Version

R2011a

Community Treasure Hunt

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

Start Hunting!

Translated by