|
|
@@ -54,34 +54,21 @@ class Trace_pusher:
|
|
|
for i in range(8):
|
|
|
self.drawing_speed.append(self.data_s7.make_point(f'L{i+1}拉速'))
|
|
|
|
|
|
- # 5号机
|
|
|
- if self.hostsend_flag:
|
|
|
- # 拉速积分得到长度
|
|
|
- self.integration_total = [0] * 8
|
|
|
- self.integration_lock = threading.Lock()
|
|
|
- self.billet_out_sig = [self.data_s7.make_point(f"L{i+1}拉速", Integration_speed_mpmin) for i in range(8)]
|
|
|
- self.billet_position = [
|
|
|
- self.data_s7.make_point('L1切割信号[1]'),
|
|
|
- self.data_s7.make_point('L2切割信号[1]'),
|
|
|
- self.data_s7.make_point('L3切割信号[1]'),
|
|
|
- self.data_s7.make_point('L4切割信号[1]'),
|
|
|
- self.data_s7.make_point('L5切割信号[1]'),
|
|
|
- self.data_s7.make_point('L6切割信号[1]'),
|
|
|
- self.data_s7.make_point('L7切割信号[1]'),
|
|
|
- self.data_s7.make_point('L8切割信号[1]')
|
|
|
- ]
|
|
|
- # 6号机
|
|
|
- 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坯头位置')
|
|
|
- ]
|
|
|
+ # 5号机 + 6号机
|
|
|
+ # 拉速积分得到长度
|
|
|
+ self.integration_total = [0] * 8
|
|
|
+ self.integration_lock = threading.Lock()
|
|
|
+ self.billet_out_sig = [self.data_s7.make_point(f"L{i+1}拉速", Integration_speed_mpmin) for i in range(8)]
|
|
|
+ self.billet_position = [
|
|
|
+ self.data_s7.make_point('L1切割信号[1]'),
|
|
|
+ self.data_s7.make_point('L2切割信号[1]'),
|
|
|
+ self.data_s7.make_point('L3切割信号[1]'),
|
|
|
+ self.data_s7.make_point('L4切割信号[1]'),
|
|
|
+ self.data_s7.make_point('L5切割信号[1]'),
|
|
|
+ self.data_s7.make_point('L6切割信号[1]'),
|
|
|
+ self.data_s7.make_point('L7切割信号[1]'),
|
|
|
+ self.data_s7.make_point('L8切割信号[1]')
|
|
|
+ ]
|
|
|
|
|
|
self.barrier = [
|
|
|
self.data_s7.make_point('L1挡板'),
|
|
|
@@ -117,19 +104,12 @@ class Trace_pusher:
|
|
|
for i in range(8):
|
|
|
self.billet_position[i].allow_update(False)
|
|
|
self.billet_position[i].set_state(False)
|
|
|
- # 6号机
|
|
|
- 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))
|
|
|
- # 5号机
|
|
|
- else:
|
|
|
- # 拉速补充钢坯
|
|
|
- self.billet_out_sig[i].set_convertor(lambda data, i=i: round(data*1000) >= self.integration_total[i] + self.length_cutting[i].data)
|
|
|
- self.billet_out_sig[i].set_excite_action(lambda i=i: self.billet_out_action(i))
|
|
|
- # 正常情况进入跟踪
|
|
|
- self.billet_position[i].set_excite_action(lambda i=i: self.billet_in_buffer_action(i))
|
|
|
+ # 6号机 + 5号机
|
|
|
+ # 拉速补充钢坯
|
|
|
+ self.billet_out_sig[i].set_convertor(lambda data, i=i: round(data*1000) >= self.integration_total[i] + self.length_cutting[i].data)
|
|
|
+ self.billet_out_sig[i].set_excite_action(lambda i=i: self.billet_out_action(i))
|
|
|
+ # 正常情况进入跟踪
|
|
|
+ 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)
|