From 58a2c7fa01a617e6de69b85905bb645f08fac656 Mon Sep 17 00:00:00 2001
From: 천호석 <hosuk1418@naver.com>
Date: 화, 06 12월 2022 13:51:35 +0900
Subject: [PATCH]  Auto & Manual 상태 일 때 power meter 측정 위치 및 가공 위치에서만 Laser on 할 수 있도록 Interlock 추가

---
 SHARP_CLAS_UI/100.Screen/Form_Main.cs |   15 +++++++++++++--
 1 files changed, 13 insertions(+), 2 deletions(-)

diff --git a/SHARP_CLAS_UI/100.Screen/Form_Main.cs b/SHARP_CLAS_UI/100.Screen/Form_Main.cs
index 99c8b9a..5980e68 100644
--- a/SHARP_CLAS_UI/100.Screen/Form_Main.cs
+++ b/SHARP_CLAS_UI/100.Screen/Form_Main.cs
@@ -22,7 +22,8 @@
         public int ULD_Tray_Empty_Count;
         public int ULD_Tray_Ok_Count;
         public int ULD_Tray_Ng_Count;
-        
+        public int Width_Measurement_Count;
+
         bool update_check;
         #endregion
 
@@ -177,7 +178,15 @@
         {
             if (_Parent._equip.Door_Opened)
             {
-                Interlock_Manager.Add_Interlock_Msg("Key switch can't change.", "Door is opened");
+                MessageBox.Show("Key switch can't change, Door is opened.");
+                //Interlock_Manager.Add_Interlock_Msg("Key switch can't change.", "Door is opened");
+                return;
+            }
+
+            if (_Parent._equip.equip_mode == En_Equipment_Mode.Auto && _Parent.sm.Get_Bit(Output_Memory_Address.Safety_Mode_SW_Unlock) == false)
+            {
+                MessageBox.Show("Key switch can't change, Equipment mode is Auto");
+                //Interlock_Manager.Add_Interlock_Msg("Key switch can't change.", "Equipment mode is Auto");
                 return;
             }
 
@@ -438,6 +447,8 @@
                     ULD_Tray_Ok_Count = int.Parse($"{value}");
                 if (_Parent.sm.Get_Value(Process_Memory_Address.ULD_Tray_Ng_Count, out value))
                     ULD_Tray_Ng_Count = int.Parse($"{value}");
+                if (_Parent.sm.Get_Value(Process_Memory_Address.Width_Measurement_Count, out value))
+                    Width_Measurement_Count = int.Parse($"{value}");
             }
             catch (Exception)
             {

--
Gitblit v1.9.3