コード例 #1
0
        public TIC_BIN_DATA GetUTICMachineNumber(string Sn)
        {
            //"TIC_EQUIP_ID" = 58
            //"TIC_EVENT_DATE" = 59
            TIC_BIN_DATA ticdata = new TIC_BIN_DATA();

            lock (_lockObject)
            {
                string returnMcNo = string.Empty;
                int    autoretry  = 1;

                while (autoretry > 0)
                {
                    try
                    {
                        FisSession ses = _server.FisSessions();
                        ses.UnitType = FisApiServer.UNIT_HGA;

                        if (Sn == string.Empty)
                        {
                            Sn = "";
                        }

                        Recordset rec = ses.RequestRecordset(FisSession.REQUEST_ATTRIBUTE, Sn, "NA");
                        if (rec.RecordCount() > 0)
                        {
                            bool end                 = false;
                            bool isEquipfound        = false;
                            bool isEventDataFound    = false;
                            bool isDockSideDataFound = false;

                            rec.MoveTo(15);

                            while (!rec.Eof() && !end)
                            {
                                if (rec.Fields(rec.GetColumnName(0)).Value.ToUpper().Equals(TIC_BIN_DATA.TIC_PARAM_BIN.TIC_EQUIP_ID.ToString()))
                                {
                                    ticdata.EQUIP_ID = rec.Fields(rec.GetColumnName(1)).Value;
                                    isEquipfound     = true;
                                }
                                else if (rec.Fields(rec.GetColumnName(0)).Value.ToUpper().Equals(TIC_BIN_DATA.TIC_PARAM_BIN.TIC_EVENT_DATE.ToString()))
                                {
                                    ticdata.EVENT_DATE = rec.Fields(rec.GetColumnName(1)).Value;
                                    isEventDataFound   = true;
                                }
                                else if (rec.Fields(rec.GetColumnName(0)).Value.ToUpper().Equals(TIC_BIN_DATA.TIC_PARAM_BIN.DOCKSIDE.ToString()))
                                {
                                    ticdata.DOCK_SIDE   = rec.Fields(rec.GetColumnName(1)).Value;
                                    isDockSideDataFound = true;
                                    rec.MoveTo(50);
                                }
                                if (isEquipfound && isEventDataFound && isDockSideDataFound)
                                {
                                    rec.MoveLast();
                                    rec.Eof();
                                    end       = true;
                                    autoretry = 0;
                                }
                                else
                                {
                                    rec.MoveNext();
                                }
                                Thread.Sleep(10);
                            }
                        }
                        ses.CloseSession();
                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message);
                    }
                    autoretry--;
                }
                return(ticdata);
            }
        }
