| | |
| | | public static bool IsAllowRunOutMode = false; |
| | | |
| | | /// <summary> |
| | | /// 当前下发出库任务的包号 |
| | | /// </summary> |
| | | public static string currHandlerPackageCodeForIssueOutboundTask = ""; |
| | | |
| | | /// <summary> |
| | | /// 1号堆垛机入库口扫码强制验证通过 |
| | | /// </summary> |
| | | public static bool Srm1_IN_SMQZYZTG = false; |
| | |
| | | // rgvService.StartService(); |
| | | |
| | | |
| | | //处理【下发中】的出库计划任务 |
| | | // new Thread(OutPlanTaskDecompose.HandlerIssuingTask).Start(); |
| | | |
| | | //任务分解线程-出库 |
| | | // new Thread(MainTaskDecompose.HandlerMainTaskDecompose).Start(); |
| | | new Thread(DataProcess_RobotBuffer_ModeChange.Handler).Start(); |
| | | |
| | | //任务分解线程-组盘入库 |
| | | // new Thread(MainTaskDecompose_ZPRK.HandlerMainTaskDecompose_ZPRK).Start(); |
| | | new Thread(DataProcess_RobotBuffer_IssueOutboundTask.Handler).Start(); |
| | | |
| | | |
| | | new Thread(DataProcess_RobotBuffer_AutoQiTaoOutbound.Handler).Start(); |
| | | |
| | | 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(); |
| | | |
| | | //1014库位转运到1020线程 |
| | | |
| | | new Thread(DataProcess_BZ39.Handler).Start(); |
| | | |
| | | |
| | | new Thread(DeleteData).Start(); |
| | | |
| | | new Thread(LineInSacnResult.HandlerLineInSacnResult).Start(); |
| | | //new Thread(LineInSacnResult.HandlerLineInSacnResult).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_AutoQiTaoOutbound, ckDataProcess_RobotBuffer_AutoQiTaoOutbound); |
| | | |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_IssueOutboundTask, ckEmptySalverTransfer); |
| | | |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_BZ39, ck_DataProcess_BZ39); |
| | | |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_BZ01, ck_AutoIssueInStoreTask); |
| | | |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_269, ck_DataProcess_269); |
| | | |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_Place1014To1020Task, ck_DataProcess_RobotBuffer_IssueOutboundTask); |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_DataProcess_RobotBuffer_IssueOutboundTask, ck_DataProcess_RobotBuffer_IssueOutboundTask); |
| | | |
| | | DoCommonCheckedChanged(ref SystemValue.isAllowRuning_OutTaskRetryToMes, checkBox_OutTaskRetryToMes); |
| | | } |
| | |
| | | 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("已处理"); |
| | | } |
| | | } |
| | | } |
| | | } |