Exemple #1
0
 private void ErrorReturnHandler(string source, string message, ErrorDialogResult result)
 {
     if (!owner.IsRunning)
     {
         return;
     }
     if (result == ErrorDialogResult.OK || result == ErrorDialogResult.Retry)
     {
         ClassZone上料传送 LoadinZone = ClassWorkZones.Instance.WorkZone上料传送;
         if (message != "")
         {
             Colibri.CommonModule.Forms.BaseForm.DoInvokeRequired(MainForm.instance, () => MessageBox.Show(MainForm.instance, $"无数据有电芯的错误处理:取出不符的多余电芯。{Environment.NewLine}" +
                                                                                                           $"有数据无电芯的错误处理:无需处理。点确定后数据将会被删除忽略掉。{Environment.NewLine}{Environment.NewLine}" +
                                                                                                           $"处理完成后点确定。"));
             LoadinZone.SetLoadin();
         }
         res = LoadinZone.CheckLoadin();
         if (res != null)
         {
             ClassErrorHandle.ShowError(source, res, ErrorReturnHandler);
             oldres = res;
         }
         else
         {
             ClassErrorHandle.CheckAlarmListStatus(source, oldres);
             timer.StartTimer(5000);
             DoneReturn("LoadinFinish");
             ClassCommonSetting.SMLogInfo(this.owner.Name, this.Name, "上料结束:" + (ClassWorkFlow.Instance.GetCell).ToString());
         }
     }
 }
Exemple #2
0
 private void ErrorReturnHandler(string source, string message, ErrorDialogResult result)
 {
     if (!owner.IsRunning)
     {
         return;
     }
     if (result == ErrorDialogResult.OK || result == ErrorDialogResult.Retry)
     {
         if (message != "")
         {
             ClassBaseWorkZone.HandleVacuumFailCell(source, ClassWorkZones.Instance.WorkZone上料机械手.LoadPNPDataStations.ToArray());
             for (int i = 0; i < ClassBaseWorkZone.CELLCOUNT; i++)
             {
                 ClassWorkZones.Instance.WorkZone上料传送.LoadInDataStations[i].TransferFrom(ClassWorkZones.Instance.WorkZone上料机械手.LoadPNPDataStations[i]);
             }
         }
         res = ClassWorkZones.Instance.WorkZone上料机械手.ActionLoadPNPStartPick(ClassWorkZones.Instance.DoLoadInPNPPick, ClassWorkZones.Instance.AfterLoadInPNPPick);
         if (res != null)
         {
             ClassErrorHandle.ShowError(source, res, ErrorReturnHandler);
             oldres = res;
         }
         else
         {
             ClassErrorHandle.CheckAlarmListStatus(source, oldres);
             DoneReturn("LoadPNPPickPartFinish");
             ClassWorkZones.Instance.WorkZone上料机械手.isPicking = false;
         }
     }
 }
Exemple #3
0
 private void ErrorReturnHandler(string source, string message, ErrorDialogResult result)
 {
     if (result == ErrorDialogResult.OK || result == ErrorDialogResult.Retry)
     {
         if (optionBoxResultNG.Checked)
         {
             res = new ErrorInfoWithPause("Test error.", ErrorLevel.Alarm, true, false, ErrorReturnHandler);
         }
         else
         {
             res = null;
         }
         if (res != null)
         {
             ClassErrorHandle.ShowError(source, res, ErrorReturnHandler);
             oldres = res;
         }
         else
         {
             ClassErrorHandle.CheckAlarmListStatus(source, oldres);
         }
         BaseForm.DoInvokeRequired(listBox1, () =>
         {
             listBox1.Items.Clear();
             foreach (ErrorInfoWithPause err in ClassErrorHandle.ErrorList)
             {
                 listBox1.Items.Add(err.ToString());
             }
         });
     }
 }
