I need to compile a simulink model containing S-Functions

3 ビュー (過去 30 日間)
Davide Cotterle
Davide Cotterle 2021 年 12 月 1 日
回答済み: Animesh 2024 年 4 月 16 日
I need to compile a model for a specific target that contain S-Function blocks where i don't have the source code to be able to reuse supplier models on a RT target

回答 (1 件)

Animesh
Animesh 2024 年 4 月 16 日
Compiling a model for a specific Real-Time (RT) target that includes S-Function blocks, without access to the source code, presents a unique challenge. S-Functions are a powerful feature of MATLAB/Simulink, allowing for custom simulations through code (C, C++, or MATLAB script) that interacts with the Simulink engine. However, the lack of source code for these S-Functions means you cannot modify them directly to ensure compatibility with your RT target.
Here are a few strategies you might try to address the issue:
  • Check Compatibility: First, verify if the binary S-Function is already compatible with your RT target as-is. Some compiled S-Functions are built to run on multiple platforms.
  • Use a Wrapper: If the S-Function is not directly compatible, consider writing a wrapper S-Function that calls the binary S-Function. This wrapper can manage any platform-specific adjustments required.
I hope this helps.
Regards,
Animesh

カテゴリ

Help Center および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

製品


リリース

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by