| | |
| | | pauseDisableList.Add(AblationSteps.S4135_POSITION_CHECK); |
| | | pauseDisableList.Add(AblationSteps.S4215_ABLATION_PROCESS_WAIT); |
| | | pauseDisableList.Add(AblationSteps.S4225_POSITION_CHECK); |
| | | |
| | | |
| | | pauseDisableList.Add(AblationSteps.S5220_SCANNER_MOVE_WAIT); |
| | | |
| | | MotorX.Check_Jog_Interlock = Jog_Interlock; |
| | | MotorX.Check_Move_Interlock = Move_Interlock; |
| | | pauseDisableList.Add(AblationSteps.S5320_LASER_ON); |
| | | pauseDisableList.Add(AblationSteps.S5330_LASER_ON_CHECK); |
| | | pauseDisableList.Add(AblationSteps.S5340_POWER_MEASUREMENT_START); |
| | | pauseDisableList.Add(AblationSteps.S5350_POWER_MEASUREMENT); |
| | | pauseDisableList.Add(AblationSteps.S5360_POWER_MEASUREMENT_END); |
| | | pauseDisableList.Add(AblationSteps.S5370_LASER_OFF); |
| | | pauseDisableList.Add(AblationSteps.S5380_LASER_OFF_CHECK); |
| | | |
| | | pauseDisableList.Add(AblationSteps.S5420_LASER_ON); |
| | | pauseDisableList.Add(AblationSteps.S5430_LASER_ON_CHECK); |
| | | pauseDisableList.Add(AblationSteps.S5440_POWER_MEASUREMENT_START); |
| | | pauseDisableList.Add(AblationSteps.S5450_POWER_MEASUREMENT); |
| | | pauseDisableList.Add(AblationSteps.S5460_POWER_MEASUREMENT_END); |
| | | pauseDisableList.Add(AblationSteps.S5470_LASER_OFF); |
| | | pauseDisableList.Add(AblationSteps.S5480_LASER_OFF_CHECK); |
| | | |
| | | pauseDisableList.Add(AblationSteps.S6000_MOVE_STAY_POSITION); |
| | | pauseDisableList.Add(AblationSteps.S6010_LASER_OFF); |
| | | pauseDisableList.Add(AblationSteps.S6020_LASER_OFF_CHECK); |
| | | pauseDisableList.Add(AblationSteps.S6100_MOVE_WAIT); |
| | | pauseDisableList.Add(AblationSteps.S5999_AUTO_POWER_END); |
| | | |
| | | MotorX.Check_Jog_Interlock = Jog_Interlock_MotorX; |
| | | MotorX.Check_Move_Interlock = Move_Interlock_MotorX; |
| | | MotorZ.Check_Jog_Interlock = Jog_Interlock; |
| | | MotorZ.Check_Move_Interlock = Move_Interlock; |
| | | |
| | |
| | | #endregion |
| | | |
| | | #region Function |
| | | private bool Move_Interlock_MotorX() |
| | | { |
| | | if (equipment.User.Level != En_User_Level.Master && equipment.Door_Opened) |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | double position = Get_Scanner_Z_A1_Stay_Position(); |
| | | |
| | | if (MotorZ.Is_Inposition(position, equipment.Setting.Inposition_Offset) == false) |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | private bool Jog_Interlock_MotorX(bool positive) |
| | | { |
| | | if (equipment.User.Level != En_User_Level.Master && equipment.Door_Opened) |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | double position = Get_Scanner_Z_A1_Stay_Position(); |
| | | |
| | | if (MotorZ.Is_Inposition(position, equipment.Setting.Inposition_Offset) == false) |
| | | { |
| | | return true; |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | private bool Move_Interlock() |
| | | { |
| | | if (equipment.User.Level != En_User_Level.Master && equipment.Door_Opened) |
| | |
| | | if (on) |
| | | { |
| | | equipment.scanner.Set_Stop(); |
| | | equipment.scanner.Set_Laser_Off(); |
| | | } |
| | | } |
| | | } |
| | |
| | | { |
| | | if (pauseDisableList.Contains(Step) == false) |
| | | { |
| | | if(Is_Power_Measure) |
| | | { |
| | | Step = AblationSteps.S6000_MOVE_STAY_POSITION; |
| | | return; |
| | | } |
| | | |
| | | UnitMode = En_Equipment_Mode.Pause; |
| | | return; |
| | | } |
| | |
| | | |
| | | private void Seq_Power_Measure() |
| | | { |
| | | //Laser 출사 위치에서 Power Meter위치가 아닐 때 Laser off 후 첫 Step으로 이동. |
| | | if((AblationSteps.S5320_LASER_ON <= Step && Step <= AblationSteps.S5360_POWER_MEASUREMENT_END) || |
| | | (AblationSteps.S5420_LASER_ON <= Step && Step <= AblationSteps.S5460_POWER_MEASUREMENT_END)) |
| | | { |
| | | if (equipment.process.ablation.Get_Is_Position_X_Power_Meter() == false || equipment.process.ablation.Get_Is_Position_Z_Power_Meter() == false) |
| | | { |
| | | if (equipment.scanner.Set_Laser_Off()) |
| | | { |
| | | Step = AblationSteps.S0000_WAIT; |
| | | } |
| | | } |
| | | } |
| | | |
| | | switch (Step) |
| | | { |
| | | case AblationSteps.S5000_AUTO_POWER_START: |
| | |
| | | else |
| | | { |
| | | auto_power_view.Add_Info($"Power Meter Status Fail"); |
| | | Step = AblationSteps.S5999_AUTO_POWER_END; |
| | | Step = AblationSteps.S6000_MOVE_STAY_POSITION; |
| | | } |
| | | break; |
| | | } |
| | |
| | | case AblationSteps.S5130_ZERO_SET: |
| | | { |
| | | equipment.power_meter.Set_Zero(); |
| | | Step = AblationSteps.S5210_SCANNER_POSITION_MOVE; |
| | | Step = AblationSteps.S5150_MOVE_Z_STAY_POSITION; |
| | | break; |
| | | } |
| | | case AblationSteps.S5210_SCANNER_POSITION_MOVE: |
| | | case AblationSteps.S5150_MOVE_Z_STAY_POSITION: |
| | | { |
| | | double position = Get_Scanner_Z_A1_Stay_Position(); |
| | | |
| | | if (MotorZ.Move_Absolute_Pos(position, 500)) |
| | | { |
| | | Step = AblationSteps.S5160_POSITION_CHECK; |
| | | } |
| | | break; |
| | | } |
| | | case AblationSteps.S5160_POSITION_CHECK: |
| | | { |
| | | double position = Get_Scanner_Z_A1_Stay_Position(); |
| | | |
| | | if (MotorZ.MotionComplete) |
| | | { |
| | | if (MotorZ.Is_Inposition(position, equipment.Setting.Inposition_Offset)) |
| | | { |
| | | auto_power_view.Add_Info($"Scanner Position Z WAIT MOVE"); |
| | | Step = AblationSteps.S5210_SCANNER_POSITION_X_MOVE; |
| | | } |
| | | else |
| | | { |
| | | Step = AblationSteps.S5150_MOVE_Z_STAY_POSITION; |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | case AblationSteps.S5210_SCANNER_POSITION_X_MOVE: |
| | | { |
| | | if (equipment.process.ablation.Move_X_Power_Meter_Position()) |
| | | { |
| | | if (equipment.process.ablation.Move_Z_Power_Meter_Position()) |
| | | { |
| | | Step = AblationSteps.S5220_SCANNER_MOVE_WAIT; |
| | | } |
| | | Step = AblationSteps.S5220_SCANNER_MOVE_WAIT; |
| | | } |
| | | break; |
| | | } |
| | | case AblationSteps.S5220_SCANNER_MOVE_WAIT: |
| | | { |
| | | if (equipment.process.ablation.MotorX.MotionComplete && equipment.process.ablation.MotorZ.MotionComplete) |
| | | if (equipment.process.ablation.MotorX.MotionComplete) |
| | | { |
| | | if (equipment.process.ablation.Get_Is_Position_X_Power_Meter() && equipment.process.ablation.Get_Is_Position_Z_Power_Meter()) |
| | | if (equipment.process.ablation.Get_Is_Position_X_Power_Meter()) |
| | | { |
| | | auto_power_view.Add_Info($"Scanner Position Move"); |
| | | auto_power_view.Add_Info($"Scanner Position X Power meter Move"); |
| | | Step = AblationSteps.S5230_SCANNER_POSITION_Z_MOVE; |
| | | } |
| | | else |
| | | { |
| | | Step = AblationSteps.S5210_SCANNER_POSITION_X_MOVE; |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | case AblationSteps.S5230_SCANNER_POSITION_Z_MOVE: |
| | | { |
| | | if (equipment.process.ablation.Move_Z_Power_Meter_Position()) |
| | | { |
| | | Step = AblationSteps.S5240_SCANNER_MOVE_WAIT; |
| | | } |
| | | break; |
| | | } |
| | | case AblationSteps.S5240_SCANNER_MOVE_WAIT: |
| | | { |
| | | if (equipment.process.ablation.MotorZ.MotionComplete) |
| | | { |
| | | if (equipment.process.ablation.Get_Is_Position_Z_Power_Meter()) |
| | | { |
| | | auto_power_view.Add_Info($"Scanner Position Z Power meter Move"); |
| | | Step = AblationSteps.S5300_SCANNER_INIT; |
| | | } |
| | | else |
| | | { |
| | | Step = AblationSteps.S5210_SCANNER_POSITION_MOVE; |
| | | Step = AblationSteps.S5230_SCANNER_POSITION_Z_MOVE; |
| | | } |
| | | } |
| | | break; |
| | |
| | | } |
| | | case AblationSteps.S5320_LASER_ON: |
| | | { |
| | | if (equipment.scanner.Set_Laser_On()) |
| | | if (equipment.process.ablation.MotorX.MotionComplete && equipment.process.ablation.MotorZ.MotionComplete) |
| | | { |
| | | auto_power_view.Add_Info($"Laser On."); |
| | | Step = AblationSteps.S5330_LASER_ON_CHECK; |
| | | if (equipment.process.ablation.Get_Is_Position_X_Power_Meter() && equipment.process.ablation.Get_Is_Position_Z_Power_Meter()) |
| | | { |
| | | if (equipment.scanner.Set_Laser_On()) |
| | | { |
| | | auto_power_view.Add_Info($"Laser On."); |
| | | Step = AblationSteps.S5330_LASER_ON_CHECK; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Step = AblationSteps.S0000_WAIT; |
| | | } |
| | | } |
| | | break; |
| | | } |
| | |
| | | { |
| | | //alarm. |
| | | Alarm_Manager.Instance.Occurred(En_Alarm_List.AL_0942_POWER_COUNT_IS_EMPTY); |
| | | Step = AblationSteps.S5999_AUTO_POWER_END; |
| | | Step = AblationSteps.S6000_MOVE_STAY_POSITION; |
| | | } |
| | | |
| | | double averager = lst_power.Average(); |
| | |
| | | auto_power_view.Add_Info($"Max : {lst_power.Max()}"); |
| | | auto_power_view.Add_Info($"Min : {lst_power.Min()}"); |
| | | Alarm_Manager.Instance.Occurred(En_Alarm_List.AL_0940_TARGET_POWER_ERROR); |
| | | Step = AblationSteps.S5999_AUTO_POWER_END; |
| | | Step = AblationSteps.S6000_MOVE_STAY_POSITION; |
| | | } |
| | | break; |
| | | } |
| | |
| | | } |
| | | case AblationSteps.S5420_LASER_ON: |
| | | { |
| | | if (equipment.scanner.Set_Laser_On()) |
| | | if (equipment.process.ablation.MotorX.MotionComplete && equipment.process.ablation.MotorZ.MotionComplete) |
| | | { |
| | | Step = AblationSteps.S5430_LASER_ON_CHECK; |
| | | if (equipment.process.ablation.Get_Is_Position_X_Power_Meter() && equipment.process.ablation.Get_Is_Position_Z_Power_Meter()) |
| | | { |
| | | if (equipment.scanner.Set_Laser_On()) |
| | | { |
| | | auto_power_view.Add_Info($"Laser On."); |
| | | Step = AblationSteps.S5430_LASER_ON_CHECK; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | Step = AblationSteps.S0000_WAIT; |
| | | } |
| | | } |
| | | break; |
| | | } |
| | |
| | | { |
| | | //alarm. |
| | | Alarm_Manager.Instance.Occurred(En_Alarm_List.AL_0942_POWER_COUNT_IS_EMPTY); |
| | | Step = AblationSteps.S5999_AUTO_POWER_END; |
| | | Step = AblationSteps.S6000_MOVE_STAY_POSITION; |
| | | } |
| | | |
| | | double averager = lst_power.Average(); |
| | |
| | | auto_power_view.Add_Info($"Max : {lst_power.Max()}"); |
| | | auto_power_view.Add_Info($"Min : {lst_power.Min()}"); |
| | | |
| | | Step = AblationSteps.S5999_AUTO_POWER_END; |
| | | Step = AblationSteps.S6000_MOVE_STAY_POSITION; |
| | | } |
| | | else |
| | | { |
| | |
| | | auto_power_view.Add_Info($"Max : {lst_power.Max()}"); |
| | | auto_power_view.Add_Info($"Min : {lst_power.Min()}"); |
| | | Alarm_Manager.Instance.Occurred(En_Alarm_List.AL_0941_RECIPE_POWER_ERROR); |
| | | Step = AblationSteps.S5999_AUTO_POWER_END; |
| | | Step = AblationSteps.S6000_MOVE_STAY_POSITION; |
| | | } |
| | | } |
| | | break; |
| | |
| | | Step = AblationSteps.S5410_RECIPE_POWER_SET; |
| | | break; |
| | | } |
| | | case AblationSteps.S6000_MOVE_STAY_POSITION: |
| | | { |
| | | double position = Get_Scanner_Z_A1_Stay_Position(); |
| | | |
| | | if (MotorZ.Move_Absolute_Pos(position, 500)) |
| | | { |
| | | Step = AblationSteps.S6010_LASER_OFF; |
| | | } |
| | | break; |
| | | } |
| | | case AblationSteps.S6010_LASER_OFF: |
| | | { |
| | | if (equipment.scanner.Set_Laser_Off()) |
| | | { |
| | | Step = AblationSteps.S6020_LASER_OFF_CHECK; |
| | | } |
| | | break; |
| | | } |
| | | case AblationSteps.S6020_LASER_OFF_CHECK: |
| | | { |
| | | if (!equipment.sm.Get_Bit(Input_Memory_Address.Laser_Active)) |
| | | { |
| | | auto_power_view.Add_Info($"Lsaer Off"); |
| | | Step = AblationSteps.S6100_MOVE_WAIT; |
| | | } |
| | | else |
| | | { |
| | | Step = AblationSteps.S6010_LASER_OFF; |
| | | } |
| | | break; |
| | | } |
| | | case AblationSteps.S6100_MOVE_WAIT: |
| | | { |
| | | double position = Get_Scanner_Z_A1_Stay_Position(); |
| | | |
| | | if (MotorZ.MotionComplete) |
| | | { |
| | | if (MotorZ.Is_Inposition(position, equipment.Setting.Inposition_Offset)) |
| | | { |
| | | auto_power_view.Add_Info($"Scanner Stay Position Move"); |
| | | Step = AblationSteps.S5999_AUTO_POWER_END; |
| | | } |
| | | else |
| | | { |
| | | Step = AblationSteps.S6000_MOVE_STAY_POSITION; |
| | | } |
| | | } |
| | | break; |
| | | } |
| | | case AblationSteps.S5999_AUTO_POWER_END: |
| | | { |
| | | Parameter_Power parameter = equipment.Power_Parameter.Clone(); |