Ejemplo n.º 1
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;
         }
     }
 }
Ejemplo n.º 2
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");
         }
     }
 }
Ejemplo n.º 3
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");
         }
     }
 }
Ejemplo n.º 4
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;
         }
     }
 }
Ejemplo n.º 5
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;
         }
     }
 }
Ejemplo n.º 6
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);
         }
     }
 }
Ejemplo n.º 7
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;
         }
     }
 }
Ejemplo n.º 8
0
 private void ErrorReturnHandler(string source, string message, ErrorDialogResult result)
 {
     if (!owner.IsRunning)
     {
         return;
     }
     if (result == ErrorDialogResult.OK || result == ErrorDialogResult.Retry)
     {
         ClassBaseWorkZone.HandleVacuumFailCell("下料机械手", ClassWorkZones.Instance.WorkZone下料机械手.UnloadPNPDataStations.ToArray());
         ClassWorkZones.Instance.WorkZone下料传送.IsPlacingPart = true;
         ClassZone下料机械手     UnloadZone = ClassWorkZones.Instance.WorkZone下料机械手;
         ErrorInfoWithPause res        = UnloadZone.ActionUnloadPNPStartPlace(ClassWorkZones.Instance.DoLoadOutPNPPlace, ClassWorkZones.Instance.AfterLoadOutPNPPlace);
         if (res != null)
         {
             ClassErrorHandle.ShowError("下料PNP放料", res);
             ClassWorkZones.Instance.WorkZone下料传送.IsPlacingPart = false;
             return;
         }
         ClassWorkZones.Instance.WorkZone下料传送.IsPlacingPart = false;
         UnloadZone.AxisUnloadPNPY.MoveTo(ClassZone下料机械手.EnumPoint.Buffer, false);
         DoneReturn("UnloadPNPPlaceFinish");
     }
 }
Ejemplo n.º 9
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;
         }
     }
 }