Hardware manual
Impact Reference Guide Branch
3-205 Datalogic Automation Inc.
to test the validity of your Basic code. The code is also compiled when you select a different tool. When you
click the Run button, the Basic program results appear in the properties pane.
In the example above, the variable "count" is incremented each time the tool runs, then reset to zero when it
reaches five. When you type the variable name "count," the Basic tool automatically creates an input with
that name. You can set the variable’s type in the Type drop-down.
TIP: If the variable’s name has a specific ending, the type is assigned automatically. Variables ending in
"real" are assigned type Real, "string" are assigned type String, and "int" are assigned type Integer. For
example, count_real is a Real, name_string is a String, and count_int is an Integer.
For more details about entering text in the Editor window, see “Typing in the Editor Window” on page 5-1).
Branch
In the Logic Drawer
The Branch tool evaluates a user-defined Basic-language expression and executes a task branch based on
whether that statement is true or false.
This tool has no standard inputs. A basic language expression is typed in the Basic expression field. As vari-
able names are entered, variables are created as inputs in the input list. The input values can be entered man-
ually or linked from other tools. The expression is evaluated and, based on the result, the Result output is set
True or False and that branch is taken. In this example, the basic language expression is
ImageID < 0
Variable names (e.g. count)
are automatically created as
inputs. Set the variable type
here.
Click in this window, then type
the desired Basic language
statements.