PIL sim with enabled subsystems

3 Ansichten (letzte 30 Tage)
Antonio Rizza
Antonio Rizza am 30 Jan. 2022
Beantwortet: Asim am 17 Nov. 2023
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.

Antworten (1)

Asim
Asim am 17 Nov. 2023
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

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by