High Country Tek emc-3L User Manual

Page 61

Advertising
background image

day = day + 1
Now, close bubble 6.

Now we will add the rest of the transitions for the Display Clock Logic sequence. Add a transition from bubble 2
to 3. Open the transition and enter “always” in the “Transition
to 3 when” text box. Close the Transition.

Add a transition from bubble 3 to 4. Open the transition and
enter “toggle = 1” in the “Transition to 4 when” text box. Close
the Transition.

Add a transition from bubble 3 to 1. Open the transition and
enter “toggle = 0” in the “Transition to 1 when” text box. Close
the Transition.

Copy and paste the transition from 3 to 1 to bubbles 4 to 1, 5 to
1 and 6 to 1 as follows; Right Click on the transition and select
“Copy Transition”. Right Click on bubble 4 and select “Paste
Transition” then click on bubble 1. Repeat for the remaining
two bubbles.

Copy and paste the “Toggle = 1” transition from bubbles 3 to 4
and paste to bubbles 4 to 5 and 5 to 6.

Copy and paste the “always” transition from bubbles 2 to 3 and
paste to bubbles 6 to 1.

Arrange the bubbles on the Logic Sequence screen so that the
transitions and bubbles are easy to follow, see example.

Note: as an example, below is the equivalent of the above Logic Sequence written as a nested if statement.


if

(tmr0 = 0)

then

' Test for 1 second timeout

if

(sec = 59)

then

' Test Second Counter

if

(min = 59)

then

' Test Minuet Counter

if

(hr = 23)

then

' Test Hour Counter

hr = 0

' Reset Hour Counter

day = day + 1

' Increment Day Counter

else

hr = hr + 1

' Increment Hour Counter

end

if

min = 0

' Reset Minuit Counter

else

min = min + 1

' Increment Minuet Counter

end

if

sec = 0

' Reset Second counter

else

sec = sec + 1

' Increment Second Counter

end

if

tmr0 = 1S

' Set Timer for 1 Second

end

if


Display Clock Logic Sequence, Bubbles

and Transitions

P/N: 021-00163, Rev. A.0 - for V5.2 Tools

Page | 61

Advertising
This manual is related to the following products: