Running external mode as a background thread with grt.tlc target

4 次查看(过去 30 天)
Hi,
I was wondering whether it would be possible to activate the "run as a background thread" option for external mode with grt.tlc as target.
If this is not directly possible as a setting is there maybe a .tlc variable that can activate that option?
Thanks!

采纳的回答

R
R 2024-9-12
编辑:R 2024-9-12
The capability to run external mode simulations as a background thread is typically controlled through Simulink's model configuration parameters, rather than directly via TLC (Target Language Compiler) scripts. For GRT-based targets, you configure external mode settings under the "Code Generation -> Interface" section within the Simulink model's configuration parameters. In contrast, for ERT-based targets, these settings are found under "Hardware Implementation."
The option to execute simulations as a background thread often depends on the specific hardware support package and the hardware board used. For instance, this feature is available for platforms like ZedBoard devices and Raspberry Pi. However, it might not be accessible for other platforms such as TI or Arduino microcontrollers, even when using ERT targets. Currently, there is no programmatic equivalent or TLC variable that directly enables running external mode in a background thread. This capability is primarily set through Simulink's graphical interface only.
TLC files are mainly focused on the code generation process for Simulink models and do not directly handle simulation settings or execution modes, such as running external mode simulations in a background thread. The extent of modifications possible in TLC files is limited to settings like the transport layer and basic MEX-file options, such as verbosity. Furthermore, as outlined in the following MathWorks documentation, Simulink Coder does not utilize tasking primitives. This means it lacks built-in features for task scheduling, priority management, or thread management, which are essential for managing background threads.
Hence, enabling the option to run external mode in background threads is not achievable through TLC scripts.

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by