High Country Tek emc-3L User Manual
Page 60
Next, double click on the line and a Transition dialog box will appear. Enter “tmr0 = 0” in the “Transition to 2
when” text box. We will use bubble 2 to initialize the timer interval. After it executes we want to go
unconditionally to bubble 3 where the actual Clock code begins.
Now open Bubble 2, enter “Reset_Timer” for the description and enter the following statement in the Entry
Code:
Tmr0 = 1s
'Set timer to one second
Now, close bubble 2.
Now open Bubble 3, enter “Seconds” for the description and enter the following statement in the Entry Code:
' Test the Seconds count
' increment seconds, or reset seconds count
' and set toggle if 60 seconds has elapsed
if
(sec = 59)
then
sec = 0
toggle = 1
else
sec = sec + 1
end
if
Now, close bubble 3.
Now open Bubble 4, enter “Minutes” for the description and enter the following statement in the Entry Code:
' Reset toggle,
' Test the Minutes count
' increment minutes, or reset minutes count
' and set toggle if 60 minutes has elapsed
toggle = 0
if
(min = 59)
then
min = 0
toggle = 1
else
min = min + 1
end
if
Now, close bubble 4.
Now open Bubble 5, enter “Hours” for the description and enter the following statement in the Entry Code:
' Reset toggle,
' Test the Hours count
' increment hours, or reset hours count
' and set toggle if 24 hours has elapsed
toggle = 0
if
(hr = 23)
then
hr = 0
toggle = 1
else
hr = hr + 1
end
if
Now, close bubble 5.
Now open Bubble 6, enter “Days” for the description and enter the following statement in the Entry Code:
' Reset Toggle
' Increment Days
toggle = 0
P/N: 021-00163, Rev. A.0 - for V5.2 Tools
Page | 60