Display a timer that counts down from 3 minutes down to 0.
Add the below variable(s).
| [Name] | [Data Type] | [Initial Value] |
Var1 |
[WORD] |
180 |
Var2 |
[BOOL] |
|
Add the below converter(s).
| [Name] | [Type] |
Converter1 |
[Range] |
| Tab | Property | Value | |
| [Basic] | [Data Type (Source)] | [Numeric] | |
| [Data Type (Result)] | [ColorCode] | ||
| [Range] | 4 | ||
| [Range1] | [Data (Input)] | 6 | |
| [Operator] | > | ||
| [Value] | ![]() |
||
| [Range2] | [Data (Input)] | 3 | |
| [Operator] | > | ||
| [Value] | ![]() |
||
| [Range3] | [Data (Input)] | 0 | |
| [Operator] | > | ||
| [Value] | ![]() |
||
| [Else Condition] | [Value] | ![]() |
|
Drag and drop the following objects from the [Tool Chest] to the screen.
| Tab | Sub Tab | Property | Value | |
| [Function] | [Basic] | [Current Value] | [Variable]
[Name]: Var1 |
|
| [Unit] | [Sec] | |||
| [Format] | nn:ss | |||
| [Shape] | [Basic] | [Fill] | [Type] | [Solid] |
| [Value] |
[Variable]
[Name]: Var1
[Converter] :
[User-Defined Converters] ➞ [Converter1] |
|||
| Tab | Sub Tab | Property | Value | |
[Function] |
[Basic] |
[Current Value] | [Variable]
[Name]: Var2 |
|
| [Touch] | [Operation] | [Type] | [Bit] | |
| [Operation] | [Toggle] | |||
| [Destination] | [Variable]
[Name]: Var2 |
|||
| [Shape] | [Text] | [Off] | [Text] | Count Down OFF |
| [On] | [Text] | Count Down ON | ||
Set the following script on the object.
From the [Tool Chest] drag and drop the script to the Script editor.

| Legend | Block |
1 |
[Triggers] ➞ [Periodic/Schedule] ➞ [Periodic] |
| 2 | [Logic] ➞ [If Do] |
3 |
[Logic] ➞ [Comparison Condition] |
4 |
[Values] ➞ [Variable] |
5 |
[Values] ➞ [Constant] |
6 |
[Operations] ➞ [Value Change] ➞ [Value Change] |