Value-Variable-Expression Tabs

Description

The Value, Variable, Expression tabs appear as pop-up dialog in opening commands. They are common components used in almost all commands.

 

Value tab description

The Value tab is used when you know the exact fixed value of a program. It restricts you to values appropriate for the given variable.

The Value Type drop-down tab in the Assignment command contains the type of variable you are creating and has one of the following values.

Example use of Value tab

Create a restrictive value appropriate for a given variable, which runs five times.

  1. In the left toolbar, tap the Program icon.

  2. Tap the add icon.

  3. Tap the Assignment node command. See Assignment.

  4. On the Variable field, tap Rename.

  5. Rename to numLoops.

  6. Tap Confirm.

  7. Set Value Type to Integer.

  8. Tap Set Expression and enter 5 in the Value tab.

  9. Tap Confirm.

Note: As your variable is integer, the value only allows you to enter whole numbers.

 

Variable tab description

The Variable tab allows you to pick from a list of variables defined in the program or application. Only variables of the appropriate type is shown. When you set the value of a digital output, only Boolean variable type is shown. When you set the value of an analog output, only Integer or Float variable type is shown.

 

Example use of Variable tab

 

The Variable drop-down field contains the name of the variable. By default, the variable is var.

  1. Got to steps 1-3 in the use of Value tab.

    The tab contains the list of variables already in the program, such as from another Assignment node or a Move To node, and other application nodes, grid iterators.

  2. Tap Rename to change the name of the created variable.

  3. To iterate and add options, repeat the process.

 

Expression tab description

The Expression tab enables you to insert an expression, which should be a valid URScript and evaluates to the correct type.

An expression in an If node evaluates to a Boolean. Whereas a String type requires enclosing quotes to be used. Furthermore, the Expression tab allows you to easily insert a variable into the expression.

 

Example use of Expression tab

Create a program loop counter.

  1. In the left toolbar, tap the Program icon.

  2. Tap the add icon.

  3. Tap the Assignment node command. See Assignment.

  4. Select Integer in the Value Type field.

  5. Tap the Set Expression field.

  6. Tap the pop-up Expression tab and set the expression to loop_counter +1.

  7. Tap Confirm.