Increasing/Decreasing a Value

Every time the Switch is touched, a positive constant will be added or subtracted to the current value of the specified variable.

Example Operation

Setting Workflow

  1. Add Variables
  2. Set up Parts

Add Variables

Project Explorer : [Variables] ➞ [All Variables]

Add the below variable(s).

Variables property:

[Name] [Data Type]

Var1

[WORD]

Set up Parts

Project Explorer : [Screen Design] ➞ [Screens] ➞ [Screen1]

Drag and drop the following objects from the [Tool Chest] to the screen.

Switch object (Name: Switch1) properties:

Tab Sub Tab Property Value
[Function] [Touch] [Operation] [Type] [Word]
[Operation] [Add]
[Source] 1
[Destination] [Variable] [Name]: Var1

Switch object (Name: Switch2) properties:

Tab Sub Tab Property Value
[Function] [Touch] [Operation] [Type] [Word]
[Operation] [Subtract]
[Source] 1
[Destination] [Variable] [Name]: Var1