Adding a Condition Instruction

You can add a condition to a sequence to create alternative behaviors.


Before you begin: The Sequence Editor window is opened. A variable or an IO is already defined.
See Also
About the Sequencing Editor
Predefined Types and Functions
  1. To add a condition to a sequence, do one of the following:
    • Select Add a Condition in the toolbox and then click the blank page.
    • Drag Add a Condition to the blank page.


    • The condition instruction is added to the blank page.
    • The Condition dialog box appears.
  2. In the Condition box, enter a Boolean expression. For example, test the value of an existing IO or variable.


    Note: The Goto label must be filled only if the instruction is a target of a Goto instruction.
  3. Click the check mark.


    The condition is created. Now, you can insert instructions to the then and else branches.

  4. To add an instruction to the branch, you have to drag-and-drop a new instruction over a branch.
    1. Select a variable in the Usable window.



    2. Drag it over the then branch.
      Two marks appear at each end of the branch.

    3. Release the mouse.
      The Assignment dialog box appears.
    4. Click the check mark to close the dialog box.

      This new instruction is executed if the condition is true.