BH2114 Posted January 9, 2018 Share Posted January 9, 2018 I have an oil pump that takes 3 seconds to develop pressure. I need to mask the oil pressure = 0 for 5 seconds after the oil pump is powered on, then evaluate. I have this in a function, which works, except that the 5 second delay hangs the display. return=0 alarm normal return=1 Fires Alarm private a = main_lubepumpmon // 1 indicates that the pump is powered on. private b = main_Oil_press // 1 indicates that oil pressure is up. if(b==1) private c = 2 else private c = 0 endif private d = c+a delay(5) switch case (d==1) return 1 endcase switch case (d==3) return 0 endcase switch case (d==2) return 0 endcase switch case (d==0) return 0 endcase Obviously, I'm doing something wrong here. Link to comment Share on other sites More sharing options...
This topic is now archived and is closed to further replies.