🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

How can I define a trigger for a compound?

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

How can I define a trigger for a compound?

Find more posts tagged with

Sort by:
1 - 1 of 11

    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