コード例 #2
0
        public bool GetSLDR_PARAM_BIN_Data(SLDR_PARAM_BIN_DATA sldr_param_bin, string serialNumber)
        {
            lock (_lockObject)
            {
                bool returnGet = false;
                int  autoretry = 2;

                while (autoretry > 0)
                {
                    try
                    {
                        FisSession ses = _server.FisSessions();
                        ses.UnitType = FisApiServer.UNIT_DRIVE;

                        if (serialNumber == string.Empty)
                        {
                            serialNumber = "";
                        }

                        ses.Request(FisSession.REQUEST_HGA_COHRES, "ATTR", serialNumber, "HEDNUM");
                        ses.SendRequests();

                        RecordsetCollection rsc = ses.RecordsetCollections();

                        if (rsc.RecordsetCount() > 0)
                        {
                            Recordset rec = rsc.Recordsets("ATTR");

                            if (rec.RecordCount() > 0)
                            {
                                autoretry = 0;

                                sldr_param_bin.DATE_TIME          = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.DATE_TIME).Value;
                                sldr_param_bin.SLDR_LOT_ID        = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_LOT_ID).Value;
                                sldr_param_bin.SLDR_MTF_NUM       = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_MTF_NUM).Value;
                                sldr_param_bin.SLDR_BIN           = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_BIN).Value;
                                sldr_param_bin.SLDR_DATA_SOURCE   = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_DATA_SOURCE).Value;
                                sldr_param_bin.SLDR_F1            = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_F1).Value;
                                sldr_param_bin.SLDR_RES           = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_RES).Value;
                                sldr_param_bin.SLDR_ASYM          = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_ASYM).Value;
                                sldr_param_bin.SLDR_ADC           = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_ADC).Value;
                                sldr_param_bin.SLDR_BP            = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_BP).Value;
                                sldr_param_bin.SLDR_WPE           = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_WPE).Value;
                                sldr_param_bin.PRB_TP_WDTH        = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.PRB_TP_WDTH).Value;
                                sldr_param_bin.SLDR_PART_NUM      = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_PART_NUM).Value;
                                sldr_param_bin.SLDR_TAB           = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_TAB).Value;
                                sldr_param_bin.SLDR_AKL_BP        = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_AKL_BP).Value;
                                sldr_param_bin.SLDR_TAD_RES       = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_TAD_RES).Value;
                                sldr_param_bin.SLDR_RES_RD2       = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_RES_RD2).Value;
                                sldr_param_bin.ET_DISPOSITION     = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.ET_DISPOSITION).Value;
                                sldr_param_bin.TST_STATUS         = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.ET_TST_STATUS).Value;
                                sldr_param_bin.WAF_RDR_HTR_RES    = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.WAF_RDR_HTR_RES).Value;
                                sldr_param_bin.WAF_TAD_RES        = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.WAF_TAD_RES).Value;
                                sldr_param_bin.WAF_WTR_HTR_RES    = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.WAF_WTR_HTR_RES).Value;
                                sldr_param_bin.WAF_WTR_RES        = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.WAF_WTR_RES).Value;
                                sldr_param_bin.ISI_AMP_AT_ET      = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_F1).Value;
                                sldr_param_bin.ISI_ASYM_AT_ET     = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_ASYM).Value;
                                sldr_param_bin.ISI_RES_AT_ET      = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_RES).Value;
                                sldr_param_bin.ET_WRT1_RES        = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.ET_WRT1_RES).Value;
                                sldr_param_bin.ET_WRT2_RES        = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.ET_WRT2_RES).Value;
                                sldr_param_bin.ET_RD1_RES         = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.ET_RD1_RES).Value;
                                sldr_param_bin.ET_RD2_RES         = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.ET_RD2_RES).Value;
                                sldr_param_bin.SLDR_F1_RD2        = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_F1_RD2).Value;
                                sldr_param_bin.SLDR_ASYM_RD2      = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SLDR_ASYM_RD2).Value;
                                sldr_param_bin.ISI_RD_IBS_PATTERN = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.RD_IBS_PATTERN).Value;
                                sldr_param_bin.ISI_WR_IBS_PATTERN = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.WR_IBS_PATTERN).Value;
                                sldr_param_bin.ET_LAS_THRESHOLD   = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.ET_LAS_THRESHOLD).Value;
                                if (sldr_param_bin.ISI_RD_IBS_PATTERN == "?")
                                {
                                    sldr_param_bin.ISI_RD_IBS_PATTERN = "A";
                                }
                                if (sldr_param_bin.ISI_WR_IBS_PATTERN == "?")
                                {
                                    sldr_param_bin.ISI_WR_IBS_PATTERN = "1";
                                }
                                if (string.IsNullOrEmpty(sldr_param_bin.ET_RD1_RES))
                                {
                                    sldr_param_bin.ET_RD1_RES = "0";
                                }
                                if (string.IsNullOrEmpty(sldr_param_bin.ET_RD2_RES))
                                {
                                    sldr_param_bin.ET_RD2_RES = "0";
                                }
                                var testget = rec.Fields((int)SLDR_PARAM_BIN_DATA.SLDR_PARAM_BIN.SETS_PRFL_RECORD).Value;
                                CheckSLDRDataFormater(sldr_param_bin);

                                if (sldr_param_bin.TST_STATUS == string.Empty)
                                {
                                    Log.Info("Get sort number error SN={0}", serialNumber);
                                }
                                returnGet = true;
                            }
                            else
                            {
                                autoretry--;
                                Thread.Sleep(300);
                            }
                        }
                        else
                        {
                            autoretry--;
                            Thread.Sleep(300);
                        }
                        ses.CloseSession();
                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message);
                    }
                }
                return(returnGet);
            }
        }