Branch
Overview
Like a branch on a tree, the Branch Node splits a single path into two diverging paths. Which branch of logic is executed depends on a single condition, which can itself be composed of multiple conditions. At a high level it basically means "If this is true, do this; if not, do this." which sounds relatively simplistic, however, branching is a foundational concept of creating interactive logic, similar to using if statements in programming, and when combined with Relational Expression, Pulse Flow and Logical Operator Nodes, we can build incredibly complex systems.
Uses
There are infinite uses for the Branch Node, however a very basic example would be a single Input condition, which triggers one of two functions. In the example below we use a Variable to represent whether the unit of measurement for distance is set to km/h or mph, and trigger functions to display data in the corresponding format.
These conditional statements can be chained together and combined with other Nodes. Below is an example where the Logic checks:
If the passenger seat is occupied. If it is (true) then...
It checks if the passenger seat belt is fastened. If it isn't (false) then...
It sounds an alarm.
Inputs
Input | Type | Description |
---|---|---|
Pulse Input (►) | Pulse | A standard Input Pulse, to trigger the execution of the Node. |
Outputs
Output | Type | Description |
---|---|---|
| Pulse | Triggers the execution of subsequent logic if Input condition is True. |
| Pulse | Triggers the execution of subsequent logic if Input condition is False. |
External Links
Condiitonal (computer programming on Wikipedia.
Last updated