From f0839d9fdd9dc74eef0eafc5562fabf9d7259f08 Mon Sep 17 00:00:00 2001
From: 천호석 <hosuk1418@naver.com>
Date: 수, 14 12월 2022 17:46:40 +0900
Subject: [PATCH] 1. Laser on 시 Stage position도 같이 확인 하도록 변경. 2. Auto power 측정, Manual power 측정  전후  Scanner Z 축 대기 위치 이동 하도록 수정 3. 프로그램 종료 시 Laser off 하도록 수정. 종료 대기시간 5sec

---
 SHARP_CLAS_UI/500.Equipment/400.Module/000.Vision/Vision_Control.cs |   43 +++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/SHARP_CLAS_UI/500.Equipment/400.Module/000.Vision/Vision_Control.cs b/SHARP_CLAS_UI/500.Equipment/400.Module/000.Vision/Vision_Control.cs
index c615bca..48d1ebe 100644
--- a/SHARP_CLAS_UI/500.Equipment/400.Module/000.Vision/Vision_Control.cs
+++ b/SHARP_CLAS_UI/500.Equipment/400.Module/000.Vision/Vision_Control.cs
@@ -473,6 +473,49 @@
             Ack = new MeasurementResultAck(Result_MsgIndex, Result_ModuleIdx, Result_MeasureResult, Result_Mark1Point1, Result_Mark1Point2, Result_Mark2Point1, Result_Mark2Point2, Result_Mark3Point1, Result_Mark3Point2, Result_Mark4Point1, Result_Mark4Point2, Result_MarkDistance, Result_AlignResult);
         }
 
+        public void Recv_WidthMeasurement_Result(byte[] Recvdata, out WidthMeasurementResultAck Ack)
+        {
+            byte[] size = new byte[4];
+            byte[] command = new byte[2];
+            byte[] MsgIndex = new byte[4]; //TimeStamp (HHMMSSmsmsms)
+            byte[] ModuleIdx = new byte[4]; //移대찓�씪 Module Idx (0: Left, 1: Right)
+            byte[] MeasureResult = new byte[4]; //0 : Fail, 1 : Success
+            byte[] Mark1Width = new byte[8]; //Mark1�쓽 �꼻�씠
+            byte[] Mark2Width = new byte[8]; //Mark2�쓽 �꼻�씠
+            byte[] Mark3Width = new byte[8]; //Mark1�쓽 �꼻�씠
+            byte[] Mark4Width = new byte[8]; //Mark2�쓽 �꼻�씠
+
+            int copylength = 0;
+            Array.Copy(Recvdata, size, size.Length);
+            copylength += size.Length;
+            Array.Copy(Recvdata, copylength, command, 0, command.Length);
+            copylength += command.Length;
+            Array.Copy(Recvdata, copylength, MsgIndex, 0, MsgIndex.Length);
+            copylength += MsgIndex.Length;
+            Array.Copy(Recvdata, copylength, ModuleIdx, 0, ModuleIdx.Length);
+            copylength += ModuleIdx.Length;
+            Array.Copy(Recvdata, copylength, MeasureResult, 0, MeasureResult.Length);
+            copylength += MeasureResult.Length;
+            Array.Copy(Recvdata, copylength, Mark1Width, 0, Mark1Width.Length);
+            copylength += Mark1Width.Length;
+            Array.Copy(Recvdata, copylength, Mark2Width, 0, Mark2Width.Length);
+            copylength += Mark2Width.Length;
+            Array.Copy(Recvdata, copylength, Mark3Width, 0, Mark3Width.Length);
+            copylength += Mark3Width.Length;
+            Array.Copy(Recvdata, copylength, Mark4Width, 0, Mark4Width.Length);
+            copylength += Mark4Width.Length;
+
+            int Result_MsgIndex = BitConverter.ToInt32(MsgIndex, 0);
+            int Result_ModuleIdx = BitConverter.ToInt32(ModuleIdx, 0);
+            int Result_MeasureResult = BitConverter.ToInt32(MeasureResult, 0);
+            double Result_Mark1Width = BitConverter.ToDouble(Mark1Width, 0);
+            double Result_Mark2Width = BitConverter.ToDouble(Mark2Width, 0);
+            double Result_Mark3Width = BitConverter.ToDouble(Mark3Width, 0);
+            double Result_Mark4Width = BitConverter.ToDouble(Mark4Width, 0);
+
+            Ack = new WidthMeasurementResultAck(Result_MsgIndex, Result_ModuleIdx, Result_MeasureResult, Result_Mark1Width, Result_Mark2Width, Result_Mark3Width, Result_Mark4Width);
+        }
+
         public void Recv_Fine_Align_Result(byte[] Recvdata, out FineAlignResultAck Ack)
         {
             byte[] size = new byte[4];

--
Gitblit v1.9.3