| | |
| | | using iWareCC.SrmService; |
| | | using iWareCC.StationService; |
| | | using iWareCC.ThreadService; |
| | | using iWareCC.ThreadService._03_BZ12_机器人码包工位_; |
| | | using iWareCC.ThreadService._04_BZ21_搬运整垛机器人_; |
| | | using iWareCC.WCF; |
| | | using iWareCommon.Common.Globle; |
| | | using iWareCommon.Utils; |
| | |
| | | /// 全局—是否可以运行执行出库模式 |
| | | /// </summary> |
| | | public static bool IsAllowRunOutMode = false; |
| | | |
| | | /// <summary> |
| | | /// 当前下发出库任务的包号 |
| | | /// </summary> |
| | | public static string currHandlerPackageCodeForIssueOutboundTask = ""; |
| | | |
| | | /// <summary> |
| | | /// 1号堆垛机入库口扫码强制验证通过 |
| | |
| | | |
| | | new Thread(DataProcess_RobotBuffer_FinishTaskForOutbound.Handler).Start(); |
| | | |
| | | |
| | | |
| | | new Thread(DataProcess_RobotBuffer_FinishTask.Handler).Start(); |
| | | |
| | | new Thread(DataProcess_BZ01.Handler).Start(); |
| | | |
| | | |
| | | |
| | | new Thread(DataProcess_269.Handler).Start(); |
| | | |
| | | |
| | | |
| | | new Thread(DataProcess_BZ39.Handler).Start(); |
| | | new Thread(DataProcess_BZ12.Hander).Start(); |
| | | new Thread(DataProcess_BZ12_FinishTask.Handler).Start(); |
| | | |
| | | |
| | | new Thread(DataProcess_BZ21.Hander).Start(); |
| | | new Thread(DataProcess_BZ21_FinishTask.Handler).Start(); |
| | | new Thread(DeleteData).Start(); |
| | | |
| | | //new Thread(LineInSacnResult.HandlerLineInSacnResult).Start(); |
| | | //new Thread(PrintHandler.Handler).Start(); |
| | | |
| | | |
| | | |
| | |
| | | |
| | | #endregion |
| | | |
| | | #region AGV |
| | | |
| | | |
| | | /// <summary> |
| | | /// 获取AGV车辆列表 |
| | | /// </summary> |
| | | public void GetAgvVehicles() |
| | | { |
| | | while (true) |
| | | { |
| | | try |
| | | { |
| | | if (SystemValue.isAllowRuning_DataProcess_RobotBuffer_AutoQiTaoOutbound && SystemValue.isStartedModel) |
| | | { |
| | | AGVRetModel list = AgvRequestHelper.GetVehicles(); |
| | | AgvHandler.SaveAgvData(list); |
| | | |
| | | List<String> warningAddressList = new List<string>(); |
| | | if (list.alarms != null && list.alarms.errors != null && list.alarms.errors.Count > 0) |
| | | { |
| | | var waringList = list.alarms.errors; |
| | | if (waringList != null && waringList.Count > 0) |
| | | { |
| | | for (int i = 0; i < waringList.Count; i++) |
| | | { |
| | | DeviceWarningHandler.SaveWarning(EDevice.AGV, iWareCommon.Utils.LogType.DataProcess_RobotBuffer_AutoQiTaoOutbound, |
| | | waringList[i].code, waringList[i].code, waringList[i].desc);//新增报警 |
| | | warningAddressList.Add(waringList[i].code); |
| | | } |
| | | } |
| | | } |
| | | DeviceWarningHandler.AutoCloseWarning(EDevice.AGV, iWareCommon.Utils.LogType.DataProcess_RobotBuffer_AutoQiTaoOutbound, warningAddressList);//自动关闭报警 |
| | | this.lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound.Text = "获取AGV车辆信息成功"; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | Log4NetHelper.WriteErrorLog(iWareCommon.Utils.LogType.CCWCFService, "获取AGV车辆列表 出现异常:" + ex.Message, ex); |
| | | this.lbl_Alert_DataProcess_RobotBuffer_AutoQiTaoOutbound.Text = "获取AGV车辆信息异常:" + ex.Message; |
| | | } |
| | | finally |
| | | { |
| | | Thread.Sleep(5000);//5秒一次 |
| | | } |
| | | } |
| | | } |
| | | #endregion |
| | | |
| | | #region 其他线程 |
| | | |
| | |
| | | |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_ModeChange, ck_DataProcess_RobotBuffer_ModeChange); |
| | | |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_ValidateQiTao, ck_DataProcess_ValidateQiTao); |
| | | |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_FinishTaskForOutbound, checkBox_DataProcess_RobotBuffer_FinishTaskForOutbound); |
| | | |
| | | |
| | |
| | | this.btn_Start.BackColor = default_btn_Start_Color;//还原颜色 |
| | | } |
| | | } |
| | | |
| | | this.lbl_RobotMode.Text = "缓存岛机器人模式:" + (IsAllowRunOutMode ? "出库模式" : "入库模式"); |
| | | this.lbl_currHandlerPackageCodeForIssueOutboundTask.Text = "当前下发出库任务的包号:" + currHandlerPackageCodeForIssueOutboundTask; |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | |
| | | } |
| | | |
| | | private void button24_Click(object sender, EventArgs e) |
| | | { |
| | | //强制该包号出库 |
| | | var packageCode = this.tb_PackageCode.Text.Trim(); |
| | | |
| | | var alertMsg = ""; |
| | | DataProcess_RobotBuffer_ForceOutbound.Handler(packageCode, ref alertMsg); |
| | | if (!string.IsNullOrEmpty(alertMsg)) |
| | | { |
| | | MessageBox.Show("错误:" + alertMsg); |
| | | } |
| | | else |
| | | { |
| | | MessageBox.Show("已处理"); |
| | | } |
| | | } |
| | | } |
| | | } |