Exemple #4
0
 private void ErrorReturnHandler(string source, string message, ErrorDialogResult result)
 {
     if (!owner.IsRunning)
     {
         return;
     }
     if (result == ErrorDialogResult.OK || result == ErrorDialogResult.Retry)
     {
         ClassZone传送机械手 TransZone = ClassWorkZones.Instance.WorkZone传送机械手;
         ClassBaseWorkZone.HandleVacuumFailCell("传送机械手上料", TransZone.TransLoadDataStations.ToArray());
         ClassBaseWorkZone.HandleVacuumFailCell("传送机械手下料", TransZone.TransUnloadDataStations.ToArray());
         //ClassWorkZones.Instance.WorkZone尺寸测量.ActionToGetPart();
         res = TransZone.ActionStartUnload(ClassWorkZones.Instance.DoTransPNPUnload, ClassWorkZones.Instance.AfterTransPNPUnload);
         if (res != null)
         {
             ClassErrorHandle.ShowError(source, res, ErrorReturnHandler);
             oldres = res;
         }
         else
         {
             ClassErrorHandle.CheckAlarmListStatus(source, oldres);
             DoneReturn("TransPNPPlaceFinish");
         }
     }
 }
Exemple #5
0
 private void ErrorReturnHandler(string source, string message, ErrorDialogResult result)
 {
     if (!owner.IsRunning)
     {
         return;
     }
     if (result == ErrorDialogResult.OK || result == ErrorDialogResult.Retry)
     {
         res = LoadZone.CheckNGBoxAvaliable();
         if (res == null)
         {
             res = LoadZone.ActionMove(ClassZone上料机械手.EnumPointY.PlaceNG);
             if (res != null)
             {
                 ClassErrorHandle.ShowError(source, res);
                 return;
             }
             res = LoadZone.ActionLoadPNPStartPlaceNG(ClassWorkZones.Instance.AfterLoadInPNPPlaceNG);
             if (res != null)
             {
                 ClassErrorHandle.ShowError(source, res);
                 return;
             }
             ClassErrorHandle.CheckAlarmListStatus(source, oldres);
             DoneReturn("LoadPNPPlaceNGFinish");
         }
         else
         {
             ClassErrorHandle.ShowError(source, res, ErrorReturnHandler);
             oldres = res;
         }
     }
 }
Exemple #6
0
 private void ErrorReturnHandler(string source, string message, ErrorDialogResult result)
 {
     if (!owner.IsRunning)
     {
         return;
     }
     if (result == ErrorDialogResult.OK || result == ErrorDialogResult.Retry)
     {
         if (message != "")
         {
             ClassBaseWorkZone.HandleVacuumFailCell(source, sortingZone.SortNGDataStations.ToArray());
             for (int i = 0; i < ClassBaseWorkZone.CELLCOUNT; i++)
             {
                 if (ClassWorkZones.Instance.WorkZone下料传送.UnloadOutDataStations[i].CellData == null)
                 {
                     ClassWorkZones.Instance.WorkZone下料传送.UnloadOutDataStations[i].TransferFrom(sortingZone.SortNGDataStations[i]);
                 }
             }
         }
         res = sortingZone.ActionSortPNPStartPick(ClassWorkZones.Instance.DoSortPNPPick, ClassWorkZones.Instance.AfterSortPNPPick);
         if (res != null)
         {
             ClassErrorHandle.ShowError(source, res, ErrorReturnHandler);
             oldres = res;
         }
         else
         {
             ClassErrorHandle.CheckAlarmListStatus(source, oldres);
             DoneReturn("SortingPNPPickFinish");
         }
     }
 }
Exemple #7
0
 private void ErrorReturnHandler(string source, string message, ErrorDialogResult result)
 {
     if (!owner.IsRunning)
     {
         return;
     }
     if (result == ErrorDialogResult.OK || result == ErrorDialogResult.Retry)
     {
         res = ClassWorkZones.Instance.WorkZoneNG挑选机械手.UpdateRow();
         if (res == null)
         {
             ClassBaseWorkZone.HandleVacuumFailCell(source, sortingZone.SortNGDataStations.ToArray());
             res = sortingZone.ActionSortPNPStartPlaceNG(ClassWorkZones.Instance.AfterSortPNPPlace);
             if (res != null)
             {
                 ClassErrorHandle.ShowError(source, res, ErrorReturnHandler);
                 oldres = res;
             }
             else
             {
                 ClassErrorHandle.CheckAlarmListStatus(source, oldres);
                 DoneReturn("SortingPNPPlaceNGFinish");
             }
         }
         else
         {
             ClassErrorHandle.ShowError(source, res, ErrorReturnHandler);
             oldres = res;
         }
     }
 }
