public void DoReset() { ClassCommonSetting.ProgramLog(LogFile.Level.Debug, "WorkFlow", $"{Name}工作区域复位开始"); ErrorInfoWithPause res = null; Reseting = true; lock (ResetLock) { ResetErr = new ClassErrorHandle(); ClassCommonSetting.ProgramLog(LogFile.Level.Debug, "WorkFlow", $"{Name}工作区域所有端口复位"); res = ResetOutPort(); if (res != null) { ClassErrorHandle.ShowError(this.Name, res); return; } ClassCommonSetting.ProgramLog(LogFile.Level.Debug, "WorkFlow", $"{Name}工作区域所有电机上电"); ServoOnAllMotor(); Reset(ResetErr); if (ResetErr.NoError) { _ioPublisher.notifyDoneEventSubscribers(this, new StateEventArgs("ResetDone", this.Name)); } else { _ioPublisher.notifyErrorEventSubscribers(this, new FailureException(ResetErr.ErrMessage)); } } Reseting = false; ClassCommonSetting.ProgramLog(LogFile.Level.Debug, "WorkFlow", $"{Name}工作区域复位结束"); }
public override void run(StateEventArgs inputEventArg) { lock (runLock) { switch (inputEventArg.eventName) { case "UnloadPNPPickFinish": //From state PickPart case "WaitUnloadOutEmpty": if (!ClassWorkZones.Instance.WorkZone下料传送.IsUnLoadHavePartEmpty) { DoneReturn("WaitUnloadOutEmpty"); return; } base.run(inputEventArg); ClassZone下料机械手 UnloadZone = ClassWorkZones.Instance.WorkZone下料机械手; ErrorInfoWithPause res = UnloadZone.ActionMove(ClassZone下料机械手.EnumPoint.Place); if (res != null) { ClassErrorHandle.ShowError("下料PNP放料", res); return; } ErrorReturnHandler("", "", ErrorDialogResult.OK); break; } } }
protected void DoAction(object sender, Func <ErrorInfoWithPause> act) { if (ClassCommonSetting.CheckGeneralAir != null) { if (ClassCommonSetting.CheckGeneralAir() != null) { return; } } Stopwatch sw = new Stopwatch(); sw.Start(); labelStatus.Text = "开始执行" + ((Control)sender).Text; ErrorInfoWithPause res = act(); sw.Stop(); if (res == null) { labelStatus.Text = "执行" + ((Control)sender).Text + "正常 用时:" + sw.ElapsedMilliseconds.ToString() + "ms"; } else { string temp = res.Message; //if (res.NeedRetry) temp += "(可重试)"; labelStatus.Text = "执行" + ((Control)sender).Text + "出错: " + temp; } }
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"); } } }
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"); } } }
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; } } }
public override void run(StateEventArgs inputEventArg) { lock (runLock) { switch (inputEventArg.eventName) { case "Start": //From state Idle case "NotReady": //From state CheckLoadIn case "LoadinFinish": //From state StartLoadin ErrorInfoWithPause res = ClassWorkZones.Instance.WorkZone上料传送.CheckLoadReady(); if (!ClassWorkZones.Instance.WorkZone上料机械手.isPicking && res == null) { if (ClassWorkFlow.Instance.LoadMode == EnumLoadMode.手动) { Thread.Sleep(ClassCommonSetting.SysParam.ManualLoadDelayTime); //重新检测,防止误操作 res = ClassWorkZones.Instance.WorkZone上料传送.CheckLoadReady(); if (!(!ClassWorkZones.Instance.WorkZone上料机械手.isPicking && res == null)) { DoneReturn("NotReady"); return; } } DoneReturn("NewCellReady"); return; } else if (res != null && res.Message == "停止上料中") { Thread.Sleep(5000); } DoneReturn("NotReady"); break; } } }
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()); } } }
public ErrorInfoWithPause ActionStartUnload(CallBackCommonFunc AfterUnloadOut) { ErrorInfoWithPause res = null; IsWorkFree = false; AxisUnloadOutConveyor.SetZero(); while (!AxisUnloadOutConveyor.MoveTo(EnumPoint.Step)) //return DispMotionError(AxisUnloadOutConveyor, "向外移料"); { res = DispMotionError(AxisUnloadOutConveyor, "向外移料"); if (res != null) { return(res); } } if (AfterUnloadOut != null) { AfterUnloadOut(); } //if (ThisInport(EnumInportName.UnloadOutUnload).status != (UnloadOutDatas[0] != null)) //{ // ClassErrorInfo.ShowError(this.Name, "下料处电芯有无和数据不相符。", ErrorLevel.Error); // return "下料处电芯有无和数据不相符。"; //} //else if (ThisInport(EnumInportName.UnloadOutUnload).status) // break; IsWorkFree = true; return(null); }
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; } } }
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()); } }); } }
public ErrorInfoWithPause ActionMove(EnumPointPNPX point, bool NeedWait = true) { ErrorInfoWithPause res = null; //气缸上移 while (!PNPCylinder.SetCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT)) //return new ErrorInfoWithPause("传送机械手气缸上移超时错。", ErrorLevel.Error); { res = WaitAlarmPause("传送PNP移动", "传送机械手气缸上移超时错"); if (res != null) { return(res); } } //电机移动 if (!MotorSafetyCheck.InPositionRange(AxisTransPNPX, point, 0, 0.005)) { while (!AxisTransPNPX.MoveTo(point, NeedWait)) //return DispMotionError(AxisTransPNPX, point); { res = DispMotionError(AxisTransPNPX, point); if (res != null) { return(res); } } } return(null); }
private void buttonMeasOnce_Click(object sender, EventArgs e) { if (MotorSafetyCheck.InPositionRange(zone.AxisOutlineMeasX, ClassZone尺寸测量.EnumPointX.Start, ClassDataInfo.CELLPITCH * (int)EnumCellIndex.右电芯)) { cellindex = EnumCellIndex.右电芯; } else if (MotorSafetyCheck.InPositionRange(zone.AxisOutlineMeasX, ClassZone尺寸测量.EnumPointX.Start, ClassDataInfo.CELLPITCH * (int)EnumCellIndex.中电芯)) { cellindex = EnumCellIndex.中电芯; } else if (MotorSafetyCheck.InPositionRange(zone.AxisOutlineMeasX, ClassZone尺寸测量.EnumPointX.Start, ClassDataInfo.CELLPITCH * (int)EnumCellIndex.左电芯)) { cellindex = EnumCellIndex.左电芯; } else { MessageBox.Show("尺寸测量需要先将指定工位移到相机下方。请先将要测量的工位移动到相机下方。"); return; } if (zone.CCDMeasDataStations[cellindex].CellData == null) { zone.CCDMeasDataStations[cellindex].CellData = ClassDataInfo.NewCellData(); //zone.CCDMeasDataStations[cellindex].CellData.Barcode = "TEST"; } DoAction(sender, () => { ErrorInfoWithPause res = zone.ActionOneCCDMeas(cellindex, DataComp.AddAll); while (!zone.isCCDAllFinish) { Thread.Sleep(1); } zone.CCDMeasDataStations[cellindex].CellData = zone.BufferDatas[(int)cellindex]; return(res); }); }
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; } } }
public ErrorInfoWithPause CheckLoadin() { ErrorInfoWithPause res = null; if (ClassWorkFlow.Instance.WorkMode != EnumWorkMode.空跑) { if (ThisInport(EnumInportName.LoadInConvInPosRight).status || LoadInDataStations[0].CellData != null) { ClassCommonSetting.CheckTimeOut(() => { res = CheckLoadSensor(); return(res == null); }); } } //for (int i = 0; i < 50; i++) //{ // System.Windows.Forms.Application.DoEvents(); // res = CheckLoadSensor(); // if (res != null) // { // System.Threading.Thread.Sleep(20); // } // else // break; //} return(res); }
public override ErrorInfoWithPause ResetOutPort() { ErrorInfoWithPause res = null; string err = ""; base.ResetOutPort(); for (int i = 0; i < TopAlignCellVacuums.Count; i++) { TopAlignCellVacuums[i].SetOutPortStatus(false); } CellBlow.SetOutPortStatus(false); Cylinder[EnumCellIndex.左电芯].SetCylinderState(CYLIND_UP, 0, false); Cylinder[EnumCellIndex.中电芯].SetCylinderState(CYLIND_UP, 0, false); Cylinder[EnumCellIndex.右电芯].SetCylinderState(CYLIND_UP, 0, false); ThisOutport(EnumOutportName.TopAlignSoftCyLeft).SetOutput(true); ThisOutport(EnumOutportName.TopAlignSoftCyMid).SetOutput(true); ThisOutport(EnumOutportName.TopAlignSoftCyRight).SetOutput(true); if (!Cylinder[EnumCellIndex.左电芯].WaitCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT)) { err += "左气缸 "; } if (!Cylinder[EnumCellIndex.中电芯].WaitCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT)) { err += "中气缸 "; } if (!Cylinder[EnumCellIndex.右电芯].WaitCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT)) { err += "右气缸 "; } if (err != "") { res = new ErrorInfoWithPause("气缸上升错误: " + err.Trim(), ErrorLevel.Error); } return(res); }
/// <summary> /// PNP电机移到到指定位置 /// </summary> /// <param name="action"></param> public ErrorInfoWithPause ActionMove(EnumPointY action) { ErrorInfoWithPause res = null; string temp = ""; while (true) { temp = ""; PNPCylinder[EnumCellIndex.左电芯].SetCylinderState(CYLIND_UP, 0, false); PNPCylinder[EnumCellIndex.中电芯].SetCylinderState(CYLIND_UP, 0, false); PNPCylinder[EnumCellIndex.右电芯].SetCylinderState(CYLIND_UP, 0, false); if (!PNPCylinder[EnumCellIndex.左电芯].WaitCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT)) { temp = " 左气缸"; } if (!PNPCylinder[EnumCellIndex.中电芯].WaitCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT)) { temp = " 中气缸"; } if (!PNPCylinder[EnumCellIndex.右电芯].WaitCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT)) { temp = " 右气缸"; } if (temp != "") //return new ErrorInfoWithPause("气缸上移超时错:" + temp, ErrorLevel.Error); { res = WaitAlarmPause("上料PNP移动", "气缸上移超时错: " + temp); if (res != null) { return(res); } } else { break; } } while (!AxisLoadPNPZ.MoveTo(EnumPointZ.Idle)) //return DispMotionError(AxisLoadPNPZ, EnumPointZ.Idle); { res = DispMotionError(AxisLoadPNPZ, EnumPointZ.Idle); if (res != null) { return(res); } } while (!AxisLoadPNPY.MoveTo(action)) //return DispMotionError(AxisLoadPNPY, action); { res = DispMotionError(AxisLoadPNPY, action); if (res != null) { return(res); } } return(null); }
public ErrorInfoWithPause AllCyDown() { ErrorInfoWithPause res = null; string temp = ""; if (ThicknessDataStations[EnumCellIndex.左电芯].CellData != null) { Cylinder[EnumCellIndex.左电芯].SetCylinderState(CYLIND_DOWN, 0, false); } if (ThicknessDataStations[EnumCellIndex.中电芯].CellData != null) { Cylinder[EnumCellIndex.中电芯].SetCylinderState(CYLIND_DOWN, 0, false); } if (ThicknessDataStations[EnumCellIndex.右电芯].CellData != null) { Cylinder[EnumCellIndex.右电芯].SetCylinderState(CYLIND_DOWN, 0, false); } while (true) { temp = ""; if (ThicknessDataStations[EnumCellIndex.左电芯].CellData != null) { if (!Cylinder[EnumCellIndex.左电芯].WaitCylinderState(CYLIND_DOWN, ClassErrorHandle.TIMEOUT)) { temp += " 左气缸"; } } if (ThicknessDataStations[EnumCellIndex.中电芯].CellData != null) { if (!Cylinder[EnumCellIndex.中电芯].WaitCylinderState(CYLIND_DOWN, ClassErrorHandle.TIMEOUT)) { temp += " 中气缸"; } } if (ThicknessDataStations[EnumCellIndex.右电芯].CellData != null) { if (!Cylinder[EnumCellIndex.右电芯].WaitCylinderState(CYLIND_DOWN, ClassErrorHandle.TIMEOUT)) { temp += " 右气缸"; } } if (temp != "") //res = new ErrorInfoWithPause("厚度测量气缸下移错误:" + temp, ErrorLevel.Error); { res = WaitAlarmPause("厚度测量", "厚度测量气缸下移超时错: " + temp); if (res != null) { return(res); } } else { break; } } return(null); }
private void MotorMoveAsyncReturn(IAsyncResult result) { AsyncActionMotorMove handler = (AsyncActionMotorMove)((AsyncResult)result).AsyncDelegate; ErrorInfoWithPause res = handler.EndInvoke(result); if (res != null) { ClassErrorHandle.ShowError(this.Name, res); } }
protected ErrorInfoWithPause DoAction(object sender, Func <ErrorInfoWithPause> act) { ErrorInfoWithPause res = act(); if (res != null) { string temp = res.Message; labelStatus.Text = "执行" + ((Control)sender).Text + "出错: " + temp; } return(res); }
/// <summary> /// PNP电机移到到指定位置 /// </summary> /// <param name="action"></param> public ErrorInfoWithPause ActionMove(EnumPointPNPY action) { string err = ""; ErrorInfoWithPause res = null; while (true) { err = ""; PNPCylinder[EnumCellIndex.左电芯].SetCylinderState(CYLIND_UP, 0, false); PNPCylinder[EnumCellIndex.中电芯].SetCylinderState(CYLIND_UP, 0, false); PNPCylinder[EnumCellIndex.右电芯].SetCylinderState(CYLIND_UP, 0, false); if (!PNPCylinder[EnumCellIndex.左电芯].WaitCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT)) { err += " 左气缸"; } if (!PNPCylinder[EnumCellIndex.中电芯].WaitCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT)) { err += " 中气缸"; } if (!PNPCylinder[EnumCellIndex.右电芯].WaitCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT)) { err += " 右气缸"; } if (err != "")// return new ErrorInfoWithPause("NG挑选PNP气缸上移超时错:" + err, ErrorLevel.Alarm, false, true); { res = WaitAlarmPause("NG挑选PNP移动", "NG挑选PNP气缸上移超时错: " + err); if (res != null) { return(res); } } else { break; } } while (!AxisSortingPNPZ.MoveTo(EnumPointPNPZ.Up)) //return DispMotionError(AxisSortingPNPZ, EnumPointPNPZ.Up); { res = DispMotionError(AxisSortingPNPZ, EnumPointPNPZ.Up); if (res != null) { return(res); } } while (!AxisSortingPNPY.MoveTo(action)) //return DispMotionError(AxisSortingPNPY, action); { res = DispMotionError(AxisSortingPNPY, action); if (res != null) { return(res); } } return(null); }
public ErrorInfoWithPause MeasPicture(bool isStandard, string path = "") { ErrorInfoWithPause res = null; MeasDone[3] = false; ClassCommonSetting.SocketToAOI.SendCommandMeas(isStandard, path); if (!ClassCommonSetting.CheckTimeOut(() => { return(MeasDone[3]); })) { res = new ErrorInfoWithPause("图像检测超时错。", ErrorLevel.Alarm); } return(res); }
private void buttonMeas_Click(object sender, EventArgs e) { DoAction(sender, () => { ErrorInfoWithPause res = zone.ActionStartCCDMeas(DataComp.AddAll); while (!zone.isCCDAllFinish) { Thread.Sleep(1); } return(res); }); }
public ErrorInfoWithPause ActionStartLoad(out bool AllPick, CallBackCommonFunc ActionTransLoad, CallBackCommonFunc AfterActionTransLoad) { ErrorInfoWithPause res = ActionMove(EnumPointPNPX.Load); if (res != null) { AllPick = false; return(res); } //Cylinder down while (!PNPCylinder.SetCylinderState(CYLIND_DOWN, ClassErrorHandle.TIMEOUT)) { //res = new ErrorInfoWithPause("传送机械手气缸下移超时错。", ErrorLevel.Error); res = WaitAlarmPause("传送PNP取料", "传送机械手气缸下移超时错"); if (res != null) { AllPick = false; return(res); } } if (ActionTransLoad != null) { ActionTransLoad(); } //Cylinder up while (!PNPCylinder.SetCylinderState(CYLIND_UP, ClassErrorHandle.TIMEOUT)) { //res = new ErrorInfoWithPause("传送机械手气缸上移超时错。", ErrorLevel.Error); //AllPick = false; //return res; res = WaitAlarmPause("传送PNP取料", "传送机械手气缸上移超时错"); if (res != null) { AllPick = false; return(res); } } if (AfterActionTransLoad != null) { AfterActionTransLoad(); } //Check vacuum string vac = CheckVacuumStatus(); AllPick = vac.Trim() == ""; if (!AllPick) { return(new ErrorInfoWithPause(vac.Trim(), ErrorLevel.Alarm, true)); } return(null); }
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; } } }
public ErrorInfoWithPause SnapShot(int index, string barcode, string path = "") { ErrorInfoWithPause res = null; _camTrigFinish[index] = false; MeasDone[index] = false; BufferDatas[index] = CCDMeasDataStations[index].CellData; ClassCommonSetting.SocketToAOI.SendCommandCamTrig(index + 1, barcode, path); if (!ClassCommonSetting.CheckTimeOut(() => { return(_camTrigFinish[index]); })) { res = new ErrorInfoWithPause("抓取图像超时错。", ErrorLevel.Error); } return(res); }
public ErrorInfoWithPause ActionLoad() { ErrorInfoWithPause res = null; while (!AxisThicknessMeasY.MoveTo(EnumPointX.Meas)) //return DispMotionError(AxisThicknessMeasY, EnumPointX.Meas); { res = DispMotionError(AxisThicknessMeasY, EnumPointX.Meas); if (res != null) { return(res); } } return(AllCyDown()); }
public ErrorInfoWithPause ActionToMeasPos(EnumCellIndex cell) { ErrorInfoWithPause res = null; while (!AxisOutlineMeasX.MoveTo(EnumPointX.Start, true, ClassDataInfo.CELLPITCH * (int)cell)) //return DispMotionError(AxisOutlineMeasX, cell); { res = DispMotionError(AxisOutlineMeasX, cell); if (res != null) { return(res); } } return(null); }
public ErrorInfoWithPause ActionToUnloadPart() { ErrorInfoWithPause res = null; while (!AxisOutlineMeasX.MoveTo(EnumPointX.PartOut)) //return DispMotionError(AxisOutlineMeasX, EnumPointX.PartOut); { res = DispMotionError(AxisOutlineMeasX, EnumPointX.PartOut); if (res != null) { return(res); } } return(null); }
public ErrorInfoWithPause ActionToGetPart(bool NeedWait = true) { ErrorInfoWithPause res = null; while (!AxisOutlineMeasX.MoveTo(EnumPointX.GetPart, NeedWait)) //return DispMotionError(AxisOutlineMeasX, EnumPointX.GetPart); { res = DispMotionError(AxisOutlineMeasX, EnumPointX.GetPart); if (res != null) { return(res); } } return(null); }