Hello Bill
Here is a suggestion
When the level is high initiate a timer. Use the ONTIMER event to set the output and reset the timer. see new and modified code in italicized text
DISCLAIMER - I have not run this code
Create a new script for the timer event in this case “LvlAlm” is the new script
Add an ONTIMER event to the init section
ONTIMER 1, “goto LvlAlm”
Modify R1Test as shown below
Function R1Test
If Level@ > 80 Then
REM set timer 1 for 10 minute delay (600 seconds)
TSET 1,600
Endif
If Level@ < 80 Then
R1Test@ = (0)
*REM Clear the timer *
TSET 1, 0
Endif
Endfn
Function R1Test
If Level@ > 80 Then
REM set timer 1 for 10 minute delay (600 seconds)
TSET 1,600
Endif
If Level@ < 80 Then
*REM Clear the timer *
TSET 1, 0
R1Test@ = (0)
Endif
Endfn
This is the new function to set the output using the ONTIMER event
function LvlAlm
REM TIMER 1 has expired initiate alarm
R1Test@ = (1)
REM Clear the timer
TSET 1, 0
Endfn