Turning ON a Bit While Pressing a Switch

 

Press a switch to turn ON the specified boolean variable. Once you release your finger from the switch the variable turns OFF.

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

[BOOL]

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] [Bit]
[Operation] [Momentary ON]
[Destination] [Variable] [Name]: Var1