Is it possible to configure whether an S-function supports multiple execution instances using the Legacy Code Tool in Simulink 7.6 (R2010b)?

2 visualizzazioni (ultimi 30 giorni)
In C-MEX S-functions, it is possible to include a call to the 'ssSupportsMultipleExecInstances' function. This function allows you to set a flag to true or false indicating whether or not that S-function supports multiple execution instances. This determines whether a 'For Each' Subsystem block will support that S-function operating inside the subsystem.
When the S-function source file is generated using the Legacy Code Tool, I need to manually go into the generated C file and add in the call to 'ssSupportsMultipleExecInstances'. I was wondering if there is a way for Legacy Code Tool to do this automatically.

Risposta accettata

MathWorks Support Team
MathWorks Support Team il 5 Apr 2012
This change has been incorporated into the documentation in Release 2012a (R2012a). For previous releases, read below for any additional information:
Documentation on this feature is missing from the Simulink 7.6 (R2010b) documentation for the legacy code tool.
Here is additional information on this feature:
To configure whether an S-function supports multiple execution instances using the Legacy Code Tool, call the tool using the following syntax:
>> def = legacy_code('initialize')
>> def.Options.supportsMultipleExecInstances=true
'supportsMultipleExecInstances ' is an additional field for the Options structure that is used to define options for the generated S-function.

Più risposte (0)

Categorie

Scopri di più su Simulink Coder in Help Center e File Exchange

Tag

Non è stata ancora inserito alcun tag.

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by