Exemple #8
0
 private void ErrorReturnHandler(string source, string message, ErrorDialogResult result)
 {
     if (!owner.IsRunning)
     {
         return;
     }
     if (result == ErrorDialogResult.OK || result == ErrorDialogResult.Retry)
     {
         bool           AllPick   = true;
         ClassZone传送机械手 TransZone = ClassWorkZones.Instance.WorkZone传送机械手;
         if (message != "")
         {
             ClassBaseWorkZone.HandleVacuumFailCell("传送机械手上料", TransZone.TransLoadDataStations.ToArray());
             ClassBaseWorkZone.HandleVacuumFailCell("传送机械手下料", TransZone.TransUnloadDataStations.ToArray());
             for (int i = 0; i < ClassBaseWorkZone.CELLCOUNT; i++)
             {
                 ClassWorkZones.Instance.WorkZone顶封边定位.TopAlignDataStations[i].TransferFrom(TransZone.TransLoadDataStations[i]);
                 ClassWorkZones.Instance.WorkZone厚度测量.ThicknessDataStations[i].TransferFrom(TransZone.TransUnloadDataStations[i]);
             }
         }
         res = TransZone.ActionStartLoad(out AllPick, ClassWorkZones.Instance.DoTransPNPLoad, ClassWorkZones.Instance.AfterTransPNPLoad);
         if (res == null)
         {
             if (!AllPick)
             {
                 res = new ErrorInfoWithPause("吸料后真空检测错误", ErrorLevel.Alarm, true);
                 ClassErrorHandle.ShowError(source, res, ErrorReturnHandler);
                 oldres = res;
             }
             else
             {
                 res = TransZone.ActionMove(ClassZone传送机械手.EnumPointPNPX.Unload);
                 if (res != null)
                 {
                     ClassErrorHandle.ShowError(source, res);
                 }
                 else
                 {
                     ClassErrorHandle.CheckAlarmListStatus(source, oldres);
                     DoneReturn("TransPNPPickFinish");
                 }
             }
         }
         else
         {
             ClassErrorHandle.ShowError(source, res, ErrorReturnHandler);
             oldres = res;
         }
     }
 }
Exemple #9
0
 private void ErrorReturnHandler(string source, string message, ErrorDialogResult result)
 {
     if (!owner.IsRunning)
     {
         return;
     }
     if (result == ErrorDialogResult.OK || result == ErrorDialogResult.Retry)
     {
         ClassBaseWorkZone.HandleVacuumFailCell(source, ClassWorkZones.Instance.WorkZone尺寸测量.CCDMeasDataStations.ToArray());
         res = ClassWorkZones.Instance.WorkZone尺寸测量.ActionStartCCDMeas(DataComp.AddAll);
         if (res != null)
         {
             ClassErrorHandle.ShowError(source, res, ErrorReturnHandler);
             oldres = res;
         }
         else
         {
             ClassErrorHandle.CheckAlarmListStatus(source, oldres);
             DoneReturn("CCDMeasFinish");
             ClassCommonSetting.SMLogInfo(this.owner.Name, this.Name, "CCD尺寸测量流程结束: " + parts);
         }
     }
 }
Exemple #10
0
 private void ErrorReturnHandler(string source, string message, ErrorDialogResult result)
 {
     if (!owner.IsRunning)
     {
         return;
     }
     if (result == ErrorDialogResult.OK || result == ErrorDialogResult.Retry)
     {
         ClassBaseWorkZone.HandleVacuumFailCell(source, ClassWorkZones.Instance.WorkZone上料机械手.LoadPNPDataStations.ToArray());
         res = ClassWorkZones.Instance.WorkZone上料机械手.ActionLoadPNPStartPlace(ClassWorkZones.Instance.DoLoadInPNPPlace, ClassWorkZones.Instance.AfterLoadInPNPPlace);
         if (res != null)
         {
             ClassErrorHandle.ShowError(source, res, ErrorReturnHandler);
             oldres = res;
         }
         else
         {
             ClassErrorHandle.CheckAlarmListStatus(source, oldres);
             DoneReturn("LoadPNPPlacePartFinish");
             ClassWorkZones.Instance.WorkZone顶封边定位.isTopAlignFree = false;
         }
     }
 }
