Yup, always end your IFs before returning.
Robert
Yup, always end your IFs before returning.
Robert
Thanks for your help.
I am assuming you are talking about the cases below where this problem occurs?
I found this problem to occur once in the OACIS-Main code:
if fButtonHold = 1 then 'If a button is being held, return to prevent too quick button responses.
if MenuPage = 8 and fHoldEnable = 1 then 'Or if we are on page 8 force the Valve on holds
if RightButton = 0 then 'but only if the code was put in to enable forcing.
pEvapEEV = 1
pBuzzer = 1
elseif LeftButton = 0 then
pEvapEEV = 0
pBuzzer = 1
endif
'Update the display to reflect forced valve
hserout2[$FE, $47, 20, 2, dec1(pEvapEEV)]
endif
return
endif
And in three locations in the PCB6_3 Setup.txt:
if(AOValue > 1023) then AOValue = 1023 ; limit value
if(AOValue < 0) then AOValue = 0
if(AOCh > 7) then return ; limit value
if(AOCh < 0) then return
EEWRITE:
if(EEAddress > 131071) then EEAddress = 131071 ; limit value
....
return
EEREAD:
if(EEAddress > 131071) then EEAddress = 131071 ; limit value
....
return
I'll see what I can do to fix these and then get back to you guys with whether or not that fixed the problem.
Thanks again.
Does this work?
If you use this in multiple routines, then just suffix with a number so the labels are unique.Code:Routine: If bla bla then goto exitroutine Bla Bla Bla Endif Exitroutine: Return
Robert
Bookmarks