Files
AutoControlSystem-G/Constant.py

114 lines
4.4 KiB
Python
Raw Normal View History

2025-07-29 13:16:30 +08:00
import os
# 调试变量
Debug = False # 控制不加图像的Fphoto False是不加
2025-09-10 09:16:57 +08:00
Debug1 = False # 打印很多日志节点
2025-09-28 11:15:10 +08:00
DebugPosition = True # 调试位置,关闭机器人和传感器及判断
2025-07-29 13:16:30 +08:00
# Debug2 = False
feedStatus = True #feedStatus的状态打印
IO_EmergencyPoint = 2
max_log_len = 100
bag_height = 10 # 一袋的高度
position_accuracy_action = 0.1 #动作时的位置精度6 这个精度要高 必须到位置才做动作
position_accuracy_command = 500 #命令时的位置精度
manual_adjust_accuracy = 1
# speed = 10
# shake_speed = 20
# debug_speed=10
# return_speed = 10
feedLine_set_section = 'FeedLine'
2025-09-28 09:48:12 +08:00
dropLine_set_section = 'DropLine'
2025-07-29 13:16:30 +08:00
position_set_section = 'Position'
feedLine_set_file = f'.{os.sep}Config{os.sep}FeedLine.ini'
2025-09-28 09:48:12 +08:00
dropLine_set_file = f'.{os.sep}Config{os.sep}drop.ini'
2025-09-30 14:44:12 +08:00
dropLine_set_file_35 = f'.{os.sep}Config{os.sep}drop-35.ini'
2025-07-29 13:16:30 +08:00
MAX_Position_num = 40
2025-08-15 12:08:30 +08:00
MAX_Line_num = 10
2025-07-29 13:16:30 +08:00
set_ini = 'Seting.ini'
movie_moving = './Image/transport.gif'
mode_array = ["", "⼿动模式", "⾃动模式", "停⽌模式", "", "", "","⾃动运⾏中", "单步", "单循环"]
log_file_path = './log/log.log'
feed_sign_path = './Image/wait.png'
str_feed_tiaoshi = '调试状态'
str_feed_start = '投料开始'
str_feed_check = '检测是否安全投料'
str_feed_photo = '移动到拍照位置'
str_feed_take = 'str_feed_take移动到抓料位置'
str_feed_pause = '投料暂停'
str_feed_continue = '投料继续'
str_feed_stop = '投料停止'
str_feed_feed = '移动到投料位置'
str_feed_mid = '移动到中位位置'
str_feed_safe = '移动到安全位置'
str_feed_safe_middle = '移动到安全中位位置'
str_feed_takePhoto = '拍照'
str_feed_broken = '移动到破袋位置'
str_feed_broken_bag = '划袋'
2025-09-10 09:16:57 +08:00
str_feed_drop = '移动到扔袋位置'
str_feed_drop_mid = '移动到码垛中间点位置'
str_feed_drop_reset = '移动到码垛复位位置'
str_feed_broken = '移动到破袋位置'
2025-07-29 13:16:30 +08:00
str_feed_takePhoto_fail = '识别图像失败'
str_feed_takePhoto_success = '识别图像成功'
str_feed_takePhoto_new_line = '新的一排袋识别'
str_feed_takePhoto_line = '一排袋最高的识别'
str_feed_takePhoto_front_finish = '零星袋完成'
str_feed_takePhoto_front = '零星袋识别'
str_feed_takePhoto_move = '移动到抓料位置'
str_feed_covert_success = '转换坐标成功'
str_feed_covert_fail = '转换坐标失败'
str_feed_error = '未知错误'
str_feed_none = ''
str_feed_finish = '投料结束'
str_feed_take_success = '抓料成功'
str_feed_take_fail = '抓料失败'
2025-09-10 09:16:57 +08:00
str_feed_feed_num = '已码垛数量:'
2025-07-29 13:16:30 +08:00
str_feed_zip_bag = '移动到压缩袋位置'
str_feed_photo_error_msgbox = '请重新摆放料带后再关闭此窗口'
str_feed_photo_confirm = '确认摆好'
str_feed_io_control = '发送IO控制: '
str_feed_safe_error_msgbox = '未在安全位置,请先复位!'
str_feed_shake = '摇摆'
str_feed_start_error = '请先复位到原点'
str_feed_return_original_position_fail = '机械臂未按照实际路线点移动,未能寻找到适配路径点位'
str_feed_reset_no_line_error = '未定义的线段'
str_feed_angle_error = '角度差距过大,停止运行'
str_feed_reset_start = '开始复位'
str_feed_reverse = '复位成功'
str_sys_start = '进入系统'
str_sys_exit = '退出系统'
str_sys_switch_tool = '切换到工具坐标'
str_sys_start_tool = '切换到自动运行状态'
str_sys_clearAlarm = '清除报警'
str_sys_setSpeed = '设置速度'
str_sys_manualPosition = '手动移动'
2025-09-28 09:48:12 +08:00
str_sys_setFeedNum = '设置码垛开始包数'
2025-07-29 13:16:30 +08:00
str_sys_feedNum_sub = '减少投料次数'
str_sys_feedNum_add = '增加投料次数'
str_sys_log_feedNum ='记录袋数失败'
str_sys_emergencyStop = '按下急停'
str_sys_set_error = '保存设置失败'
str_sys_log_IO_error = 'IO更新失败'
str_sys_log_alarm_error = '发生报警:'
str_sys_log_move_error = '请填写全部坐标'
str_sys_set_position_error = '未选中行'
str_sys_command = '发送命令'
str_tcp_robot_connect_fail = '连接失败'
str_tcp_robot_connect_success = '连接成功'
str_tcp_robot_data_error = '数据解析错误'
str_tcp_connect_no_reply = '无回复'
str_tcp_connect_error = 'tcp连接错误'
str_tcp_reconnect = '重连中'
str_sys_json_error = 'json解析错误'
2025-09-30 14:44:12 +08:00
str_clamp_open_error = '夹爪打开失败'
str_clamp_close_error = '夹爪关闭失败'
2025-07-29 13:16:30 +08:00
str_sys_runing = '运行到这里了!'
str_sys_runing1 = '运行到这里2 '
str_sys_runing2 = '执行完成FPhoto'
str_sys_runing3 = '运行到这里3'