Function calls defined as a bus for inport in Export-Function Model

3 次查看(过去 30 天)
I am using the Export-Function Model configuration in my model, since it is triggered externally using function-call signals. I see that it's possible to define separate function-call Inports for each sample rate. However, I would like to have a single top-level Inport that receives multiple function-call triggers grouped as a bus.
My intention is to make the model standalone, which means I need to define bus objects for any Inports that use bus signals. But is it even possible to define a bus object that includes function-call elements?
Also, please correct me if I'm misunderstanding any part of this setup.

回答(1 个)

Ruchika Parag
Ruchika Parag 2025-6-30
Hi @staines, unfortunately, you can't include function-call signals in a bus. Simulink.Bus objects are designed for grouping data signals, and function-call triggers are treated as event signals, which are fundamentally different and not supported within bus definitions.
If you're using the Export-Function Model configuration and want to consolidate multiple function-call triggers, the recommended approach is to use the Function Element Call blocks. These allow you to define multiple named function-call triggers in your model without needing to bus them.
Here's what you can do:
  • Use separate Function Element Call blocks for each function-call subsystem you want to trigger.
  • You can group multiple calls under a single port name if needed, and each one will correspond to a different function-call subsystem.
  • This setup integrates cleanly into export-function models and maintains compatibility with external function-call scheduling.
This gives you a clean interface for external triggering, avoids the unsupported use of buses with events, and keeps your model modular and standalone.

类别

Help CenterFile Exchange 中查找有关 Schedule Model Components 的更多信息

产品


版本

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by