| | |
| | | } |
| | | else |
| | | { |
| | | if (process.ablation.Get_Is_Position_X_Power_Meter() && process.ablation.Get_Is_Position_Z_Power_Meter()) |
| | | |
| | | } |
| | | } |
| | | |
| | | // Laser On Interlock |
| | | // Power meter 위치 or 가공 위치가 아닐 때 Laser on시 Laser off 진행 후 Interlock. |
| | | 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; |
| | | |
| | | object value; |
| | | sm.Get_Value(Position_Parameter_Address.Scanner_X_Power_Meter_Position, out value); |
| | | double scannerPosition = double.Parse($"{value}"); |
| | | |
| | | bool isInPosition = false; |
| | | |
| | | isInPosition |= scannerA1Position - 10 <= scannerPosition && scannerPosition <= scannerA1Position + 10; |
| | | isInPosition |= scannerA2Position - 10 <= scannerPosition && scannerPosition <= scannerA2Position + 10; |
| | | isInPosition |= scannerB1Position - 10 <= scannerPosition && scannerPosition <= scannerB1Position + 10; |
| | | isInPosition |= scannerB2Position - 10 <= scannerPosition && scannerPosition <= scannerB2Position + 10; |
| | | 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)) |
| | | { |
| | | 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."); |
| | | } |
| | | scanner.Set_Laser_Off(); |
| | | Interlock_Manager.Add_Interlock_Msg("Laser can't on.", "Please move power meter position."); |
| | | } |
| | | } |
| | | } |
| | | else |
| | | { |
| | | bool isInPosition = false; |
| | | 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) |
| | | { |