Skip to content

Commit edd886a

Browse files
committed
Modifying PLC operation to check for very low water level
1 parent b2c47ab commit edd886a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

examples/swat-s1/plc1.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,6 @@ def main_loop(self):
6464
self.set(MV101, 0)
6565
self.send(MV101, 0, PLC1_ADDR)
6666

67-
elif lit101 <= LIT_101_M['L']:
68-
# OPEN mv101
69-
print "INFO PLC1 - lit101 under L -> open mv101."
70-
self.set(MV101, 1)
71-
self.send(MV101, 1, PLC1_ADDR)
72-
7367
elif lit101 <= LIT_101_M['LL']:
7468
print "WARNING PLC1 - lit101 under LL: %.2f <= %.2f." % (
7569
lit101, LIT_101_M['LL'])
@@ -79,6 +73,12 @@ def main_loop(self):
7973
self.set(P101, 0)
8074
self.send(P101, 0, PLC1_ADDR)
8175

76+
elif lit101 <= LIT_101_M['L']:
77+
# OPEN mv101
78+
print "INFO PLC1 - lit101 under L -> open mv101."
79+
self.set(MV101, 1)
80+
self.send(MV101, 1, PLC1_ADDR)
81+
8282
# TODO: use it when implement raw water tank
8383
# read from PLC2 (constant value)
8484
fit201 = float(self.recieve(FIT201_2, PLC2_ADDR))

0 commit comments

Comments
 (0)