diff --git a/Modules/Mainframe/Aligners/Routines/AlignerAlignRoutine.cs b/Modules/Mainframe/Aligners/Routines/AlignerAlignRoutine.cs index aedffc20..23109acf 100644 --- a/Modules/Mainframe/Aligners/Routines/AlignerAlignRoutine.cs +++ b/Modules/Mainframe/Aligners/Routines/AlignerAlignRoutine.cs @@ -49,14 +49,7 @@ namespace SicModules.Aligners.Routines CheckHaveWafer((int)RoutineStep.CheckWafer, 10); - OpenVacuum((int)RoutineStep.OpenVacuum, 3); - - //移动到测量中心 - AlignerMoveToMeasure((int)RoutineStep.MoveToMeasure, 20); - - DoAliger((int)RoutineStep.Aligner, _alignerTimeOut); - - CloseVacuum((int)RoutineStep.CloseVacuum, 3); + AlignerMove((int)RoutineStep.Aligner, _alignerTimeOut); } catch (RoutineBreakException) { diff --git a/Modules/Mainframe/Aligners/Routines/Base/AlignerBaseRoutine.cs b/Modules/Mainframe/Aligners/Routines/Base/AlignerBaseRoutine.cs index 8168e418..2ae5a86b 100644 --- a/Modules/Mainframe/Aligners/Routines/Base/AlignerBaseRoutine.cs +++ b/Modules/Mainframe/Aligners/Routines/Base/AlignerBaseRoutine.cs @@ -184,20 +184,14 @@ namespace SicModules.Aligners.Routines.Base } } - //寻边 - protected void DoAliger(int id, int timeout) + protected void AlignerMove(int id, int timeout) { - Tuple ret = ExecuteAndWait(id, () => + var ret = ExecuteAndWait(id, () => { - Notify($"Alinger"); - _alignerDevice.Set("BAL"); - + Notify($"Align"); + _alignerDevice.DoAliger(); return true; - }, () => - { - return !_alignerDevice.IsBusy; - - }, timeout * 1000); + }, () => !_alignerDevice.IsBusy, timeout * 1000); if (ret.Item1) { @@ -205,71 +199,9 @@ namespace SicModules.Aligners.Routines.Base { throw (new RoutineFaildException()); } - else if (ret.Item2 == Result.TIMEOUT) + else if (ret.Item2 == Result.TIMEOUT) //timeout { - Stop($"Aligner Alinger Timeout, over {timeout} seconds"); - throw (new RoutineFaildException()); - } - else - throw (new RoutineBreakException()); - } - } - - //打开真空 - protected void OpenVacuum(int id, int timeout) - { - Tuple ret = ExecuteAndWait(id, () => - { - Notify($"Open Vacuum"); - _alignerDevice.Set("CVN"); - - return true; - }, () => - { - return !_alignerDevice.IsBusy; - - }, timeout * 1000); - - if (ret.Item1) - { - if (ret.Item2 == Result.FAIL) - { - throw (new RoutineFaildException()); - } - else if (ret.Item2 == Result.TIMEOUT) - { - Stop($"Aligner Open Vacuum Timeout, over {timeout} seconds"); - throw (new RoutineFaildException()); - } - else - throw (new RoutineBreakException()); - } - } - - //关闭真空 - protected void CloseVacuum(int id, int timeout) - { - Tuple ret = ExecuteAndWait(id, () => - { - Notify($"Close Vacuum"); - _alignerDevice.Set("CVF"); - - return true; - }, () => - { - return !_alignerDevice.IsBusy; - - }, timeout * 1000); - - if (ret.Item1) - { - if (ret.Item2 == Result.FAIL) - { - throw (new RoutineFaildException()); - } - else if (ret.Item2 == Result.TIMEOUT) - { - Stop($"Aligner Close Vacuum Timeout, over {timeout} seconds"); + Stop($"Aligner Align Timeout, over {timeout} seconds"); throw (new RoutineFaildException()); } else diff --git a/Modules/Mainframe/Config/PM/PM1/DeviceModelPM1.xml b/Modules/Mainframe/Config/PM/PM1/DeviceModelPM1.xml index bfcb8fbd..d62ad077 100644 --- a/Modules/Mainframe/Config/PM/PM1/DeviceModelPM1.xml +++ b/Modules/Mainframe/Config/PM/PM1/DeviceModelPM1.xml @@ -415,7 +415,7 @@ - +