Sequence Block - Wait_digital

I am trying to understand the wait_digital command in the sequence block:
I.e. I Want to Start a sequence when activating a Button/Valve… ==> Shouldn`t there be a setting argument as well? Meaning “When Button1 is activated” then “do Stuff” - then deactivate Button and wait for another push… right now the sequence is looping and activating Valve & Pump no matter what I do.

WAIT_DIGITAL target= Button ==>shouldn`t be here an argument?
SET_DIGITAL target=Valve, setting=STATE_ACTIVE
SET_DIGITAL target=Pump, setting=STATE_ACTIVE
SET_DIGITAL target=Button, setting=STATE_INACTIVE

hope I am not completely missusing the sequence block for stuff it is not supposed to do :slight_smile:
Thanks and best regards

The WAIT_DIGITAL command waits until achieved state matches desired state. The next release will include the new WAIT_DIGITAL_STATE instruction, which implements the behavior you’re looking for.

Thanks! now (i think) i understand it :smiley:

:D… best regards!