PIL sim with enabled subsystems

3 ビュー (過去 30 日間)
Antonio Rizza
Antonio Rizza 2022 年 1 月 30 日
回答済み: Asim 2023 年 11 月 17 日
Hello everyone,
I want to execute a PIL block that I generated for my Raspberry Pi on demand. For example when some event in the simulation happens.
I thought of doing this simply by placing the PIL block within an enabled subsystem.
However, when I do that I get the error:
  • The block's disable callback has been invoked. This is not allowed because the generated code under test does not support disable semantics. To avoid this error, remove the block from a conditional execution context, for example, an enabled subsystem.
Now, searching a bit on the web, it seems that this functionality is not supported for code generation. Does anyone has any idea on how to fix this?
Thanks in advance.

回答 (1 件)

Asim
Asim 2023 年 11 月 17 日
Hello Antonio,
I understand you're having trouble with executing a Processor-in-the-loop (PIL) block on demand within an enabled subsystem. Unfortunately, PIL blocks do not support disable semantics, hence they can't be placed in conditional execution contexts like enabled subsystems.
However, here are a couple of potential workarounds:
  1. 'If' Block: Use an 'if' block instead of an enabled subsystem to control the execution of your PIL block. The PIL block will always execute, but the results are only used when your specific condition is met.
  2. 'Trigger' Block: Use a 'Trigger' block to initiate the PIL block execution based on a specific event in your simulation.
Please refer to the below link for more details on PIL simulation with Raspberry Pi.
I hope these instructions help you.
Best Regards,
Asim Asrar

製品

Community Treasure Hunt

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

Start Hunting!

Translated by