1. 获取类功能都添加 @property 装饰器
2. 修复 Modbus 安全区相关的功能 3. 重新调整了建联的逻辑
This commit is contained in:
@@ -1,13 +1,14 @@
|
||||
import time
|
||||
import openapi
|
||||
import json
|
||||
import clibs
|
||||
|
||||
|
||||
def initialization():
|
||||
hr = openapi.HmiRequest()
|
||||
pd = openapi.PreDos()
|
||||
# 推送配置文件
|
||||
robot_params = hr.get_robot_params()
|
||||
robot_params = hr.get_robot_params
|
||||
robot_type = robot_params["robot_type"]
|
||||
security_type = robot_params["security_type"]
|
||||
controller_type = robot_params["controller_type"]
|
||||
@@ -86,12 +87,13 @@ def initialization():
|
||||
hr.set_quickturn_pos(enable_drag=True)
|
||||
hr.move2quickturn("drag")
|
||||
while True:
|
||||
if md.w_robot_moving():
|
||||
if md.w_robot_is_moving:
|
||||
time.sleep(1)
|
||||
else:
|
||||
break
|
||||
hr.stop_move(1)
|
||||
hr.switch_motor_state("off")
|
||||
hr.close()
|
||||
|
||||
# 清除所有告警
|
||||
md.r_clear_alarm()
|
||||
|
||||
Reference in New Issue
Block a user