Model Referencing with an S-Function that contains SS_OPTION_ASYNCHRONOUS. Workaround?

3 ビュー (過去 30 日間)
Wilson
Wilson 2023 年 1 月 9 日
回答済み: Srija Kethiri 2023 年 4 月 19 日
Our simulink model contains a Level 2 S-Function "vxtask1" which reaches out to our RTOS code implementation to begin a background task that is triggered by a stateflow execution command. This is vital as it allows our normal navigation tasks to run while a background task is kicked off using that S-function. However, our model has gotten to a size where we are model referencing our codebase and this function is giving issues as in the S-Function inside ssSetOptions, SS_OPTION_ASYNCHRONOUS is set. Is there perhaps an updated way of handling this callout in 2022b? any other workarounds to get our code properly Model Referenced. Thanks.
Example of the error message.
Unable to generate model reference target. Block 'GuidanceAndControlSubsystem/Task Sync2/Subsystem/S-Function' in model GuidanceAndControlSubsystem has one of the following options: SS_OPTION_ASYNCHRONOUS, SS_OPTION_ASYNCHRONOUS_CUSTOM, SS_OPTION_ASYNCHRONOUS_INTERRUPT or SS_OPTION_FORCE_NONINLINED_FCNCALL. These options are not supported for model reference target.

回答 (1 件)

Srija Kethiri
Srija Kethiri 2023 年 4 月 19 日
Hi Wilson,
I understand that you have a model which contains a Level 2 S-Function. An dwhen you are trying to generate the model reference, getting an error.
A possible workaround to resolve the error is:
  1. Put the async block at the top level, outside the Model Reference block and have an input port in the referenced model that is set to 'Output function call' (a checkbox on the Signal Attributes page in the input port dialog).
  2. Connect the output function call of the async block to that function call input to the referenced model.
  3. Or Convert the model reference containing the block that causes the error to either a subsystem reference or an atomic subsystem
Hope this helps!

カテゴリ

Help Center および File ExchangePrepare Model Inputs and Outputs についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by