承压产线
This commit is contained in:
797
main_cy.py
797
main_cy.py
@ -15,55 +15,96 @@ def on_send_connect(client, userdata, flags, rc, p):
|
|||||||
def on_receive_connect(client, userdata, flags, rc, p):
|
def on_receive_connect(client, userdata, flags, rc, p):
|
||||||
if rc == 'Success':
|
if rc == 'Success':
|
||||||
print("mqtt:接收客户端连接成功")
|
print("mqtt:接收客户端连接成功")
|
||||||
# 主线体-plc
|
# 总控-主控制柜、主线体-plc
|
||||||
client.subscribe('linuoruite/220202020240301008/XT/up/system')
|
client.subscribe('linuoruite/20250709/XT/up/system')
|
||||||
# 边框上料-机器人
|
# 打口踏平工站-专机
|
||||||
client.subscribe('linuoruite/220202020240301008/BKSLroboot/up/system')
|
client.subscribe('linuoruite/20250709/CY04/up/system')
|
||||||
# 边框上料-边框上料工站
|
# 上端盖安装工站-工站
|
||||||
client.subscribe('linuoruite/220202020240301008/BKSLstation/up/system')
|
client.subscribe('linuoruite/20250709/CY06Station/up/system')
|
||||||
# 边框上料-标签粘贴打印机
|
# 上端盖安装工站-上端盖安装机器人
|
||||||
client.subscribe('linuoruite/220202020240301008/BKSLprinter/up/system')
|
client.subscribe('linuoruite/20250709/CY06Robot/up/system')
|
||||||
# 板芯安装-板芯安装机器人
|
# 外桶转序工站-工站
|
||||||
client.subscribe('linuoruite/220202020240301008/BXAZroboot/up/system')
|
client.subscribe('linuoruite/20250709/CY07Station/up/system')
|
||||||
# 板芯安装-板芯红环检测,此板块不进行任何对接
|
# 外桶转序工站-放外桶机器人
|
||||||
# 板芯安装-撕膜机
|
client.subscribe('linuoruite/20250709/CY07Robot/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/BXAZsmj/up/system')
|
# 热泵水箱装配工站-工站
|
||||||
# 板芯安装-板芯安装工站
|
client.subscribe('linuoruite/20250709/CY08Station/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/BXAZstation/up/system')
|
# 热泵水箱装配工站-热泵装配机器人
|
||||||
# 护丝帽安装-护丝帽工站
|
client.subscribe('linuoruite/20250709/CY08Robot/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/MFQAZstation/up/system')
|
# 承压水箱装配工站-工站
|
||||||
# 护丝帽安装-护丝帽安装机器人
|
client.subscribe('linuoruite/20250709/CY09Station/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/MFQAZroboot/up/system')
|
# 承压水箱装配工站-取内胆机器人
|
||||||
# 卡子安装-卡子工站
|
client.subscribe('linuoruite/20250709/CY09ndRobot/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/KZAZstation/up/system')
|
# 承压水箱装配工站-装配内胆机器人
|
||||||
# 卡子安装-卡子安装机器人
|
client.subscribe('linuoruite/20250709/CY09zpRobot/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/KZAZroboot/up/system')
|
# 挂架安装靠块安装-自动打钉机器人
|
||||||
# 自动涂胶-涂胶机
|
client.subscribe('linuoruite/20250709/CY10nailRobot/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/TJtjj/up/system')
|
# 挂架安装靠块安装-靠块上料机器人
|
||||||
# 自动涂胶-自动涂胶机器人
|
client.subscribe('linuoruite/20250709/CY10rapidRobot/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/TJrobot/up/system')
|
# 挂架安装靠块安装-挂架上料机器人
|
||||||
# 玻璃安装-玻璃安装机器人
|
client.subscribe('linuoruite/20250709/CY10rackRobot/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/BLAZrobot/up/system')
|
# 挂架安装靠块安装-工站
|
||||||
# 玻璃安装-玻璃安装工站
|
client.subscribe('linuoruite/20250709/CY10Station/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/BLAZstation/up/system')
|
# 内胆泡沫装配工站-工站
|
||||||
# 压条安装-压条专机
|
client.subscribe('linuoruite/20250709/CY11Station/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/YTAZstation/up/system')
|
# 内胆泡沫装配工站-内胆泡沫装配机器人
|
||||||
# LOGO喷印工站-LOGO喷印机
|
client.subscribe('linuoruite/20250709/CY11Robot/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/PYTMstation/up/system')
|
# 下端盖安装工站-工站
|
||||||
# AI外观检测-相机
|
client.subscribe('linuoruite/20250709/CY13Station/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/WGJCstation/up/system')
|
# 下端盖安装工站-下端盖装配机器人
|
||||||
# 自动贴膜-自动贴膜工站
|
client.subscribe('linuoruite/20250709/CY13Robot/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/ZDTMstation/up/system')
|
# 发泡注料工站-工站
|
||||||
# 自动包装-包装机
|
client.subscribe('linuoruite/20250709/CY14Station/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/ZDBZpacking/up/system')
|
# 发泡注料工站-注胶机器人
|
||||||
# 自动包装-打包机
|
client.subscribe('linuoruite/20250709/CY14Robot/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/ZDBZbundler/up/system')
|
# 发泡注料工站-发泡机
|
||||||
# 码垛入库-机器人
|
client.subscribe('linuoruite/20250709/CY14FM/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/MDRKrobot/up/system')
|
# 注料口扣盖工站-工站
|
||||||
# 码垛入库-码垛入库工站
|
client.subscribe('linuoruite/20250709/CY15Station/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/MDRKstation/up/system')
|
# 注料口扣盖工站-扣盖机器人
|
||||||
# 码垛入库-打印机
|
client.subscribe('linuoruite/20250709/CY15Robot/up/system')
|
||||||
client.subscribe('linuoruite/220202020240301008/MDRKprinter/up/system')
|
# 水箱贴标工站-工站
|
||||||
|
client.subscribe('linuoruite/20250709/CY16Station/up/system')
|
||||||
|
# 水箱贴标工站-贴标机器人
|
||||||
|
client.subscribe('linuoruite/20250709/CY16Robot/up/system')
|
||||||
|
# 水箱贴标工站-铭牌打印机
|
||||||
|
client.subscribe('linuoruite/20250709/CY16plaquePrinter/up/system')
|
||||||
|
# 水箱贴标工站-能效打印机
|
||||||
|
client.subscribe('linuoruite/20250709/CY16efficientPrint/up/system')
|
||||||
|
# 维修盖安装-工站
|
||||||
|
client.subscribe('linuoruite/20250709/CY17Station/up/system')
|
||||||
|
# 维修盖安装-维修盖排列专机
|
||||||
|
client.subscribe('linuoruite/20250709/CY17special/up/system')
|
||||||
|
# 维修盖安装-维修盖标签打印机
|
||||||
|
client.subscribe('linuoruite/20250709/CY17print/up/system')
|
||||||
|
# 维修盖安装-维修盖装配机器人
|
||||||
|
client.subscribe('linuoruite/20250709/CY17robot/up/system')
|
||||||
|
# 安全性能检测-安检仪
|
||||||
|
client.subscribe('linuoruite/20250709/CY18Station/up/system')
|
||||||
|
# 外观视觉检测-工站
|
||||||
|
client.subscribe('linuoruite/20250709/CY19Station/up/system')
|
||||||
|
# 自动套袋工站-专机
|
||||||
|
client.subscribe('linuoruite/20250709/CY20Station/up/system')
|
||||||
|
# 自动套箱工站-工站
|
||||||
|
client.subscribe('linuoruite/20250709/CY21Station/up/system')
|
||||||
|
# 自动套箱工站-套箱机器人
|
||||||
|
client.subscribe('linuoruite/20250709/CY21robot/up/system')
|
||||||
|
# 预遮盖+泡沫装配工站-工站
|
||||||
|
client.subscribe('linuoruite/20250709/CY22Station/up/system')
|
||||||
|
# 预遮盖+泡沫装配工站-泡沫装配机器人
|
||||||
|
client.subscribe('linuoruite/20250709/CY22robot/up/system')
|
||||||
|
# 自动封箱工站-专机
|
||||||
|
client.subscribe('linuoruite/20250709/CY23Station/up/system')
|
||||||
|
# 包装箱贴标工站-工站
|
||||||
|
client.subscribe('linuoruite/20250709/CY24Station/up/system')
|
||||||
|
# 包装箱贴标工站-外包装打印机
|
||||||
|
client.subscribe('linuoruite/20250709/CY24print/up/system')
|
||||||
|
# 自动打包工站-专机
|
||||||
|
client.subscribe('linuoruite/20250709/CY25Station/up/system')
|
||||||
|
# 码垛入库工站-工站
|
||||||
|
client.subscribe('linuoruite/20250709/CY26Station/up/system')
|
||||||
|
# 码垛入库工站-套箱机器人
|
||||||
|
client.subscribe('linuoruite/20250709/CY26robot/up/system')
|
||||||
print("mqtt:接收客户端订阅成功")
|
print("mqtt:接收客户端订阅成功")
|
||||||
|
|
||||||
|
|
||||||
@ -90,308 +131,456 @@ def on_receive_message(client, userdata, msg):
|
|||||||
send_data = json.loads(data_str)
|
send_data = json.loads(data_str)
|
||||||
send_data['timeStamp'] = timestamp
|
send_data['timeStamp'] = timestamp
|
||||||
p_status = '3'
|
p_status = '3'
|
||||||
if topic == 'linuoruite/220202020240301008/XT/up/system':
|
if topic == 'linuoruite/20250709/XT/up/system':
|
||||||
if receive_data[0]['XT_breakdown'] == 1:
|
if receive_data[3]['XT_breakdown'] == 1:
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[1]['XT_pause'] == 1:
|
elif receive_data[2]['XT_pause'] == 1:
|
||||||
p_status = '5'
|
p_status = '5'
|
||||||
elif receive_data[2]['XT_run'] == 1:
|
elif receive_data[1]['XT_run'] == 1:
|
||||||
p_status = '3'
|
p_status = '3'
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
XT_upph = receive_data[3]['XT_upph']
|
XT_xiaohao = receive_data[0]['XT_xiaohao']
|
||||||
send_data['state']['reported']['XT_upph'] = XT_upph
|
|
||||||
XT_xiaohao = receive_data[4]['XT_xiaohao']
|
|
||||||
send_data['state']['reported']['XT_xiaohao'] = XT_xiaohao
|
send_data['state']['reported']['XT_xiaohao'] = XT_xiaohao
|
||||||
elif topic == 'linuoruite/220202020240301008/BKSLroboot/up/system':
|
XT_upph = receive_data[4]['XT_upph']
|
||||||
if receive_data[0]['BKSL_robot_breakdown'] == 1:
|
send_data['state']['reported']['XT_upph'] = XT_upph
|
||||||
p_status = '4'
|
XT_sl = receive_data[5]['XT_sl']
|
||||||
elif receive_data[1]['BKSL_robot_pause'] == 1:
|
send_data['state']['reported']['XT_sl'] = XT_sl
|
||||||
p_status = '5'
|
XT_xiaxian = receive_data[6]['XT_xiaxian']
|
||||||
elif receive_data[2]['BKSL_robot_run'] == 1:
|
send_data['state']['reported']['XT_xiaxian'] = XT_xiaxian
|
||||||
|
XT_buliang = receive_data[7]['XT_buliang']
|
||||||
|
send_data['state']['reported']['XT_buliang'] = XT_buliang
|
||||||
|
elif topic == 'linuoruite/20250709/CY04/up/system':
|
||||||
|
if receive_data[0]['CY04_run'] == 1:
|
||||||
p_status = '3'
|
p_status = '3'
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
elif receive_data[1]['CY04_pause'] == 1:
|
||||||
elif topic == 'linuoruite/220202020240301008/BKSLstation/up/system':
|
|
||||||
if receive_data[3]['BKSL_station_breakdown'] == 1:
|
|
||||||
p_status = '4'
|
|
||||||
elif receive_data[4]['BKSL_station_pause'] == 1:
|
|
||||||
p_status = '5'
|
p_status = '5'
|
||||||
elif receive_data[5]['BKSL_station_run'] == 1:
|
elif receive_data[2]['CY04_breakdown'] == 1:
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
|
||||||
BKSL_beat = receive_data[0]['BKSL_beat']
|
|
||||||
send_data['state']['reported']['BKSL_beat'] = BKSL_beat
|
|
||||||
BKSL_count = receive_data[1]['BKSL_count']
|
|
||||||
send_data['state']['reported']['BKSL_count'] = BKSL_count
|
|
||||||
BKSL_encoding = receive_data[2]['BKSL_encoding']
|
|
||||||
send_data['state']['reported']['BKSL_encoding'] = BKSL_encoding
|
|
||||||
elif topic == 'linuoruite/220202020240301008/BKSLprinter/up/system':
|
|
||||||
if receive_data[0]['BKSL_printer_breakdown'] == 1:
|
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[1]['BKSL_printer_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[3]['BKSL_printer_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
BKSL_printer_qlyj = receive_data[2]['BKSL_printer_qlyj']
|
CY04_beat = receive_data[3]['CY04_beat']
|
||||||
send_data['state']['reported']['BKSL_printer_qlyj'] = BKSL_printer_qlyj
|
send_data['state']['reported']['CY04_beat'] = CY04_beat
|
||||||
elif topic == 'linuoruite/220202020240301008/BXAZroboot/up/system':
|
elif topic == 'linuoruite/20250709/CY06Station/up/system':
|
||||||
if receive_data[1]['BXAZ_robot_breakdown'] == 1:
|
if receive_data[0]['CY06_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY06_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY06_breakdown'] == 1:
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[2]['BXAZ_robot_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[3]['BXAZ_robot_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
BXAZ_robot_beat = receive_data[0]['BXAZ_robot_beat']
|
CY06_beat = receive_data[3]['CY06_beat']
|
||||||
send_data['state']['reported']['BXAZ_robot_beat'] = BXAZ_robot_beat
|
send_data['state']['reported']['CY06_beat'] = CY06_beat
|
||||||
BXAZ_time = receive_data[4]['BXAZ_time']
|
elif topic == 'linuoruite/20250709/CY06Robot/up/system':
|
||||||
send_data['state']['reported']['BXAZ_time'] = BXAZ_time
|
if receive_data[0]['CY06_robot_run'] == 1:
|
||||||
elif topic == 'linuoruite/220202020240301008/BXAZsmj/up/system':
|
p_status = '3'
|
||||||
if receive_data[1]['BXAZ_smj_breakdown'] == 1:
|
elif receive_data[1]['CY06_robot_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY06_robot_breakdown'] == 1:
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[2]['BXAZ_smj_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[4]['BXAZ_smj_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
BXAZ_smj_beat = receive_data[0]['BXAZ_smj_beat']
|
elif topic == 'linuoruite/20250709/CY07Station/up/system':
|
||||||
send_data['state']['reported']['BXAZ_smj_beat'] = BXAZ_smj_beat
|
if receive_data[0]['CY07_run'] == 1:
|
||||||
BXAZ_smj_result = receive_data[3]['BXAZ_smj_result']
|
p_status = '3'
|
||||||
send_data['state']['reported']['BXAZ_smj_result'] = BXAZ_smj_result
|
elif receive_data[1]['CY07_pause'] == 1:
|
||||||
elif topic == 'linuoruite/220202020240301008/BXAZstation/up/system':
|
p_status = '5'
|
||||||
if receive_data[1]['BXAZ_station_breakdown'] == 1:
|
elif receive_data[2]['CY07_breakdown'] == 1:
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[2]['BXAZ_station_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[3]['BXAZ_station_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
BXAZ_beat = receive_data[0]['BXAZ_beat']
|
elif topic == 'linuoruite/20250709/CY07Robot/up/system':
|
||||||
send_data['state']['reported']['BXAZ_beat'] = BXAZ_beat
|
if receive_data[0]['CY07_robot_run'] == 1:
|
||||||
elif topic == 'linuoruite/220202020240301008/MFQAZstation/up/system':
|
p_status = '3'
|
||||||
if receive_data[1]['MFQAN_station_breakdown'] == 1:
|
elif receive_data[1]['CY07_robot_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY07_robot_breakdown'] == 1:
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[2]['MFQAN_station_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[3]['MFQAN_station_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
MFQAN_beat = receive_data[0]['MFQAN_beat']
|
CY07_beat = receive_data[3]['CY07_beat']
|
||||||
send_data['state']['reported']['MFQAN_beat'] = MFQAN_beat
|
send_data['state']['reported']['CY07_beat'] = CY07_beat
|
||||||
MFQAN_time = receive_data[4]['MFQAN_time']
|
elif topic == 'linuoruite/20250709/CY08Station/up/system':
|
||||||
send_data['state']['reported']['MFQAN_time'] = MFQAN_time
|
if receive_data[0]['CY08_run'] == 1:
|
||||||
elif topic == 'linuoruite/220202020240301008/MFQAZroboot/up/system':
|
p_status = '3'
|
||||||
if receive_data[0]['MFQAN_robot_breakdown'] == 1:
|
elif receive_data[1]['CY08_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY08_breakdown'] == 1:
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[1]['MFQAN_robot_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[2]['MFQAZ_robot_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
elif topic == 'linuoruite/220202020240301008/KZAZstation/up/system':
|
CY08_beat = receive_data[3]['CY08_beat']
|
||||||
if receive_data[1]['KZAZ_station_breakdown'] == 1:
|
send_data['state']['reported']['CY08_beat'] = CY08_beat
|
||||||
|
elif topic == 'linuoruite/20250709/CY08Robot/up/system':
|
||||||
|
if receive_data[0]['CY08_robot_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY08_robot_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY08_robot_breakdown'] == 1:
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[2]['KZAZ_station_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[3]['KZAZ_station_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
KZAZ_station_beat = receive_data[0]['KZAZ_station_beat']
|
elif topic == 'linuoruite/20250709/CY09Station/up/system':
|
||||||
send_data['state']['reported']['KZAZ_station_beat'] = KZAZ_station_beat
|
if receive_data[0]['CY09_run'] == 1:
|
||||||
KZAZ_station_time = receive_data[4]['KZAZ_station_time']
|
p_status = '3'
|
||||||
send_data['state']['reported']['KZAZ_station_time'] = KZAZ_station_time
|
elif receive_data[1]['CY09_pause'] == 1:
|
||||||
elif topic == 'linuoruite/220202020240301008/KZAZroboot/up/system':
|
p_status = '5'
|
||||||
if receive_data[0]['KZAZ_robot_breakdown'] == 1:
|
elif receive_data[2]['CY09_breakdown'] == 1:
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[1]['KZAZ_robot_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[2]['KZAZ_robot_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
elif topic == 'linuoruite/220202020240301008/TJtjj/up/system':
|
CY09_beat = receive_data[3]['CY09_beat']
|
||||||
if receive_data[1]['TJ_tjj_breakdown'] == 1:
|
send_data['state']['reported']['CY09_beat'] = CY09_beat
|
||||||
|
elif topic == 'linuoruite/20250709/CY09ndRobot/up/system':
|
||||||
|
if receive_data[0]['CY09_ndRobot_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY09_ndRobot_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY09_ndRobot_breakdown'] == 1:
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[3]['TJ_tjj_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[7]['TJ_tjj_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
TJ_tjj_beat = receive_data[0]['TJ_tjj_beat']
|
elif topic == 'linuoruite/20250709/CY09zpRobot/up/system':
|
||||||
send_data['state']['reported']['TJ_tjj_beat'] = TJ_tjj_beat
|
if receive_data[0]['CY09_zpRobot_run'] == 1:
|
||||||
TJ_tjj_glue = receive_data[2]['TJ_tjj_glue']
|
p_status = '3'
|
||||||
send_data['state']['reported']['TJ_tjj_glue'] = TJ_tjj_glue
|
elif receive_data[1]['CY09_zpRobot_pause'] == 1:
|
||||||
TJ_tjj_product = receive_data[4]['TJ_tjj_product']
|
p_status = '5'
|
||||||
send_data['state']['reported']['TJ_tjj_product'] = TJ_tjj_product
|
elif receive_data[2]['CY09_zpRobot_breakdown'] == 1:
|
||||||
TJ_tjj_refill = receive_data[5]['TJ_tjj_refill']
|
|
||||||
send_data['state']['reported']['TJ_tjj_refill'] = TJ_tjj_refill
|
|
||||||
TJ_tjj_remain = receive_data[6]['TJ_tjj_remain']
|
|
||||||
send_data['state']['reported']['TJ_tjj_remain'] = TJ_tjj_remain
|
|
||||||
TJ_tjj_stress = receive_data[8]['TJ_tjj_stress']
|
|
||||||
send_data['state']['reported']['TJ_tjj_stress'] = TJ_tjj_stress
|
|
||||||
elif topic == 'linuoruite/220202020240301008/TJrobot/up/system':
|
|
||||||
if receive_data[1]['TJ_robot_breakdown'] == 1:
|
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[2]['TJ_robot_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[3]['TJ_robot_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
TJ_beat = receive_data[0]['TJ_beat']
|
elif topic == 'linuoruite/20250709/CY10nailRobot/up/system':
|
||||||
send_data['state']['reported']['TJ_beat'] = TJ_beat
|
if receive_data[2]['CY10_nailRobot_run'] == 1:
|
||||||
TJ_time = receive_data[4]['TJ_time']
|
p_status = '3'
|
||||||
send_data['state']['reported']['TJ_time'] = TJ_time
|
elif receive_data[3]['CY10_nailRobot_pause'] == 1:
|
||||||
elif topic == 'linuoruite/220202020240301008/BLAZrobot/up/system':
|
p_status = '5'
|
||||||
if receive_data[0]['BLAZ_robot_breakdown'] == 1:
|
elif receive_data[4]['CY10_nailRobot_breakdown'] == 1:
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[1]['BLAZ_robot_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[2]['BLAZ_robot_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
elif topic == 'linuoruite/220202020240301008/BLAZstation/up/system':
|
CY10_nailRobot_angle = receive_data[0]['CY10_nailRobot_angle']
|
||||||
if receive_data[2]['BLAZ_station_breakdown'] == 1:
|
send_data['state']['reported']['CY10_nailRobot_angle'] = CY10_nailRobot_angle
|
||||||
|
CY10_nailRobot_torque = receive_data[1]['CY10_nailRobot_torque']
|
||||||
|
send_data['state']['reported']['CY10_nailRobot_torque'] = CY10_nailRobot_torque
|
||||||
|
elif topic == 'linuoruite/20250709/CY10rapidRobot/up/system':
|
||||||
|
if receive_data[0]['CY10_rapidRobot_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY10_rapidRobot_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY10_rapidRobot_breakdown'] == 1:
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[3]['BLAZ_station_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[4]['BLAZ_station_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
BLAZ_quantity = receive_data[0]['BLAZ_quantity']
|
elif topic == 'linuoruite/20250709/CY10rackRobot/up/system':
|
||||||
send_data['state']['reported']['BLAZ_quantity'] = BLAZ_quantity
|
if receive_data[0]['CY10_rackRobot_run'] == 1:
|
||||||
BLAZ_station_beat = receive_data[1]['BLAZ_station_beat']
|
p_status = '3'
|
||||||
send_data['state']['reported']['BLAZ_station_beat'] = BLAZ_station_beat
|
elif receive_data[1]['CY10_rackRobot_pause'] == 1:
|
||||||
BLAZ_time = receive_data[5]['BLAZ_time']
|
p_status = '5'
|
||||||
send_data['state']['reported']['BLAZ_time'] = BLAZ_time
|
elif receive_data[2]['CY10_rackRobot_breakdown'] == 1:
|
||||||
elif topic == 'linuoruite/220202020240301008/YTAZstation/up/system':
|
|
||||||
if receive_data[1]['YTAZ_breakdown'] == 1:
|
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[2]['YTAZ_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[4]['YTAZ_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
YTAZ_beat = receive_data[0]['YTAZ_beat']
|
elif topic == 'linuoruite/20250709/CY10Station/up/system':
|
||||||
send_data['state']['reported']['YTAZ_beat'] = YTAZ_beat
|
if receive_data[0]['CY10_run'] == 1:
|
||||||
YTAZ_quantity = receive_data[3]['YTAZ_quantity']
|
p_status = '3'
|
||||||
send_data['state']['reported']['YTAZ_quantity'] = YTAZ_quantity
|
elif receive_data[1]['CY10_pause'] == 1:
|
||||||
YTAZ_time = receive_data[5]['YTAZ_time']
|
p_status = '5'
|
||||||
send_data['state']['reported']['YTAZ_time'] = YTAZ_time
|
elif receive_data[2]['CY10_breakdown'] == 1:
|
||||||
YTAZ_yj = receive_data[6]['YTAZ_yj']
|
|
||||||
send_data['state']['reported']['YTAZ_yj'] = YTAZ_yj
|
|
||||||
elif topic == 'linuoruite/220202020240301008/PYTMstation/up/system':
|
|
||||||
if receive_data[0]['PYTM_inkjet_breakdown'] == 1:
|
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[2]['PYTM_inkjet_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[3]['PYTM_inkjet_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
PYTM_inkjet_qlyj = receive_data[1]['PYTM_inkjet_qlyj']
|
CY10_beat = receive_data[3]['CY10_beat']
|
||||||
send_data['state']['reported']['PYTM_inkjet_qlyj'] = PYTM_inkjet_qlyj
|
send_data['state']['reported']['CY10_beat'] = CY10_beat
|
||||||
PYTM_beat = receive_data[4]['PYTM_beat']
|
elif topic == 'linuoruite/20250709/CY11Station/up/system':
|
||||||
send_data['state']['reported']['PYTM_beat'] = PYTM_beat
|
if receive_data[0]['CY11_run'] == 1:
|
||||||
elif topic == 'linuoruite/220202020240301008/WGJCstation/up/system':
|
p_status = '3'
|
||||||
if receive_data[4]['WGJC_breakdown'] == 1:
|
elif receive_data[1]['CY11_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY11_berakdown'] == 1:
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[8]['WGJC_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[11]['WGJC_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
WGJC_beat = receive_data[0]['WGJC_beat']
|
CY11_beat = receive_data[3]['CY11_beat']
|
||||||
send_data['state']['reported']['WGJC_beat'] = WGJC_beat
|
send_data['state']['reported']['CY11_beat'] = CY11_beat
|
||||||
WGJC_bkhh = receive_data[1]['WGJC_bkhh']
|
elif topic == 'linuoruite/20250709/CY11Robot/up/system':
|
||||||
send_data['state']['reported']['WGJC_bkhh'] = WGJC_bkhh
|
if receive_data[0]['CY11_robot_run'] == 1:
|
||||||
WGJC_blhh = receive_data[2]['WGJC_blhh']
|
p_status = '3'
|
||||||
send_data['state']['reported']['WGJC_blhh'] = WGJC_blhh
|
elif receive_data[1]['CY11_robot_pause'] == 1:
|
||||||
WGJC_bq = receive_data[3]['WGJC_bq']
|
p_status = '5'
|
||||||
send_data['state']['reported']['WGJC_bq'] = WGJC_bq
|
elif receive_data[2]['CY11_robot_breakdown'] == 1:
|
||||||
WGJC_cpm = receive_data[5]['WGJC_cpm']
|
|
||||||
send_data['state']['reported']['WGJC_cpm'] = WGJC_cpm
|
|
||||||
WGJC_jcjg = receive_data[6]['WGJC_jcjg']
|
|
||||||
send_data['state']['reported']['WGJC_jcjg'] = WGJC_jcjg
|
|
||||||
WGJC_jcqx = receive_data[7]['WGJC_jcqx']
|
|
||||||
send_data['state']['reported']['WGJC_jcqx'] = WGJC_jcqx
|
|
||||||
WGJC_peijian = receive_data[9]['WGJC_peijian']
|
|
||||||
send_data['state']['reported']['WGJC_peijian'] = WGJC_peijian
|
|
||||||
WGJC_pycs = receive_data[10]['WGJC_pycs']
|
|
||||||
send_data['state']['reported']['WGJC_pycs'] = WGJC_pycs
|
|
||||||
WGJC_yj = receive_data[12]['WGJC_yj']
|
|
||||||
send_data['state']['reported']['WGJC_yj'] = WGJC_yj
|
|
||||||
WGJC_ytfx = receive_data[13]['WGJC_ytfx']
|
|
||||||
send_data['state']['reported']['WGJC_ytfx'] = WGJC_ytfx
|
|
||||||
elif topic == 'linuoruite/220202020240301008/ZDTMstation/up/system':
|
|
||||||
if receive_data[1]['ZDTM_breakdown'] == 1:
|
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[2]['ZDTM_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[3]['ZDTM_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
ZDTM_beat = receive_data[0]['ZDTM_beat']
|
elif topic == 'linuoruite/20250709/CY13Station/up/system':
|
||||||
send_data['state']['reported']['ZDTM_beat'] = ZDTM_beat
|
if receive_data[0]['CY13_run'] == 1:
|
||||||
elif topic == 'linuoruite/220202020240301008/ZDBZpacking/up/system':
|
p_status = '3'
|
||||||
if receive_data[1]['ZDBZ_packing_breakdown'] == 1:
|
elif receive_data[1]['CY13_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY06_breakdown'] == 1:
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[2]['ZDBZ_packing_pause'] == 1:
|
send_data['state']['CY13_breakdown']['pStatus'] = p_status
|
||||||
p_status = '5'
|
CY13_beat = receive_data[3]['CY13_beat']
|
||||||
elif receive_data[4]['ZDBZ_packing_run'] == 1:
|
send_data['state']['reported']['CY13_beat'] = CY13_beat
|
||||||
|
elif topic == 'linuoruite/20250709/CY13Robot/up/system':
|
||||||
|
if receive_data[0]['CY13_robot_run'] == 1:
|
||||||
p_status = '3'
|
p_status = '3'
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
elif receive_data[1]['CY13_robot_pause'] == 1:
|
||||||
ZDBZ_packing_beat = receive_data[0]['ZDBZ_packing_beat']
|
p_status = '5'
|
||||||
send_data['state']['reported']['ZDBZ_packing_beat'] = ZDBZ_packing_beat
|
elif receive_data[2]['CY13_robot_breakdown'] == 1:
|
||||||
ZDBZ_packing_qlyj = receive_data[3]['ZDBZ_packing_qlyj']
|
|
||||||
send_data['state']['reported']['ZDBZ_packing_qlyj'] = ZDBZ_packing_qlyj
|
|
||||||
elif topic == 'linuoruite/220202020240301008/ZDBZbundler/up/system':
|
|
||||||
if receive_data[1]['ZDBZ_bundler_breakdown'] == 1:
|
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[2]['ZDBZ_bundler_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[4]['ZDBZ_bundler_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
ZDBZ_bundler_beat = receive_data[0]['ZDBZ_bundler_beat']
|
elif topic == 'linuoruite/20250709/CY14Station/up/system':
|
||||||
send_data['state']['reported']['ZDBZ_bundler_beat'] = ZDBZ_bundler_beat
|
if receive_data[0]['CY14_run'] == 1:
|
||||||
ZDBZ_bundler_qlyj = receive_data[3]['ZDBZ_bundler_qlyj']
|
p_status = '3'
|
||||||
send_data['state']['reported']['ZDBZ_bundler_qlyj'] = ZDBZ_bundler_qlyj
|
elif receive_data[1]['CY14_pause'] == 1:
|
||||||
elif topic == 'linuoruite/220202020240301008/MDRKrobot/up/system':
|
p_status = '5'
|
||||||
if receive_data[0]['MDRK_robot_breakdown'] == 1:
|
elif receive_data[2]['CY14_breakdown'] == 1:
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[1]['MDRK_robot_puase'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[2]['MDRK_robot_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
elif topic == 'linuoruite/220202020240301008/MDRKstation/up/system':
|
CY14_beat = receive_data[3]['CY14_beat']
|
||||||
if receive_data[4]['MDRK_station_breatdown'] == 1:
|
send_data['state']['reported']['CY14_beat'] = CY14_beat
|
||||||
|
elif topic == 'linuoruite/20250709/CY14Robot/up/system':
|
||||||
|
if receive_data[0]['CY14_robot_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY14_robot_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY14_robot_breakdown'] == 1:
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[5]['MDRK_station_puase'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[6]['MDRK_station_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
MDRK_beat = receive_data[0]['MDRK_beat']
|
elif topic == 'linuoruite/20250709/CY14FM/up/system':
|
||||||
send_data['state']['reported']['MDRK_beat'] = MDRK_beat
|
if receive_data[0]['CY14_FM_run'] == 1:
|
||||||
MDRK_cpm = receive_data[1]['MDRK_cpm']
|
p_status = '3'
|
||||||
send_data['state']['reported']['MDRK_cpm'] = MDRK_cpm
|
elif receive_data[1]['CY14_FM_pause'] == 1:
|
||||||
MDRK_quantity = receive_data[2]['MDRK_quantity']
|
p_status = '5'
|
||||||
send_data['state']['reported']['MDRK_quantity'] = MDRK_quantity
|
elif receive_data[2]['CY14_FM_breakdown'] == 1:
|
||||||
MDRK_signal = receive_data[3]['MDRK_signal']
|
p_status = '4'
|
||||||
send_data['state']['reported']['MDRK_signal'] = MDRK_signal
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
MDRK_tpm = receive_data[7]['MDRK_tpm']
|
CY14_FM_beat = receive_data[3]['CY14_FM_beat']
|
||||||
send_data['state']['reported']['MDRK_tpm'] = MDRK_tpm
|
send_data['state']['reported']['CY14_FM_beat'] = CY14_FM_beat
|
||||||
elif topic == 'linuoruite/220202020240301008/MDRKprinter/up/system':
|
CY14_FM_MMQ = receive_data[4]['CY14_FM_MMQ']
|
||||||
if receive_data[1]['ZDBZ_printer_breakdown'] == 1:
|
send_data['state']['reported']['CY14_FM_MMQ'] = CY14_FM_MMQ
|
||||||
|
CY14_FM_IT = receive_data[5]['CY14_FM_IT']
|
||||||
|
send_data['state']['reported']['CY14_FM_IT'] = CY14_FM_IT
|
||||||
|
CY14_FM_MT = receive_data[6]['CY14_FM_MT']
|
||||||
|
send_data['state']['reported']['CY14_FM_MT'] = CY14_FM_MT
|
||||||
|
CY14_FM_HP = receive_data[7]['CY14_FM_HP']
|
||||||
|
send_data['state']['reported']['CY14_FM_HP'] = CY14_FM_HP
|
||||||
|
CY14_FM_LP = receive_data[8]['CY14_FM_LP']
|
||||||
|
send_data['state']['reported']['CY14_FM_LP'] = CY14_FM_LP
|
||||||
|
CY14_FM_FR = receive_data[9]['CY14_FM_FR']
|
||||||
|
send_data['state']['reported']['CY14_FM_FR'] = CY14_FM_FR
|
||||||
|
elif topic == 'linuoruite/20250709/CY15Station/up/system':
|
||||||
|
if receive_data[0]['CY15_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY15_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY15_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
CY15_beat = receive_data[3]['CY15_beat']
|
||||||
|
send_data['state']['reported']['CY15_beat'] = CY15_beat
|
||||||
|
elif topic == 'linuoruite/20250709/CY15Robot/up/system':
|
||||||
|
if receive_data[0]['CY15_robot_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY15_robot_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY15_robot_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
elif topic == 'linuoruite/20250709/CY16Station/up/system':
|
||||||
|
if receive_data[0]['CY16_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY16_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY16_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
CY16_beat = receive_data[3]['CY16_beat']
|
||||||
|
send_data['state']['reported']['CY16_beat'] = CY16_beat
|
||||||
|
elif topic == 'linuoruite/20250709/CY16Robot/up/system':
|
||||||
|
if receive_data[0]['CY16_robot_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY16_robot_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY16_robot_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
elif topic == 'linuoruite/20250709/CY16plaquePrinter/up/system':
|
||||||
|
if receive_data[0]['CY16_plaquePrinter_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY16_plaquePrinter_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY16_plaquePrinter_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
elif topic == 'linuoruite/20250709/CY16efficientPrint/up/system':
|
||||||
|
if receive_data[0]['CY16_efficientPrint_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY16_efficientPrint_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY16_efficientPrint_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
elif topic == 'linuoruite/20250709/CY17Station/up/system':
|
||||||
|
if receive_data[0]['CY17_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY17_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY17_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
CY17_beat = receive_data[3]['CY17_beat']
|
||||||
|
send_data['state']['reported']['CY17_beat'] = CY17_beat
|
||||||
|
elif topic == 'linuoruite/20250709/CY17special/up/system':
|
||||||
|
if receive_data[0]['CY17_special_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY17_special_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY17_special_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
elif topic == 'linuoruite/20250709/CY17print/up/system':
|
||||||
|
if receive_data[0]['CY17_print_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY17_print_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY17_print_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
elif topic == 'linuoruite/20250709/CY17robot/up/system':
|
||||||
|
if receive_data[2]['CY17_Robot_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[3]['CY17_Robot_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[4]['CY17_Robot_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
CY17_Robot_angle = receive_data[0]['CY17_Robot_angle']
|
||||||
|
send_data['state']['reported']['CY17_Robot_angle'] = CY17_Robot_angle
|
||||||
|
CY17_Robot_beat = receive_data[1]['CY17_Robot_beat']
|
||||||
|
send_data['state']['reported']['CY17_Robot_beat'] = CY17_Robot_beat
|
||||||
|
CY17_Robot_torque1 = receive_data[5]['CY17_Robot_torque1']
|
||||||
|
send_data['state']['reported']['CY17_Robot_torque1'] = CY17_Robot_torque1
|
||||||
|
CY17_Robot_torque2 = receive_data[6]['CY17_Robot_torque2']
|
||||||
|
send_data['state']['reported']['CY17_Robot_torque2'] = CY17_Robot_torque2
|
||||||
|
CY17_Robot_torque3 = receive_data[7]['CY17_Robot_torque3']
|
||||||
|
send_data['state']['reported']['CY17_Robot_torque3'] = CY17_Robot_torque3
|
||||||
|
elif topic == 'linuoruite/20250709/CY18Station/up/system':
|
||||||
|
if receive_data[0]['CY18_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY18_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY18_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
CY18_beat = receive_data[3]['CY18_beat']
|
||||||
|
send_data['state']['reported']['CY18_beat'] = CY18_beat
|
||||||
|
CY18_IR = receive_data[4]['CY18_IR']
|
||||||
|
send_data['state']['reported']['CY18_IR'] = CY18_IR
|
||||||
|
CY18_VW = receive_data[5]['CY18_VW']
|
||||||
|
send_data['state']['reported']['CY18_VW'] = CY18_VW
|
||||||
|
CY18_GR = receive_data[6]['CY18_GR']
|
||||||
|
send_data['state']['reported']['CY18_GR'] = CY18_GR
|
||||||
|
CY18_EHP = receive_data[7]['CY18_EHP']
|
||||||
|
send_data['state']['reported']['CY18_EHP'] = CY18_EHP
|
||||||
|
CY18_ncCount = receive_data[8]['CY18_ncCount']
|
||||||
|
send_data['state']['reported']['CY18_ncCount'] = CY18_ncCount
|
||||||
|
elif topic == 'linuoruite/20250709/CY19Station/up/system':
|
||||||
|
if receive_data[0]['CY19_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY19_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY19_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
CY19_beat = receive_data[3]['CY19_beat']
|
||||||
|
send_data['state']['reported']['CY19_beat'] = CY19_beat
|
||||||
|
elif topic == 'linuoruite/20250709/CY20Station/up/system':
|
||||||
|
if receive_data[0]['CY20_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY20_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY20_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
CY20_beat = receive_data[3]['CY20_beat']
|
||||||
|
send_data['state']['reported']['CY20_beat'] = CY20_beat
|
||||||
|
elif topic == 'linuoruite/20250709/CY21Station/up/system':
|
||||||
|
if receive_data[0]['CY21_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY21_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY21_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
CY21_beat = receive_data[3]['CY21_beat']
|
||||||
|
send_data['state']['reported']['CY21_beat'] = CY21_beat
|
||||||
|
elif topic == 'linuoruite/20250709/CY21robot/up/system':
|
||||||
|
if receive_data[0]['CY21_robot_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY21_robot_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY21_robot_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
elif topic == 'linuoruite/20250709/CY22Station/up/system':
|
||||||
|
if receive_data[0]['CY22_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY22_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY22_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
CY22_beat = receive_data[3]['CY22_beat']
|
||||||
|
send_data['state']['reported']['CY22_beat'] = CY22_beat
|
||||||
|
elif topic == 'linuoruite/20250709/CY22robot/up/system':
|
||||||
|
if receive_data[0]['CY22_robot_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY22_robot_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY22_robot_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
elif topic == 'linuoruite/20250709/CY23Station/up/system':
|
||||||
|
if receive_data[0]['CY23_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY23_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY23_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
CY23_beat = receive_data[3]['CY23_beat']
|
||||||
|
send_data['state']['reported']['CY23_beat'] = CY23_beat
|
||||||
|
elif topic == 'linuoruite/20250709/CY24Station/up/system':
|
||||||
|
if receive_data[0]['CY24_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY24_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY24_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
CY24_beat = receive_data[3]['CY24_beat']
|
||||||
|
send_data['state']['reported']['CY24_beat'] = CY24_beat
|
||||||
|
elif topic == 'linuoruite/20250709/CY24print/up/system':
|
||||||
|
if receive_data[0]['CY24_print_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY24_print_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY24_print_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
elif topic == 'linuoruite/20250709/CY25Station/up/system':
|
||||||
|
if receive_data[0]['CY25_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY25_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY25_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
CY25_beat = receive_data[3]['CY25_beat']
|
||||||
|
send_data['state']['reported']['CY25_beat'] = CY25_beat
|
||||||
|
elif topic == 'linuoruite/20250709/CY26Station/up/system':
|
||||||
|
if receive_data[0]['CY26_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY26_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY26_breakdown'] == 1:
|
||||||
|
p_status = '4'
|
||||||
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
|
CY26_beat = receive_data[3]['CY26_beat']
|
||||||
|
send_data['state']['reported']['CY26_beat'] = CY26_beat
|
||||||
|
elif topic == 'linuoruite/20250709/CY26robot/up/system':
|
||||||
|
if receive_data[0]['CY26_robot_run'] == 1:
|
||||||
|
p_status = '3'
|
||||||
|
elif receive_data[1]['CY26_robot_pause'] == 1:
|
||||||
|
p_status = '5'
|
||||||
|
elif receive_data[2]['CY26_robot_breakdown'] == 1:
|
||||||
p_status = '4'
|
p_status = '4'
|
||||||
elif receive_data[2]['ZDBZ_printer_pause'] == 1:
|
|
||||||
p_status = '5'
|
|
||||||
elif receive_data[4]['ZDBZ_printer_run'] == 1:
|
|
||||||
p_status = '3'
|
|
||||||
send_data['state']['reported']['pStatus'] = p_status
|
send_data['state']['reported']['pStatus'] = p_status
|
||||||
ZDBZ_printer_beat = receive_data[0]['ZDBZ_printer_beat']
|
|
||||||
send_data['state']['reported']['ZDBZ_printer_beat'] = ZDBZ_printer_beat
|
|
||||||
ZDBZ_printer_qlyj = receive_data[3]['ZDBZ_printer_qlyj']
|
|
||||||
send_data['state']['reported']['ZDBZ_printer_qlyj'] = ZDBZ_printer_qlyj
|
|
||||||
send_client.publish(topic=topic, payload=json.dumps(send_data))
|
send_client.publish(topic=topic, payload=json.dumps(send_data))
|
||||||
|
|
||||||
|
|
||||||
@ -401,7 +590,7 @@ def run_client_loop(client):
|
|||||||
|
|
||||||
# 获取mqtt的配置连接
|
# 获取mqtt的配置连接
|
||||||
current_dir = os.path.dirname(os.path.abspath(__file__))
|
current_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
config_path = os.path.join(current_dir, 'config_pb.ini')
|
config_path = os.path.join(current_dir, 'config_cy.ini')
|
||||||
config = ConfigParser()
|
config = ConfigParser()
|
||||||
config.read(config_path)
|
config.read(config_path)
|
||||||
|
|
||||||
@ -457,5 +646,5 @@ def start_loop():
|
|||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# pyinstaller main_pb.py --add-data config_pb.ini:.
|
# pyinstaller main_cy.py --add-data config_cy.ini:.
|
||||||
start_loop()
|
start_loop()
|
||||||
|
Reference in New Issue
Block a user