From dd06a37c5c3249db1b6d51d32782e7f027baf7c7 Mon Sep 17 00:00:00 2001 From: 천호석 <g> Date: 월, 22 5월 2023 16:12:48 +0900 Subject: [PATCH] Vision send, receive 로그 추가. --- SA_LTT_UI/SA_LTT/Log/EquipmentLogManager.cs | 8 +++++++- SA_LTT_UI/SA_LTT/Module/VisionControl.cs | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/SA_LTT_UI/SA_LTT/Log/EquipmentLogManager.cs b/SA_LTT_UI/SA_LTT/Log/EquipmentLogManager.cs index d5722b1..0634a32 100644 --- a/SA_LTT_UI/SA_LTT/Log/EquipmentLogManager.cs +++ b/SA_LTT_UI/SA_LTT/Log/EquipmentLogManager.cs @@ -36,7 +36,7 @@ LogCreater _preAlignLog = new LogCreater("PreAlign", s_preAlignLogPath); LogCreater _energyMeterLog = new LogCreater("EnergyMeter", s_energyMeterLogPath); LogCreater _energyMeasureLog = new LogCreater("EnergyMeasure", s_energyMeasureLogPath); - + LogCreater _visionLog = new LogCreater("Vision", s_visionLogPath); private EquipmentLogManager() { @@ -57,6 +57,7 @@ public static readonly string s_preAlignLogPath = $@"D:\Log\PreAlign\"; public static readonly string s_energyMeterLogPath = $@"D:\Log\EnergyMeter\"; public static readonly string s_energyMeasureLogPath = $@"D:\Log\EnergyMeasure\"; + public static readonly string s_visionLogPath = $@"D:\Log\Vision\"; public void WriteExceptionLog(string message) { @@ -118,5 +119,10 @@ { _energyMeasureLog.WriteLog(message); } + + public void WriteVisionLog(string message) + { + _visionLog.WriteLog(message); + } } } diff --git a/SA_LTT_UI/SA_LTT/Module/VisionControl.cs b/SA_LTT_UI/SA_LTT/Module/VisionControl.cs index 5a4c2fd..7c6398f 100644 --- a/SA_LTT_UI/SA_LTT/Module/VisionControl.cs +++ b/SA_LTT_UI/SA_LTT/Module/VisionControl.cs @@ -374,6 +374,7 @@ CommnadAcks[VisionToControlCommand.VisionReadyAck] = false; CommnadAcks[VisionToControlCommand.InspReadyEnd] = false; + EquipmentLogManager.Instance.WriteVisionLog($"Send Vision Ready, recipe name : {recipeName}"); return SendData(sendData.ToArray()); } @@ -386,6 +387,7 @@ sendData.InsertRange(sendData.Count, BitConverter.GetBytes((short)ControlToVisionCommand.InspReadyEndAck)); sendData.InsertRange(sendData.Count, body); + EquipmentLogManager.Instance.WriteVisionLog($"Send Insp Ready End Ack"); return SendData(sendData.ToArray()); } @@ -401,6 +403,7 @@ CommnadAcks[VisionToControlCommand.WaferDetectionReadyAck] = false; CommnadAcks[VisionToControlCommand.WaferDetectionReadyEnd] = false; + EquipmentLogManager.Instance.WriteVisionLog($"Send Wafer Detection Ready"); return SendData(sendData.ToArray()); } @@ -413,6 +416,7 @@ sendData.InsertRange(sendData.Count, BitConverter.GetBytes((short)ControlToVisionCommand.WaferDetectionReadyEndAck)); sendData.InsertRange(sendData.Count, body); + EquipmentLogManager.Instance.WriteVisionLog($"Send Wafer Detection End Ack"); return SendData(sendData.ToArray()); } @@ -428,6 +432,7 @@ CommnadAcks[VisionToControlCommand.WaferDetectionStartAck] = false; CommnadAcks[VisionToControlCommand.WaferDetectionResult] = false; + EquipmentLogManager.Instance.WriteVisionLog($"Send Wafer Detection Start"); return SendData(sendData.ToArray()); } @@ -440,6 +445,7 @@ sendData.InsertRange(sendData.Count, BitConverter.GetBytes((short)ControlToVisionCommand.WaferDetectionResultAck)); sendData.InsertRange(sendData.Count, body); + EquipmentLogManager.Instance.WriteVisionLog($"Send Wafer Detection Result Ack"); return SendData(sendData.ToArray()); } @@ -460,6 +466,7 @@ CommnadAcks[VisionToControlCommand.RecipeChangeSwitchAck] = false; CommnadAcks[VisionToControlCommand.RecipeChangeUpdate] = false; + EquipmentLogManager.Instance.WriteVisionLog($"Send Recipe Switch, recipe name : {recipeName}"); return SendData(sendData.ToArray()); } @@ -472,6 +479,7 @@ sendData.InsertRange(sendData.Count, BitConverter.GetBytes((short)ControlToVisionCommand.RecipeUpdateAck)); sendData.InsertRange(sendData.Count, body); + EquipmentLogManager.Instance.WriteVisionLog($"Send Recipe UpdateAck"); return SendData(sendData.ToArray()); } @@ -486,6 +494,7 @@ CommnadAcks[VisionToControlCommand.Alarm] = false; + EquipmentLogManager.Instance.WriteVisionLog($"Send Alarm Ack"); return SendData(sendData.ToArray()); } @@ -499,6 +508,8 @@ sendData.InsertRange(sendData.Count, body); CommnadAcks[VisionToControlCommand.AliveAck] = false; + + EquipmentLogManager.Instance.WriteVisionLog($"Send Request Alive"); return SendData(sendData.ToArray()); } @@ -545,6 +556,7 @@ string resultRecipeName = BitConverter.ToString(recipeName, 0); + EquipmentLogManager.Instance.WriteVisionLog($"Receive Insp Ready End, recipe name : {recipeName} "); value = new InspReadyEnd(resultRecipeName); } @@ -578,6 +590,7 @@ resultY = -resultY; + EquipmentLogManager.Instance.WriteVisionLog($"Receive Wafer Detection Result, result : {result}, X : {resultX}, Y : {resultY}, T : {resultT} "); value = new WaferDetectionResult(result, resultX, resultY, resultT); } @@ -596,6 +609,8 @@ copylength += byteResult.Length; int result = BitConverter.ToInt32(byteResult, 0); + + EquipmentLogManager.Instance.WriteVisionLog($"Receive Recipe Switch Ack, result : {result} "); value = new RecipeSwitchAck(result); } @@ -614,7 +629,8 @@ copylength += recipeName.Length; string resultRecipeName = BitConverter.ToString(recipeName, 0); - + + EquipmentLogManager.Instance.WriteVisionLog($"Receive Recipe Update, recipe name : {recipeName} "); value = new RecipeUpdate(resultRecipeName); } @@ -634,6 +650,7 @@ int alarmCode = BitConverter.ToInt32(byteAlarmCode, 0); + EquipmentLogManager.Instance.WriteVisionLog($"Receive Alarm, alarm code : {alarmCode} "); value = new AlarmOccured(alarmCode); } @@ -653,6 +670,7 @@ int result = BitConverter.ToInt32(byteResult, 0); + EquipmentLogManager.Instance.WriteVisionLog($"Receive Alive Ack, result : {result} "); value = new AliveAck(result); } } -- Gitblit v1.9.3