[Hai-users] Pausing timer
Wijoyo Utomo
utomow at telkom.net
Wed Jan 16 05:06:35 CST 2008
Guys,
I try to write a program to solve that pausing timed output. The resolution
is 1 minute, means if the output is supposed to be ON for 5 minutes and it
has been ON for 1min 30 sec before it is paused, when the output is resumed,
it will be another 4 minutes ON.
Could you help me by checking the code for possibilities of errors please?
Here are the names:
Pause - Flag that indicates that a pause is in effect or not. Pause = ON
then the timed output is paused. Pause = OFF the timed output is resumed
Start_5_Min - Flag or button to start the whole cycle
1_Min_Timer - Flag that is ON for 1 minute
Pause_Event - Zone that triggers the pause. Pause_Event = NOT READY, the
output is paused. Pause_Event = SECURE, the output is resumed
Sprinkler - the output that is timed and can be paused
Here are the codes:
/* Start of cycle condition */
1. WHEN Start_5Min ON: SET 5_Min_Timer TO 5
2. WHEN Start_5Min ON: 1_Min_Timer ON FOR 1 MINUTE
3. WHEN Start_5Min ON &IF Pause OFF: Sprinkler ON
/* 1 Minute reloading */
4. WHEN 1_Min_Timer OFF &IF 5_Min_Timer ON &IF Pause OFF: DECREMENT
5_Min_Timer
5. WHEN 1_Min_Timer OFF &IF 5_Min_Timer ON &IF Pause OFF: 1_Min_Timer ON FOR
1 MINUTE
/* End of cycle condition */
6. WHEN 1_Min_Timer OFF &IF 5_Min_Timer OFF: Sprinkler OFF
/* Pause condition */
7. WHEN Pause_Event NOT READY &IF 5_Min_Timer ON: Pause ON
8. WHEN Pause ON &IF 5_Min_Timer ON: Sprinkler OFF
/* Resume condition */
9. WHEN Pause_Event SECURE &IF 5_Min_Timer ON: Pause OFF
10. WHEN Pause OFF &IF 5_Min_Timer ON: Sprinkler ON
11. WHEN Pause OFF &IF 5_Min_Timer ON: 1_Min_Timer ON FOR 1 MINUTE
To be honest, I have not tried these codes. I just want to have you guys
check it first before putting these codes into my OP.
I look forward any correction and comment you all might have and thank you
very much for taking your time.
Best Regards,
W. Utomo
-----Original Message-----
From: hai-users-bounces at tssi.com [mailto:hai-users-bounces at tssi.com] On
Behalf Of C.
Sent: Wednesday, January 16, 2008 5:11 AM
To: hai-users at tssi.com
Subject: [Hai-users] Pausing timer
You could stop the timer on an event and start over that timer when your
output toggle back.
You cannot pause and resume a timer.
I've tried something similar and I have never been able to do anything else
than that.
Claude
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://romaine.tssi.com/pipermail/hai-users/attachments/20080116/74fd0a7d/attachment.htm
More information about the HAI-users
mailing list