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

조회 수: 4 (최근 30일)
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 CenterFile Exchange에서 Model References에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by