コード例 #1
0
        //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] = "-";
            }
        }
コード例 #2
0
        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);
        }