Exemple #11
0
 private void ErrorReturnHandler(string source, string message, ErrorDialogResult result)
 {
     if (!owner.IsRunning)
     {
         return;
     }
     if (result == ErrorDialogResult.OK || result == ErrorDialogResult.Retry)
     {
         ClassZone下料机械手 UnloadZone = ClassWorkZones.Instance.WorkZone下料机械手;
         if (message != "")
         {
             ClassBaseWorkZone.HandleVacuumFailCell("下料机械手", UnloadZone.UnloadPNPDataStations.ToArray());
             for (int i = 0; i < ClassBaseWorkZone.CELLCOUNT; i++)
             {
                 ClassWorkZones.Instance.WorkZone尺寸测量.CCDMeasDataStations[i].TransferFrom(ClassWorkZones.Instance.WorkZone下料机械手.UnloadPNPDataStations[i]);
             }
         }
         res = UnloadZone.ActionUnloadPNPStartPick(ClassWorkZones.Instance.DoLoadOutPNPPick, ClassWorkZones.Instance.AfterLoadOutPNPPick);
         if (res == null)
         {
             //while (!UnloadZone.AxisUnloadPNPY.MoveTo(ClassZone下料机械手.EnumPoint.Place, false))
             //{
             //    if (UnloadZone.DispMotionError(UnloadZone.AxisUnloadPNPY, ClassZone下料机械手.EnumPoint.Place) != null)
             //        return;
             //}
             ///////同步调用测量工作区域X电机回到GetPart位置
             res = ClassWorkZones.Instance.WorkZone尺寸测量.ActionToGetPart(false);
             if (res != null)
             {
                 ClassErrorHandle.ShowError(source, res);
                 return;
             }
             ///////异步调用测量工作区域X电机回到GetPart位置
             //ClassWorkZones.Instance.WorkZone尺寸测量.AsyncActionMotorMove(ClassWorkZones.Instance.WorkZone尺寸测量.AxisOutlineMeasX,
             //    ClassZone尺寸测量.EnumPointX.GetPart);
             res = UnloadZone.ActionMove(ClassZone下料机械手.EnumPoint.Place, false);
             if (res != null)
             {
                 ClassErrorHandle.ShowError(source, res);
                 return;
             }
             if (ClassWorkFlow.Instance.WorkMode != EnumWorkMode.空跑)
             {
                 #region CCD All finish
                 if (!ClassCommonSetting.CheckTimeOut(() => { return(ClassWorkZones.Instance.WorkZone尺寸测量.isCCDAllFinish); }))
                 {
                     string cell = "";
                     for (int i = 0; i < ClassBaseWorkZone.CELLCOUNT; i++)
                     {
                         if (!ClassWorkZones.Instance.WorkZone尺寸测量.MeasDone[i])
                         {
                             cell += " " + ((EnumCellIndex)i).ToString();
                         }
                     }
                     ClassErrorHandle.ShowError(source, "图像检测数据没有全部返回:" + cell, ErrorLevel.Notice);
                 }
                 #endregion CCD All finish
             }
             ClassErrorHandle.CheckAlarmListStatus(source, oldres);
             DoneReturn("UnloadPNPPickFinish");
             if (_afterMeasCallBack != null)
             {
                 _afterMeasCallBack.BeginInvoke(CallBackAsyncReturn, _afterMeasCallBack);
             }
             //ClassWorkZones.Instance.WorkZone尺寸测量.AxisOutlineMeasX.WaitStop(ClassErrorHandle.TIMEOUT);
             ClassWorkZones.Instance.WorkZone尺寸测量.IsWorkFree = true;
             DoneReturn("CCDMotorBackToGetPart");
         }
         else
         {
             ClassErrorHandle.ShowError(source, res, ErrorReturnHandler);
             oldres = res;
         }
     }
 }