Multiple Condition Based Branching

From Planimate Knowledge Base
Jump to navigation Jump to search

Multiple Condition Based Branching

This mode enables you to construct a sequence of tests for the Switch to perform when an item looks through it.

Depending on the result, your Switch may choose from a range of outgoing paths, and/or block the items progress.

Multiple Conditions offers a choice of more than two outgoing paths, whereas the Single Condition option is limited to one or two outgoing path choices.


Should the chosen path be unavailable, the switch will block the item from moving through it.

Example Multi-Condition Setup

Imagine a Machine with three ways of processing items, based on the product number.

Each way requires a different path for the items to take.

Product numbers 1 and 2 have specific paths, and all other Product numbers use a third path.

The machine also needs to be available, before the items can proceed.

This behaviour requires multiple conditions to be set for the switch that is to direct the items.

You will need to have three paths leaving the switch.

This switch also needs to act as a gate, so you will need to select the Gating option “Switch can Block Items”, to avoid a run-time error.

Read more about Gating Options.


The conditions will be set up as follows:

Switch Multi Condition Dialog.jpg


The Conditions Explained

Condition #1
The machine needs to be checked for availability. If it is unavailable, the test result is True the the result value is Zero, which means that the switch will block the item from proceeding.
If an item is waiting, the machine may become available, and the Machine Available attribute value will change to ‘True’.
The first condition test is now False, and the second condition is then checked.
Condition #2
If the Product Number attribute value for the item is 1, this test will be True and the result value of 3 means that the third-lowest path number leaving the switch will be selected.
If this path is unavailable, then the switch will block the item’s progress until it becomes available again.
If the product number for the item is other than 1, then this test will be False, and the third condition is then checked.
Condition #3
If the Product Number attribute value for the item is 2, this test will be True and the result value of 2 means that the second-lowest path number leaving the switch will be selected.
If this path is unavailable, then the switch will block the item’s progress until it becomes available again.
If the product number for the item is other than 2, then this test will be False, and the next condition is then checked.
Condition #4
The Default result will apply when all prior condition tests are false.
In this case then the result value of 1 means that the lowest path number leaving the switch will be selected.
If this path is unavailable, then the switch will block the item’s progress until it becomes available again.


Report Button

The Report button displays a text report.

The report is provided to assist you to visually verify your logic as you are building your multiple conditions.

For the above example, the report shows:

Condition "Machine Unavailable" gives result 0 when:

p.Machine Available = l.False


Condition "Test A" gives result 2 when:

i.Product Number = 1


Condition "Test B" gives result 3 when:

i.Product Number = 2


Default:1 



Refer also to How to Set up and Edit Multiple Conditions.