//LDH, 2018.10.01, Result clear public void ClearResult(bool _DUMMYFlag, string _LotNum, string _InDataPath, string _OutDataPath) { TotalCount = 0; GoodCount = 0; NgCount = 0; Yield = 0.0; if (_DUMMYFlag) { OriginDummyCount = 0; InputDummyCount = 0; } CodeErrCount = 0; BlankErrCount = 0; MixErrCount = 0; ControlInvoke.GradientLabelText(gradientLabelResult, "-", Color.Black); ControlInvoke.GradientLabelText(gradientLabelDataMatrix, "-", Color.Black); DateTime datetime = DateTime.Now; SegmentValueInvoke(SevenSegTotal, TotalCount.ToString()); SegmentValueInvoke(SevenSegGood, GoodCount.ToString()); SegmentValueInvoke(SevenSegNg, NgCount.ToString()); SegmentValueInvoke(SevenSegInputDummy, InputDummyCount.ToString()); SegmentValueInvoke(SevenSegOriginDummy, OriginDummyCount.ToString()); SegmentValueInvoke(SevenSegYield, Yield.ToString()); SegmentValueInvoke(SevenSegCodeErr, CodeErrCount.ToString()); SegmentValueInvoke(SevenSegBlankErr, BlankErrCount.ToString()); SegmentValueInvoke(SevenSegMixErr, MixErrCount.ToString()); InDataList.Clear(); OutDataList.Clear(); InDataLimitCount = 0; LOTType = ""; NowLotSeparateNum = ""; OperatorName = ""; MCNum = ""; NowInspectionID = ""; InspectionTime = ""; //LDH, 2018.09.27, InData List NowLotNum = _LotNum; InDataFolderPath = _InDataPath; OutDataFolderPath = _OutDataPath; //LDH, 2018.08.13, Hitory Parameter용 배열 초기화 HistoryParam = new string[4]; for (int iLoopCount = 0; iLoopCount < HistoryParam.Count(); iLoopCount++) { HistoryParam[iLoopCount] = "-"; } }
public void SetNoneResultData(SendResultParameter _ResultParam) { var _Result = _ResultParam.SendResult as SendNoneResult; if (_Result != null) { if (_ResultParam.IsGood) { if (CParameterManager.SystemMode == eSysMode.AUTO_MODE) { TotalCount++; GoodCount++; Yield = (double)GoodCount / (double)TotalCount * 100; SegmentValueInvoke(SevenSegTotal, TotalCount.ToString()); SegmentValueInvoke(SevenSegGood, GoodCount.ToString()); SegmentValueInvoke(SevenSegYield, Yield.ToString("F2")); } LastResult = "GOOD"; ControlInvoke.GradientLabelText(gradientLabelResult, "GOOD", Color.Lime); } else { if (CParameterManager.SystemMode == eSysMode.AUTO_MODE) { TotalCount++; NgCount++; Yield = (double)GoodCount / (double)TotalCount * 100; SegmentValueInvoke(SevenSegTotal, TotalCount.ToString()); SegmentValueInvoke(SevenSegNg, NgCount.ToString()); SegmentValueInvoke(SevenSegYield, Yield.ToString("F2")); } if (eNgType.NONE == _ResultParam.NgType) { LastResult = "NG"; ControlInvoke.GradientLabelText(gradientLabelResult, "NG", Color.Red); } else { LastResult = "NG"; ControlInvoke.GradientLabelText(gradientLabelResult, "NG", Color.Red); } } } SaveResultCount(); InspectionHistory(_ResultParam.ID, LastResult); }
public void SetLeadResultData(SendResultParameter _ResultParam) { var _Result = _ResultParam.SendResult as SendLeadResult; if (_Result != null) { for (int iLoopCount = 0; iLoopCount < _Result.LeadCount; ++iLoopCount) { double _Angle = _Result.LeadAngle[iLoopCount] * 180 / Math.PI; if (_Angle > 0) { _Angle = 90 - (_Result.LeadAngle[iLoopCount] * 180 / Math.PI); } else { _Angle = -(90 + (_Result.LeadAngle[iLoopCount] * 180 / Math.PI)); } QuickGridViewLeadResult[1, iLoopCount].Value = _Angle.ToString("F3"); QuickGridViewLeadResult[2, iLoopCount].Value = _Result.LeadWidthReal[iLoopCount].ToString("F3"); QuickGridViewLeadResult[3, iLoopCount].Value = _Result.LeadLengthReal[iLoopCount].ToString("F3"); if (_Result.IsLeadBendGood[iLoopCount] && iLoopCount % 2 == 0) { QuickGridViewLeadResult[1, iLoopCount].Style.BackColor = Color.PowderBlue; } else if (_Result.IsLeadBendGood[iLoopCount] && iLoopCount % 2 == 1) { QuickGridViewLeadResult[1, iLoopCount].Style.BackColor = Color.White; } else { QuickGridViewLeadResult[1, iLoopCount].Style.BackColor = Color.Red; } } if (_ResultParam.IsGood) { if (CParameterManager.SystemMode == eSysMode.AUTO_MODE) { TotalCount++; GoodCount++; Yield = (double)GoodCount / (double)TotalCount * 100; SegmentValueInvoke(SevenSegTotal, TotalCount.ToString()); SegmentValueInvoke(SevenSegGood, GoodCount.ToString()); SegmentValueInvoke(SevenSegYield, Yield.ToString("F2")); } LastResult = "GOOD"; ControlInvoke.GradientLabelText(gradientLabelResult, "GOOD", Color.Lime); } else { if (CParameterManager.SystemMode == eSysMode.AUTO_MODE) { TotalCount++; NgCount++; Yield = (double)GoodCount / (double)TotalCount * 100; SegmentValueInvoke(SevenSegTotal, TotalCount.ToString()); SegmentValueInvoke(SevenSegNg, NgCount.ToString()); SegmentValueInvoke(SevenSegYield, Yield.ToString("F2")); } if (eNgType.LEAD_BENT == _ResultParam.NgType) { LastResult = "LEAD BENT"; ControlInvoke.GradientLabelText(gradientLabelResult, "LEAD BENT", Color.Red); } else if (eNgType.LEAD_CNT == _ResultParam.NgType) { LastResult = "LEAD COUNT"; ControlInvoke.GradientLabelText(gradientLabelResult, "LEAD COUNT", Color.Red); } } } SaveResultCount(); InspectionHistory(_ResultParam.ID, LastResult); QuickGridViewLeadResult.ClearSelection(); }
public void SetNeedleResultData(SendResultParameter _ResultParam) { if (_ResultParam.ID == 0) //Needle Align Vision1 { var _Result = _ResultParam.SendResult as SendNeedleAlignResult; if (_Result != null) { ControlInvoke.GradientLabelText(gradientLabelNeedleAlignX1, _Result.AlignX.ToString("F3")); ControlInvoke.GradientLabelText(gradientLabelNeedleAlignY1, _Result.AlignY.ToString("F3")); } else { ControlInvoke.GradientLabelText(gradientLabelNeedleAlignX1, "-"); ControlInvoke.GradientLabelText(gradientLabelNeedleAlignY1, "-"); } if (_ResultParam.IsGood) { LastResult = "GOOD"; ControlInvoke.GradientLabelText(gradientLabelNeedleAlignX1, Color.Black, Color.White); ControlInvoke.GradientLabelText(gradientLabelNeedleAlignY1, Color.Black, Color.White); ControlInvoke.GradientLabelText(gradientLabelResult, "GOOD", Color.Lime); } else { if (eNgType.NDL_FIND == _ResultParam.NgType) { LastResult = "Not Found"; } else if (eNgType.NDL_CENTER == _ResultParam.NgType) { LastResult = "Not Found"; } ControlInvoke.GradientLabelText(gradientLabelNeedleAlignX1, Color.White, Color.Red); ControlInvoke.GradientLabelText(gradientLabelNeedleAlignY1, Color.White, Color.Red); ControlInvoke.GradientLabelText(gradientLabelResult, "Not Found", Color.Red); } } else if (_ResultParam.ID == 1) //Needle Align Vision2 { var _Result = _ResultParam.SendResult as SendNeedleAlignResult; if (_Result != null) { ControlInvoke.GradientLabelText(gradientLabelNeedleAlignX2, _Result.AlignX.ToString("F3")); ControlInvoke.GradientLabelText(gradientLabelNeedleAlignY2, _Result.AlignY.ToString("F3")); } else { ControlInvoke.GradientLabelText(gradientLabelNeedleAlignX2, "-"); ControlInvoke.GradientLabelText(gradientLabelNeedleAlignY2, "-"); } if (_ResultParam.IsGood) { LastResult = "GOOD"; ControlInvoke.GradientLabelText(gradientLabelNeedleAlignX2, Color.Black, Color.White); ControlInvoke.GradientLabelText(gradientLabelNeedleAlignY2, Color.Black, Color.White); ControlInvoke.GradientLabelText(gradientLabelResult, "GOOD", Color.Lime); } else { if (eNgType.NDL_FIND == _ResultParam.NgType) { LastResult = "Not Found"; } else if (eNgType.NDL_CENTER == _ResultParam.NgType) { LastResult = "Not Found"; } ControlInvoke.GradientLabelText(gradientLabelNeedleAlignX2, Color.White, Color.Red); ControlInvoke.GradientLabelText(gradientLabelNeedleAlignY2, Color.White, Color.Red); ControlInvoke.GradientLabelText(gradientLabelResult, "Not Found", Color.Red); } } else { //LOG CLogManager.AddInspectionLog(CLogManager.LOG_TYPE.INFO, "ucMainResultLead - SetNeedleData ID Match Error", CLogManager.LOG_LEVEL.LOW); } InspectionHistory(_ResultParam.ID, LastResult); }
public void SetResultData(SendResultParameter _ResultParam) { string _DataMatrixString = "-"; var _Result = _ResultParam.SendResult as SendIDResult; if (_Result != null) { _DataMatrixString = (_ResultParam.IsGood == true) ? _Result.ReadCode : "-----"; } else { _DataMatrixString = "-"; } ControlInvoke.GradientLabelText(gradientLabelDataMatrix, _DataMatrixString); DateTime dateTime = DateTime.Now; InspectionTime = String.Format("{0:D2}{1:D2}{2:D2}{3:D3}", dateTime.Hour, dateTime.Minute, dateTime.Second, dateTime.Millisecond); if (_ResultParam.IsGood) { LastResult = "GOOD"; if (eNgType.DUMMY == _ResultParam.NgType) { LastResult = "DUMMY"; } else if (_Result == null) { if (NowLotSeparateNum != "NO") { LastResult = "CODE NG"; } } else { if (NowLotSeparateNum != "NO") { NowInspectionID = _DataMatrixString; LastResult = SetOutData(); } } if (LastResult == "OK") { ControlInvoke.GradientLabelText(gradientLabelResult, LastResult, Color.Lime); } else if (LastResult == "DUMMY") { ControlInvoke.GradientLabelText(gradientLabelResult, LastResult, Color.Lime); } else if (LastResult == "GOOD") { ControlInvoke.GradientLabelText(gradientLabelResult, LastResult, Color.Lime); } else { ControlInvoke.GradientLabelText(gradientLabelResult, LastResult, Color.Red); } if (LastResult != "GOOD" && LastResult != "OK" && LastResult != "DUMMY") { _ResultParam.IsGood = false; _ResultParam.NgType = eNgType.ID; } if (AutoModeFlag) { if (LastResult == "DUMMY") { InputDummyCount++; SegmentValueInvoke(SevenSegInputDummy, InputDummyCount.ToString()); } else { TotalCount++; if (_ResultParam.IsGood) { GoodCount++; } else { NgCount++; } Yield = (double)GoodCount / (double)TotalCount * 100; SegmentValueInvoke(SevenSegTotal, TotalCount.ToString()); SegmentValueInvoke(SevenSegGood, GoodCount.ToString()); SegmentValueInvoke(SevenSegNg, NgCount.ToString()); SegmentValueInvoke(SevenSegYield, Yield.ToString("F2")); } } } else { if (AutoModeFlag) { TotalCount++; NgCount++; Yield = (double)GoodCount / (double)TotalCount * 100; SegmentValueInvoke(SevenSegTotal, TotalCount.ToString()); SegmentValueInvoke(SevenSegNg, NgCount.ToString()); SegmentValueInvoke(SevenSegYield, Yield.ToString("F2")); } //gradientLabelDataMatrix if (eNgType.ID == _ResultParam.NgType) { if (AutoModeFlag) { CodeErrCount++; SegmentValueInvoke(SevenSegCodeErr, CodeErrCount.ToString()); } LastResult = "CODE NG"; } else if (eNgType.EMPTY == _ResultParam.NgType) { if (AutoModeFlag) { BlankErrCount++; SegmentValueInvoke(SevenSegBlankErr, BlankErrCount.ToString()); } LastResult = "EMPTY"; } else if (eNgType.REF_NG == _ResultParam.NgType) { if (AutoModeFlag) { MixErrCount++; SegmentValueInvoke(SevenSegMixErr, MixErrCount.ToString()); } LastResult = "MIX NG"; } else { LastResult = "CODE NG"; } ControlInvoke.GradientLabelText(gradientLabelResult, LastResult, Color.Red); } this.Refresh(); SaveResultCount(); InspectionHistory(_DataMatrixString); }