Jelajahi Sumber

五号机稳定版

oldwine 3 bulan lalu
induk
melakukan
f1e5d131ea
2 mengubah file dengan 38 tambahan dan 32 penghapusan
  1. 37 32
      models/billet_trace_pusher.py
  2. 1 0
      utils/statepoint.py

+ 37 - 32
models/billet_trace_pusher.py

@@ -54,24 +54,24 @@ class Trace_pusher:
 
         if self.hostsend_flag:
             self.billet_position = [
-                Through_state_continues3(data_s7.make_point('集群限位L1_1[1]'), data_s7.make_point('集群限位L1_1[2]'), data_s7.make_point('集群限位L1_1[3]')),
-                Through_state_continues3(data_s7.make_point('集群限位L2_1[1]'), data_s7.make_point('集群限位L2_1[2]'), data_s7.make_point('集群限位L2_1[3]')),
-                Through_state_continues3(data_s7.make_point('集群限位L3_1[1]'), data_s7.make_point('集群限位L3_1[2]'), data_s7.make_point('集群限位L3_1[3]')),
-                Through_state_continues3(data_s7.make_point('集群限位L4_1[1]'), data_s7.make_point('集群限位L4_1[2]'), data_s7.make_point('集群限位L4_1[3]')),
-                Through_state_continues3(data_s7.make_point('集群限位L5_1[1]'), data_s7.make_point('集群限位L5_1[2]'), data_s7.make_point('集群限位L5_1[3]')),
-                Through_state_continues3(data_s7.make_point('集群限位L6_1[1]'), data_s7.make_point('集群限位L6_1[2]'), data_s7.make_point('集群限位L6_1[3]')),
-                Through_state_continues3(data_s7.make_point('集群限位L7_1[1]'), data_s7.make_point('集群限位L7_1[2]'), data_s7.make_point('集群限位L7_2[1]')),
-                Through_state_continues3(data_s7.make_point('集群限位L8_1[1]'), data_s7.make_point('集群限位L8_1[2]'), data_s7.make_point('集群限位L8_1[3]'))
+                Through_state_continues3(data_s7.make_point('集群限位L1_1[3]'), data_s7.make_point('集群限位L1_1[4]'), data_s7.make_point('集群限位L1_1[5]')),
+                Through_state_continues3(data_s7.make_point('集群限位L2_1[3]'), data_s7.make_point('集群限位L2_1[4]'), data_s7.make_point('集群限位L2_1[5]')),
+                Through_state_continues3(data_s7.make_point('集群限位L3_1[3]'), data_s7.make_point('集群限位L3_1[4]'), data_s7.make_point('集群限位L3_1[5]')),
+                Through_state_continues3(data_s7.make_point('集群限位L4_1[3]'), data_s7.make_point('集群限位L4_1[4]'), data_s7.make_point('集群限位L4_1[5]')),
+                Through_state_continues3(data_s7.make_point('集群限位L5_1[3]'), data_s7.make_point('集群限位L5_1[4]'), data_s7.make_point('集群限位L5_1[5]')),
+                Through_state_continues3(data_s7.make_point('集群限位L6_1[3]'), data_s7.make_point('集群限位L6_1[4]'), data_s7.make_point('集群限位L6_1[5]')),
+                Through_state_separation2(data_s7.make_point('集群限位L7_1[4]'), data_s7.make_point('集群限位L7_1[5]')),
+                Through_state_continues3(data_s7.make_point('集群限位L8_1[3]'), data_s7.make_point('集群限位L8_1[4]'), data_s7.make_point('集群限位L8_1[5]'))
             ]
             self.billet_out_sig = [
-                data_s7.make_point('集群限位L1_1[1]'),
-                data_s7.make_point('集群限位L2_1[1]'),
-                data_s7.make_point('集群限位L3_1[1]'),
-                data_s7.make_point('集群限位L4_1[1]'),
-                data_s7.make_point('集群限位L5_1[1]'),
-                data_s7.make_point('集群限位L6_1[1]'),
-                data_s7.make_point('集群限位L7_1[1]'),
-                data_s7.make_point('集群限位L8_1[1]')
+                data_s7.make_point('集群限位L1_2[1]'),
+                data_s7.make_point('集群限位L2_2[1]'),
+                data_s7.make_point('集群限位L3_2[1]'),
+                data_s7.make_point('集群限位L4_2[1]'),
+                data_s7.make_point('集群限位L5_2[1]'),
+                data_s7.make_point('集群限位L6_2[1]'),
+                data_s7.make_point('集群限位L7_2[1]'),
+                data_s7.make_point('集群限位L8_2[1]')
             ]
         else:
             self.billet_position = [
@@ -276,23 +276,28 @@ class Trace_pusher:
 
         if count == 0:
             dst[0].extend(billets)
-        elif count == 3 and (len(billets) >= 4 or len(dst[count-1]) >= 4):
+        # elif count == 3 and (len(billets) >= 4 or len(dst[count-1]) >= 4):
+        #     self.logger.error(f"组坯异常!")
+        #     flag = False
+        #     for j in dst:
+        #         if len(j) < 4:
+        #             flag = True
+        #             dst.remove(j)
+        #             break
+        #     if flag:
+        #         dst.append(billets)
+        #     else:
+        #         dst.remove(dst[0])
+        #         dst.append(billets)
+        #     count -= 1
+        # elif count == 3 and len(dst[count-1]) + len(billets) > 4:
+        #     self.logger.error(f"组坯异常!")
+        #     dst[count-1].extend(billets)
+        #     count -= 1
+        elif count == 3 and (len(billets) >= 4 or len(dst[count-1]) >= 4 or len(dst[count-1]) + len(billets) > 4):
             self.logger.error(f"组坯异常!")
-            flag = False
-            for j in dst:
-                if len(j) < 4:
-                    flag = True
-                    dst.remove(j)
-                    break
-            if flag:
-                dst.append(billets)
-            else:
-                dst.remove(dst[0])
-                dst.append(billets)
-            count -= 1
-        elif count == 3 and len(dst[count-1]) + len(billets) > 4:
-            self.logger.error(f"组坯异常!")
-            dst[count-1].extend(billets)
+            dst.remove(dst[0])
+            dst.append(billets)
             count -= 1
         elif len(billets) >= 4 or len(dst[count-1]) >= 4 or len(dst[count-1]) + len(billets) > 4:
             dst[count].extend(billets)

+ 1 - 0
utils/statepoint.py

@@ -162,6 +162,7 @@ class Through_state_separation2(Statepoint):
         self.point2.state = False
         #logger.debug('推钢机刚刚经过')
         super().reset()
+        self.point1.allow_update()
 
     def allow_update(self, enable: bool = True):
         if enable: