def isViolated(): mv201 = MV(2, 201) p2 = PLC(2) lit301 = LIT(3, 301) if lit301.isLow and p2.isNotOne: time.sleep(2) if mv201.isOff: return True return False
def isViolated(): ait402 = AIT(4, 402) p403 = Pump(4, 403) p404 = Pump(4, 404) p4 = PLC(4) if ait402.isLow and p4.state == 4 and any(p.isOn for p in [p403, p404]): return True return False
def isViolated(): p101 = Pump(1, 101) p102 = Pump(1, 102) lit301 = LIT(3, 301) p1 = PLC(1) if lit301.isLow and p1.isNotOne: time.sleep(12) if all(p.isOff for p in [p101, p102]): return True return False
def isViolated(): p401 = Pump(4, 401) p402 = Pump(4, 402) uv401 = UV(4, 401) p4 = PLC(4) if all(p.isOff for p in [p401, p402]) and p4.state == 4: time.sleep(3) if uv401.isOn: return True return False
def isViolated(): ait201 = AIT(2, 201) ait503 = AIT(5, 503) fit201 = FIT(2, 201) p201 = Pump(2, 201) p202 = Pump(2, 202) p2 = PLC(2) if ait201.isLow and not ait503.isHigh and p2.isNotOne and not fit201.isLow and all( p.isOff for p in [p201, p202]): return True return False
def isViolated(): ait203 = AIT(2, 203) mv201 = MV(2, 201) ait402 = AIT(4, 402) p2 = PLC(2) p205 = Pump(2, 205) p206 = Pump(2, 206) if ait203.isLow and mv201.isOn and not ait402.isHigh and p2.isNotOne: time.sleep(6) if all(p.isOff for p in [p205, p206]) and not mv201.isOff: return True return False
def isViolated(): lit401 = LIT(4, 401) lit301 = LIT(3, 301) p301 = Pump(3, 301) p302 = Pump(3, 302) p602 = Pump(6, 602) p3 = PLC(3) if lit401.isLow and p3.state == 7 and all([ p.isOff for p in [p301, p302, p602] ]) and p3.isNotOne and p3.state != 99 and not lit301.isLowLow: return True return False
def isViolated(): ait202 = AIT(2, 202) p203 = Pump(2, 203) p204 = Pump(2, 204) p2 = PLC(2) fit201 = FIT(2, 201) mv201 = MV(2, 201) if ait202.isHigh and p2.isNotOne and not fit201.isLow and mv201.isOn: time.sleep(6) if all(p.isOff for p in [p203, p204]) and not fit201.isLow and mv201.isOn: return True return False