- 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).
- Connect the output function call of the async block to that function call input to the referenced model.
- Or Convert the model reference containing the block that causes the error to either a subsystem reference or an atomic subsystem
Model Referencing with an S-Function that contains SS_OPTION_ASYNCHRONOUS. Workaround?
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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.
0 comentarios
Respuestas (1)
Srija Kethiri
el 19 de Abr. de 2023
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:
Hope this helps!
0 comentarios
Ver también
Categorías
Más información sobre Model References en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!