How can I define a trigger for a compound?

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Submitted by Joe on Thu, 11/13/2014 - 11:38 

How can I define a trigger for a compound?

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited June 2016

    Submitted by pete on Thu, 11/13/2014 - 11:50.

    Conditional Execution and Enabled Compounds

    You will often have blocks that you wish to run only under certain conditions. You can do this with enabled compounds. All the blocks contained in the compound will only run if the enable pin to the block has a 1 (or TRUE) value supplied. If the value supplied is 0 (or FALSE) then the compound does not run.
    To create an enabled compound:

    1. Put the blocks to execute conditionally inside a compound block.
    2. Ctrl+right click on the compound and select Enabled Execution

    enabledCompoundDlgOption.png

     

    The compound block will have a green ball as the enable pin. It looks like this:

    enabledCompound.png

     

    The enabled compound 'Safe Divide' will only execute when 'den' != 0