Try this for the one above:
	Code:
	 
IF ErrCnt > 1 or FlagResult > 0 THEN GOSUB Houston
 -------------------------------------------------
And try this for the one above:
	Code:
	IF OhmCheck = FAILED or FlagResult > 0 then GOSUB Houston
 And try this separately:
	Code:
	IF OhmCheck = FAILED THEN
    ErrCnt = ErrCnt + 1     
    IF ErrCnt = 1 then 'first time gets a pass for a recheck
        Device = DISPLAY
        GOSUB SetCtrl
        LCDOUT $FE,1,"Chk Dckbill conn"
        LCDOUT $FE,$C0,"then retry test"
        PAUSE 1000
    else
        gosub Houston 
    endif
    
ENDIF
IF FlagResult > 0 THEN GOSUB Houston
 Question: Do you set ErrCnt = 0 before the program starts running, or it gets some values from somewhere else?
In your code, it seems that it must be set to zero at initial power up before coming to "IF OhmCheck = FAILED THEN" condition.
Question: FlagResult is a hardware flag. So it can be 1 or 0 only, right? If yes, then why not use IF FlagResult = 1 instead of FlagResult <> 0 ?
FlagResult is a hardware flag, but it is a set of BIT flags so it can have a result other than 0 or 1.
Also, as Jerson said, we should see Houston subroutine.
May be there is something in it that makes things messed up.
--------------------------------
 
			
		
Bookmarks