timer

mirzao

Active member
Joined
Nov 10, 2005
Messages
44
Location
Malaysia
Programming Experience
Beginner
Hi everyone,

I would like to use the timer to capture the time while the temperature is in out of band condition but I don't know how to write the code. Let's say it will loop 10 times, but the out of band condition only occurs in loop 3 to 5, I want it to give the duration for how long it occurs. How can I do that? Thank in advance

If actualTemp(1) = 25.0 Then ' setting temp
'if temperature out of band
If actualTemp(1) < (setTemp(1) - 5) Or actualTemp(1) > (setTemp(1) + 5)Then
Timer.Start()
alarmCounter += 1
myTimer.Enabled =​
True
End If
Else
'if temperature out of band
If actualTemp(1) < (setTemp(1) - 3) Or actualTemp(1) > (setTemp(1) + 3) Then
End If
End If
 
Back
Top