Browse Source

添加部分五号机内容

oldwine 3 months ago
parent
commit
949819dcc1
2 changed files with 45 additions and 14 deletions
  1. 16 0
      conf/5#nodes.csv
  2. 29 14
      models/billet_trace_pusher.py

+ 16 - 0
conf/5#nodes.csv

@@ -64,3 +64,19 @@ L8
 车4手动触发信号,bool,313,46,1,1,TRUE,FALSE,500
 车4自动触发结果,string,313,2,0,22,TRUE,FALSE,500
 车4手动触发结果,string,313,24,0,22,TRUE,FALSE,500
+集群限位L1_1,boollist,105,22,0,1,TRUE,FALSE,500
+集群限位L1_2,boollist,105,23,0,1,TRUE,FALSE,500
+集群限位L2_1,boollist,105,24,0,1,TRUE,FALSE,500
+集群限位L2_2,boollist,105,25,0,1,TRUE,FALSE,500
+集群限位L3_1,boollist,105,26,0,1,TRUE,FALSE,500
+集群限位L3_2,boollist,105,27,0,1,TRUE,FALSE,500
+集群限位L4_1,boollist,105,28,0,1,TRUE,FALSE,500
+集群限位L4_2,boollist,105,29,0,1,TRUE,FALSE,500
+集群限位L5_1,boollist,105,30,0,1,TRUE,FALSE,500
+集群限位L5_2,boollist,105,31,0,1,TRUE,FALSE,500
+集群限位L6_1,boollist,105,32,0,1,TRUE,FALSE,500
+集群限位L6_2,boollist,105,33,0,1,TRUE,FALSE,500
+集群限位L7_1,boollist,105,34,0,1,TRUE,FALSE,500
+集群限位L7_2,boollist,105,35,0,1,TRUE,FALSE,500
+集群限位L8_1,boollist,105,36,0,1,TRUE,FALSE,500
+集群限位L8_2,boollist,105,37,0,1,TRUE,FALSE,500

+ 29 - 14
models/billet_trace_pusher.py

@@ -52,16 +52,28 @@ class Trace_pusher:
         for i in range(8):
             self.drawing_speed.append(self.data_s7.make_point(f'L{i+1}拉速'))
 
-        self.billet_position = [
-            self.data_s7.make_point('L1坯头位置'),
-            self.data_s7.make_point('L2坯头位置'),
-            self.data_s7.make_point('L3坯头位置'),
-            self.data_s7.make_point('L4坯头位置'),
-            self.data_s7.make_point('L5坯头位置'),
-            self.data_s7.make_point('L6坯头位置'),
-            self.data_s7.make_point('L7坯头位置'),
-            self.data_s7.make_point('L8坯头位置')
-        ]
+        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_1[3]')),
+                Through_state_continues3(data_s7.make_point('集群限位L8_1[1]'), data_s7.make_point('集群限位L8_1[2]'), data_s7.make_point('集群限位L8_1[3]'))
+            ]
+        else:
+            self.billet_position = [
+                self.data_s7.make_point('L1坯头位置'),
+                self.data_s7.make_point('L2坯头位置'),
+                self.data_s7.make_point('L3坯头位置'),
+                self.data_s7.make_point('L4坯头位置'),
+                self.data_s7.make_point('L5坯头位置'),
+                self.data_s7.make_point('L6坯头位置'),
+                self.data_s7.make_point('L7坯头位置'),
+                self.data_s7.make_point('L8坯头位置')
+            ]
 
         self.barrier = [
             self.data_s7.make_point('L1挡板'),
@@ -98,9 +110,12 @@ class Trace_pusher:
             # 坯子出现
             self.billet_position[i].allow_update(False)
             self.billet_position[i].set_state(False)
-            self.billet_position[i].set_convertor(lambda data: 12000 < data < 20000)
-            self.billet_position[i].set_excite_action(lambda i=i: self.billet_out_action(i))
-            self.billet_position[i].set_reset_action(lambda i=i: self.billet_in_buffer_action(i))
+            if not self.hostsend_flag:
+                self.billet_position[i].set_convertor(lambda data: 12000 < data < 20000)
+                self.billet_position[i].set_excite_action(lambda i=i: self.billet_out_action(i))
+                self.billet_position[i].set_reset_action(lambda i=i: self.billet_in_buffer_action(i))
+            else:
+                self.billet_position[i].set_excite_action(lambda i=i: self.billet_in_buffer_action(i))
             self.billet_position[i].allow_update()
             # 挡板抬起
             self.barrier[i].allow_update(False)
@@ -329,7 +344,7 @@ class Trace_pusher:
         self.sender.billet_upload(self.current_heatData, billetNo, self.total, i[2], i[3], i[4], i[5], '')
 
         self.logger.info(f"{self.current_heatNo}炉钢坯热送:{billetNo}")
-
+        self.sender.host_send(ccmNo, billetNo, "棒一")
 
     def clean_status(self):
         self.logger.debug(f"[TRACE]小冷床状态清空")