| | |
| | | sm.Set_Value(Process_Memory_Address.ULD_Tray_Ng_Count, value); |
| | | } |
| | | } |
| | | |
| | | |
| | | public int WidthMeasurementCount |
| | | { |
| | | get |
| | | { |
| | | int count; |
| | | object value; |
| | | |
| | | sm.Get_Value(Process_Memory_Address.Width_Measurement_Count, out value); |
| | | int.TryParse($"{value}", out count); |
| | | return count; |
| | | } |
| | | set |
| | | { |
| | | sm.Set_Value(Process_Memory_Address.Width_Measurement_Count, value); |
| | | } |
| | | } |
| | | |
| | | public Main_Recipe Cur_Main_Recipe |
| | | { |
| | | get |
| | |
| | | private User_Info _user; |
| | | private SequenceTimer _modeChangeTime = new SequenceTimer(); |
| | | |
| | | private string _programVersion = "001.001.002"; |
| | | private string _programVersion = "001.003.000"; |
| | | #endregion |
| | | |
| | | #region Construct |
| | |
| | | |
| | | power_meter = new Power_Meter(this, "COM3"); |
| | | power_meter.Open(); |
| | | |
| | | power_meter.HandShakingOn(); |
| | | Create_Exception_logger(); |
| | | Create_Panel_Info_logger(); |
| | | Create_Tact_Time_logger(); |
| | |
| | | |
| | | public void Dispose() |
| | | { |
| | | DateTime dt = DateTime.Now; |
| | | |
| | | while(true) |
| | | { |
| | | Thread.Sleep(100); |
| | | bool isLaserOn; |
| | | |
| | | if(scanner.Get_Laser_On(out isLaserOn) == false) |
| | | { |
| | | isLaserOn = true; |
| | | } |
| | | |
| | | if(isLaserOn) |
| | | { |
| | | scanner.Set_Laser_Off(); |
| | | } |
| | | |
| | | if ((DateTime.Now - dt).TotalSeconds > 5) |
| | | { |
| | | break; |
| | | } |
| | | } |
| | | |
| | | IsDisposed = true; |
| | | Board_Control.Dispose(); |
| | | Align_vision.Dispose(); |
| | |
| | | { |
| | | Set_Load_Tray_Buzzer(false); |
| | | Board_Control.IO_manager.Set_Output(OutputData.Buzzer_1_Relay, false); |
| | | |
| | | if(cim_mode == En_Cim_Mode.Online) |
| | | { |
| | | if (Alarm_Manager.Instance.Alarm_Status == En_Alarm_Status.HEAVY) |
| | | { |
| | | Set_Equipment_Status_Code(En_Equipment_Status_Code.T3); |
| | | Set_Equipment_Status_Code(En_Equipment_Status_Code.W4); |
| | | } |
| | | } |
| | | |
| | | Alarm_Manager.Instance.Alarm_Clear(); |
| | | } |
| | | } |
| | |
| | | { |
| | | Set_Unload_Tray_Buzzer(false); |
| | | Board_Control.IO_manager.Set_Output(OutputData.Buzzer_1_Relay, false); |
| | | |
| | | if (cim_mode == En_Cim_Mode.Online) |
| | | { |
| | | if (Alarm_Manager.Instance.Alarm_Status == En_Alarm_Status.HEAVY) |
| | | { |
| | | Set_Equipment_Status_Code(En_Equipment_Status_Code.T3); |
| | | Set_Equipment_Status_Code(En_Equipment_Status_Code.W4); |
| | | } |
| | | } |
| | | |
| | | Alarm_Manager.Instance.Alarm_Clear(); |
| | | unloader.LiftNg.Shuttle.Forward(); |
| | | } |
| | |
| | | |
| | | if (!Align_vision.isConnected) Alarm_Manager.Instance.Occurred(En_Alarm_List.AL_0510_ALIGN_VISION_DISCONNECT); |
| | | if (!Aoi_vision.isConnected) Alarm_Manager.Instance.Occurred(En_Alarm_List.AL_0511_AOI_VISION_DISCONNECT); |
| | | if (!power_meter.isOpen && !Alarm_Manager.Instance.Occured_List.Exists(X => X.Code == En_Alarm_List.AL_0930_POWER_METER_DISCONNECTED)) { Alarm_Manager.Instance.Occurred(En_Alarm_List.AL_0930_POWER_METER_DISCONNECTED); power_meter.Open(); } |
| | | if (!power_meter.isOpen && !Alarm_Manager.Instance.Occured_List.Exists(X => X.Code == En_Alarm_List.AL_0930_POWER_METER_DISCONNECTED)) |
| | | { |
| | | Alarm_Manager.Instance.Occurred(En_Alarm_List.AL_0930_POWER_METER_DISCONNECTED); |
| | | power_meter.Open(); |
| | | power_meter.HandShakingOn(); |
| | | } |
| | | |
| | | if (equip_mode == En_Equipment_Mode.Auto && dt.Second % 10 == 0 && (loader.Panel_Exist && before.Panel_Exist && process.Panel_Exist && after.Panel_Exist && unloader.Panel_Exist) && !units.Exists(x => x.sequenceChangedTime.Minute < 10)) |
| | | { |
| | |
| | | panel_count_info.CleaningCount = 0; |
| | | Panel_Count_Info_Manager.Instance.Save_Panel_Count_Info(panel_count_info); |
| | | } |
| | | |
| | | if(equip_mode != En_Equipment_Mode.Auto) // Auto mode가 아닐 때 |
| | | { |
| | | if(equip_mode == En_Equipment_Mode.Pause && units.Exists(x => x.UnitMode != equip_mode)) |
| | | { |
| | | // Pause wait 상태 일 때는 interlock 발생 X |
| | | } |
| | | else |
| | | { |
| | | |
| | | } |
| | | } |
| | | |
| | | // Laser On Interlock |
| | | // Power meter 위치 or 가공 위치가 아닐 때 Laser on시 Laser off 진행 후 Interlock. |
| | | |
| | | bool isInPosition = false; |
| | | |
| | | if (Cur_Main_Recipe != null && Cur_Main_Recipe.process_info != null && Cur_Main_Recipe.panel_type_info != null) |
| | | { |
| | | double scannerA1Position = Cur_Main_Recipe.process_info.Scanner_X_A1 + Cur_Main_Recipe.panel_type_info.Scanner_Offset_X_A1; |
| | | double scannerA2Position = Cur_Main_Recipe.process_info.Scanner_X_A2 + Cur_Main_Recipe.panel_type_info.Scanner_Offset_X_A2; |
| | | double scannerB1Position = Cur_Main_Recipe.process_info.Scanner_X_B1 + Cur_Main_Recipe.panel_type_info.Scanner_Offset_X_B1; |
| | | double scannerB2Position = Cur_Main_Recipe.process_info.Scanner_X_B2 + Cur_Main_Recipe.panel_type_info.Scanner_Offset_X_B2; |
| | | |
| | | double stageA1Position = Cur_Main_Recipe.process_info.Scanner_Y_A1 + Cur_Main_Recipe.panel_type_info.Scanner_Offset_Y_A1; |
| | | double stageA2Position = Cur_Main_Recipe.process_info.Scanner_Y_A2 + Cur_Main_Recipe.panel_type_info.Scanner_Offset_Y_A2; |
| | | double stageB1Position = Cur_Main_Recipe.process_info.Scanner_Y_B1 + Cur_Main_Recipe.panel_type_info.Scanner_Offset_Y_B1; |
| | | double stageB2Position = Cur_Main_Recipe.process_info.Scanner_Y_B2 + Cur_Main_Recipe.panel_type_info.Scanner_Offset_Y_B2; |
| | | |
| | | object value; |
| | | sm.Get_Value(RS_Automation_Motor_Address.Ablation_X_Actual_Position, out value); |
| | | double scannerPosition = double.Parse($"{value}"); |
| | | |
| | | sm.Get_Value(RS_Automation_Motor_Address.Ablation_Y_1_Actual_Position, out value); |
| | | double stageAPosition = double.Parse($"{value}"); |
| | | sm.Get_Value(RS_Automation_Motor_Address.Ablation_Y_2_Actual_Position, out value); |
| | | double stageBPosition = double.Parse($"{value}"); |
| | | |
| | | |
| | | isInPosition |= (scannerA1Position - 10 <= scannerPosition && scannerPosition <= scannerA1Position + 10) && (stageA1Position - 10 <= stageAPosition && stageAPosition <= stageA1Position + 10); |
| | | isInPosition |= (scannerA2Position - 10 <= scannerPosition && scannerPosition <= scannerA2Position + 10) && (stageA2Position - 10 <= stageAPosition && stageAPosition <= stageA2Position + 10); |
| | | isInPosition |= (scannerB1Position - 10 <= scannerPosition && scannerPosition <= scannerB1Position + 10) && (stageB1Position - 10 <= stageBPosition && stageBPosition <= stageB1Position + 10); |
| | | isInPosition |= (scannerB2Position - 10 <= scannerPosition && scannerPosition <= scannerB2Position + 10) && (stageB2Position - 10 <= stageBPosition && stageBPosition <= stageB2Position + 10); |
| | | |
| | | isInPosition |= process.ablation.Get_Is_Position_X_Power_Meter() && process.ablation.Get_Is_Position_Z_Power_Meter(); |
| | | } |
| | | else |
| | | { |
| | | isInPosition |= process.ablation.Get_Is_Position_X_Power_Meter() && process.ablation.Get_Is_Position_Z_Power_Meter(); |
| | | } |
| | | |
| | | if (isInPosition == false) |
| | | { |
| | | if (sm.Get_Bit(Input_Memory_Address.Laser_Active)) |
| | | { |
| | | scanner.Set_Laser_Off(); |
| | | Interlock_Manager.Add_Interlock_Msg("Laser can't on.", "Please move power meter position."); |
| | | } |
| | | } |
| | | |
| | | } |
| | | catch(Exception e) |
| | | { |
| | |
| | | return false; |
| | | } |
| | | |
| | | if(Door_Opened) |
| | | { |
| | | Interlock_Manager.Add_Interlock_Msg("Can't Change auto mode.", "Please door close."); |
| | | return false; |
| | | } |
| | | |
| | | if(!Is_Home_Complete) |
| | | { |
| | | Interlock_Manager.Add_Interlock_Msg("Can't Change auto mode.", "Please Set Home."); |