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

2 ビュー (過去 30 日間)
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.

採用された回答

MathWorks Support Team
MathWorks Support Team 2012 年 4 月 5 日
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.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

タグ

タグが未入力です。

製品

Community Treasure Hunt

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

Start Hunting!

Translated by