<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>

<META content="MSHTML 6.00.6000.16587" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff 
size=2>Guys,</FONT></SPAN></DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff size=2>Could 
you help me by checking the code for possibilities of errors 
please?</FONT></SPAN></DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff size=2>Here 
are the names:</FONT></SPAN></DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff size=2>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</FONT></SPAN></DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff 
size=2>Start_5_Min - Flag or button to start the whole cycle</FONT></SPAN></DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff 
size=2>1_Min_Timer - Flag that is ON for 1 minute</FONT></SPAN></DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff 
size=2>Pause_Event - Zone that triggers the pause. Pause_Event = NOT READY, the 
output is paused. Pause_Event = SECURE, the output is 
resumed</FONT></SPAN></DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff 
size=2>Sprinkler - the output that is timed and can be 
paused</FONT></SPAN></DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff size=2>Here 
are the codes:</FONT></SPAN></DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff size=2>/* 
Start of cycle condition */</FONT></SPAN></DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff size=2>1. 
WHEN Start_5Min ON: SET 5_Min_Timer TO 5<BR>2. WHEN Start_5Min ON: 1_Min_Timer 
ON FOR 1 MINUTE<BR>3. WHEN Start_5Min ON &amp;IF Pause OFF: Sprinkler 
ON</FONT></SPAN></DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff size=2>/* 1 
Minute reloading */<BR>4. WHEN 1_Min_Timer OFF &amp;IF 5_Min_Timer ON &amp;IF 
Pause OFF: DECREMENT 5_Min_Timer<BR>5. WHEN 1_Min_Timer OFF &amp;IF 5_Min_Timer 
ON &amp;IF Pause OFF: 1_Min_Timer ON FOR 1 MINUTE</FONT></SPAN></DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff 
size=2></FONT>&nbsp;</DIV>
<DIV><SPAN class=378105410-16012008></SPAN><FONT face=Arial color=#0000ff 
size=2>/<SPAN class=378105410-16012008>* End of cycle condition */</SPAN><BR>6. 
WHEN 1_Min_Timer OFF &amp;IF 5_Min_Timer OFF: Sprinkler OFF</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV><FONT><SPAN class=378105410-16012008></SPAN><FONT face=Arial color=#0000ff 
size=2>/<SPAN class=378105410-16012008>* Pause condition */</SPAN><BR>7. WHEN 
Pause_Event NOT READY &amp;IF 5_Min_Timer ON: Pause ON</FONT></FONT></DIV>
<DIV><FONT><FONT><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN 
class=378105410-16012008>8</SPAN>. WHEN Pause ON &amp;IF 5_Min_Timer ON: 
Sprinkler OFF<BR></FONT></FONT></FONT></FONT></FONT></DIV>
<DIV><FONT><FONT><SPAN class=378105410-16012008></SPAN><FONT face=Arial 
color=#0000ff size=2>/<SPAN class=378105410-16012008>* Resume condition 
*/</SPAN><BR><SPAN class=378105410-16012008>9</SPAN>. WHEN Pause_Event SECURE 
&amp;IF 5_Min_Timer ON: Pause OFF<BR>10. WHEN Pause OFF &amp;IF 5_Min_Timer ON: 
Sprinkler ON<BR>11. WHEN Pause OFF &amp;IF 5_Min_Timer ON: 1_Min_Timer ON FOR 1 
MINUTE</FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>&nbsp;</DIV>
<DIV></SPAN><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff 
size=2>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.</FONT></SPAN></DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff size=2>I look 
forward any correction and comment you all might have and thank you very much 
for taking your time.</FONT></SPAN></DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN>&nbsp;</DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff size=2>Best 
Regards,</FONT></SPAN></DIV>
<DIV><SPAN class=378105410-16012008><FONT face=Arial color=#0000ff size=2>W. 
Utomo</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr 
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
  <DIV></DIV>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT 
  face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> 
  hai-users-bounces@tssi.com [mailto:hai-users-bounces@tssi.com] <B>On Behalf Of 
  </B>C.<BR><B>Sent:</B> Wednesday, January 16, 2008 5:11 AM<BR><B>To:</B> 
  hai-users@tssi.com<BR><B>Subject:</B> [Hai-users] Pausing 
  timer<BR><BR></FONT></DIV>
  <DIV><FONT face=Arial size=2>You could stop the timer on an event and start 
  over&nbsp;that timer&nbsp;when your output toggle back.</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>You cannot pause and resume a timer.</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>I've tried something similar and I have never 
  been able to do anything else than that.</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Claude</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV>&nbsp;</DIV></BLOCKQUOTE></BODY></HTML>