增加一键下发补偿值,优化显示bug

This commit is contained in:
mgw
2023-02-27 15:29:12 +08:00
parent dcdb3534dd
commit cbf51065b7
2 changed files with 7 additions and 2 deletions

View File

@@ -246,7 +246,6 @@ class WorkCenterBarcode(models.Model):
print(temp_dict)
temp = py2opcua.Py2opcua()
temp.write(temp_dict)
self.button_compensation_state = True
except Exception as e:
_logger.info("=====================================", e)
raise UserError('补偿值获取失败,或机床未连接,请检查')
@@ -271,6 +270,10 @@ class WorkCenterBarcode(models.Model):
# _logger.info("=====================================", e)
# raise UserError('程序删除失败,请重试')
# host="192.168.2.158", port=8080, username="MITSUBISHI", password="CNC"
try:
self.compensation()
except Exception:
raise UserError("补偿值写入执行超时,请检查机床状态或者写入状态")
sequence_collect = []
host = self.workcenter_id.machine_tool_id.ftp_host
port = self.workcenter_id.machine_tool_id.ftp_port