Conditional Execution
There's currently two basic ways to do If/Else
style "Conditional Execution" in Pictorus.
The first is using the Switch Block, which allow you to pass different signals through the block based on a Condition (the first input to the block).
You can add many conditions to a Switch Block, and you can chain them together to form complex logic. Here's an example where we command a heater ON (100%) or OFF (0%) based on whether the simulated room temperature is below 60 degrees:
One drawback to the Switch Block approach is that is doesn't prevent the execution of any sequence of blocks. All possible outputs get computed, but only one gets passed through.
If you only want to execute a sequence of code if some condition is True, you need to use Conditionally Executed Components. To do this, simply create a Component, go to its settings, and set its Execution Method to Conditional. You can learn more about conditional execution and other execution methods in the Component Execution Methods doc.