示例#1
0
        //Serial통신
        //static public RS232_3310g         Barcord = new RS232_3310g        (4, "Barcord"   );
        public static void Init()
        {
            SM.TPara Para;
            Para.sParaFolderPath = Directory.GetCurrentDirectory() + "\\Util\\";
            Para.iWidth          = 1280;
            Para.iHeight         = 863;
            Para.bTabHides       = new bool[6];

            Para.bUseErrPic   = true;
            Para.iCntErr      = 60;
            Para.iCntDIn      = (int)xi.MAX_INPUT;
            Para.iCntDOut     = (int)yi.MAX_OUTPUT;
            Para.iCntCylinder = (int)ci.MAX_ACTR;
            Para.iCntMotr     = (int)mi.MAX_MOTR;
            Para.eLanSel      = EN_LAN_SEL.English;
            Para.eDio         = EN_DIO_SEL.AXL;
            Para.eMotors      = new EN_MOTR_SEL[Para.iCntMotr];

            Para.eMotors[0] = EN_MOTR_SEL.AXL;
            Para.eMotors[1] = EN_MOTR_SEL.AXL;
            Para.eMotors[2] = EN_MOTR_SEL.AXL;
            Para.eMotors[3] = EN_MOTR_SEL.AXL;
            Para.eMotors[4] = EN_MOTR_SEL.AXL;
            Para.eMotors[5] = EN_MOTR_SEL.AXL;
            Para.eMotors[6] = EN_MOTR_SEL.AXL;
            Para.eMotors[7] = EN_MOTR_SEL.AXL;
            Para.eMotors[8] = EN_MOTR_SEL.AXL;

            //AI TAB 2
            Para.eAio       = EN_AIO_SEL.AXL;
            Para.iCntAIn    = 0;
            Para.iCntAOut   = 0;
            Para.iRangeAMin = 0;
            Para.iRangeAMax = 0;

            SM.Init(Para);
            OM.Init();
            DM.Init();
            LOT.Init();
            SPC.Init();

            uint[] uaPstnCnt = { (uint)pv.MAX_PSTN_MOTR0,
                                 (uint)pv.MAX_PSTN_MOTR1,
                                 (uint)pv.MAX_PSTN_MOTR2,
                                 (uint)pv.MAX_PSTN_MOTR3,
                                 (uint)pv.MAX_PSTN_MOTR4,
                                 (uint)pv.MAX_PSTN_MOTR5,
                                 (uint)pv.MAX_PSTN_MOTR6,
                                 (uint)pv.MAX_PSTN_MOTR7,
                                 (uint)pv.MAX_PSTN_MOTR8 };



            PM.Init(uaPstnCnt);



            m_tmToStop    = new CDelayTimer();
            m_tmToStrt    = new CDelayTimer();
            m_tmFlickOn   = new CDelayTimer();
            m_tmFlickOff  = new CDelayTimer();
            m_tmCloseDoor = new CDelayTimer();
            m_tmTemp      = new CDelayTimer();
            m_tmMotor1    = new CDelayTimer();
            m_tmMotor2    = new CDelayTimer();
            m_tmMotor3    = new CDelayTimer();

            m_bBtnReset = false;
            m_bBtnStart = false;
            m_bBtnStop  = false;
            m_bBtnAir   = false;

            m_bRun     = false;
            m_bRunEdge = false;
            m_bFlick   = false;
            m_iStep    = EN_SEQ_STEP.Idle;
            m_iSeqStat = EN_SEQ_STAT.Stop;

            //Run End Buzzer.
            m_bRunEnd = false;

            m_Part[(int)pi.WRK] = WRK;
            m_Part[(int)pi.OUT] = OUT;


            //Temp       .PortOpen();

            MainThread.Priority = ThreadPriority.Highest;
            MainThread.Start();
        }
示例#2
0
        public static void Init(int _iWidth, int _iHeight)
        {
            Log.StartLogMan();
            //Common
            SM.TPara Para;
            Para.sParaFolderPath = Directory.GetCurrentDirectory() + "\\Util\\";
            //Para.iWidth    = 1280;
            //Para.iHeight   = 863;
            Para.iWidth    = _iWidth;
            Para.iHeight   = _iHeight;
            Para.bTabHides = new bool[6];

            switch (Eqp.sLanguage)
            {
            default: CLanguage.ChangeLanguage("en"); Para.eLanSel = EN_LAN_SEL.English; break;

            case "English": CLanguage.ChangeLanguage("en"); Para.eLanSel = EN_LAN_SEL.English; break;

            case "Korean": CLanguage.ChangeLanguage("ko"); Para.eLanSel = EN_LAN_SEL.Korean; break;

            case "Chinese": CLanguage.ChangeLanguage("zh-Hans"); Para.eLanSel = EN_LAN_SEL.Chinese; break;
            }

            //Error
            SM.TParaErr Err;
            Para.Err.bUseErrPic = true;
            Para.Err.eErr       = new ei();
            Para.bTabHides[0]   = false;
            //D IO
            SM.TParaDio Dio;
            Para.Dio.eDioSel  = EN_DIO_SEL.AXL;
            Para.Dio.eX       = new xi();
            Para.Dio.eY       = new yi();
            Para.bTabHides[1] = false;
            //A IO
            SM.TParaAio Aio;
            Para.Aio.eAioSel    = EN_AIO_SEL.AXL;
            Para.Aio.eX         = new ax();
            Para.Aio.eY         = new ay();
            Para.Aio.iRangeAMin = 0;
            Para.Aio.iRangeAMax = 0;
            Para.bTabHides[2]   = false;

            //TowerLamp
            Para.bTabHides[3] = false;

            //Cylinder
            SM.TParaCyl Cyl;
            Para.Cyl.eCyl     = new ci();
            Para.bTabHides[4] = false;

            //Motor
            SM.TParaMtr Mtr;
            Para.Mtr.eMtrSel = new EN_MTR_SEL[(int)mi.MAX_MOTR];
            for (int i = 0; i < (int)mi.MAX_MOTR; i++)
            {
                Para.Mtr.eMtrSel[i] = EN_MTR_SEL.AXL;
            }
            Para.Mtr.eMtr     = new mi();
            Para.bTabHides[5] = false;

            SM.Init(Para);
            OM.Init();
            DM.Init();
            LOT.Init();
            SPC.Init();
            PM.Init(Pstn.Cnt);

            ArrayPos.TPara PosPara; //= new ArrayPos.TPara();
            PosPara.dColGrGap = OM.DevInfo.dColGrGap;
            PosPara.iColCnt   = OM.DevInfo.iColCnt;
            PosPara.iRowCnt   = OM.DevInfo.iRowCnt;
            PosPara.dColPitch = OM.DevInfo.dColPitch;
            PosPara.dRowPitch = OM.DevInfo.dRowPitch;
            PosPara.iColGrCnt = OM.DevInfo.iColGrCnt;
            PosPara.iRowGrCnt = OM.DevInfo.iRowGrCnt;
            PosPara.dColGrGap = OM.DevInfo.dColGrGap;
            PosPara.dRowGrGap = OM.DevInfo.dRowGrGap;

            PosPara.iColSbGrCnt = OM.DevInfo.iColSbGrCnt;
            PosPara.iRowSbGrCnt = OM.DevInfo.iRowSbGrCnt;

            PosPara.dRowSbGrGap = OM.DevInfo.dRowSbGrGap;
            PosPara.dColSbGrGap = OM.DevInfo.dColSbGrGap;
            if (!OM.StripPos.SetPara(PosPara))
            {
                Log.ShowMessage("Strip Position Err", OM.StripPos.Error);
            }

            ML.IO_SetY(yi.ETC_MainAirOnOff, true);

            //WinApi.TimeBeginPeriod(1);
            Process.GetCurrentProcess().PriorityBoostEnabled = true;
            Process.GetCurrentProcess().PriorityClass        = ProcessPriorityClass.RealTime;

            MainThread.Priority = ThreadPriority.Highest;
            MainThread.Start();

            m_tmToStop    = new CDelayTimer();
            m_tmToStrt    = new CDelayTimer();
            m_tmFlickOn   = new CDelayTimer();
            m_tmFlickOff  = new CDelayTimer();
            m_tmCloseDoor = new CDelayTimer();
            m_tmTemp      = new CDelayTimer();

            m_cyWorktime = new CCycleTimer();

            m_bBtnReset = false;
            m_bBtnStart = false;
            m_bBtnStop  = false;
            m_bBtnAir   = false;

            m_bRun     = false;
            m_bRunEdge = false;
            m_bFlick   = false;
            m_iStep    = EN_SEQ_STEP.Idle;
            m_iSeqStat = EN_SEQ_STAT.Stop;

            //Run End Buzzer.
            m_bRunEnd = false;

            m_Part[(int)pi.LODR] = LODR;
            m_Part[(int)pi.PREB] = PREB;
            m_Part[(int)pi.VSNZ] = VSNZ;
            m_Part[(int)pi.PSTB] = PSTB;
            m_Part[(int)pi.ULDR] = ULDR;
        }
示例#3
0
        static public MD_X1000 LaserMarking;         //= new MD_X1000       (0, "LaserMarking"   );
        //static public RS232_3310g         BarcordLODR = new RS232_3310g        (1, "BarcordLODR"   );
        //static public RS232_3310g         BarcordBARZ = new RS232_3310g        (2, "BarcordBARZ"   );


        //static public DispensePattern DispPtrn = new DispensePattern();
        //static public HeightPattern   HghtPtrn = new HeightPattern  ();

        //static public CSerialPort[] Com = new CSerialPort[(int)si.MAX_RS232];

        public static void Init()
        {
            //Common
            SM.TPara Para;
            Para.sParaFolderPath = Directory.GetCurrentDirectory() + "\\Util\\";
            Para.iWidth          = 1280;
            Para.iHeight         = 863;
            Para.bTabHides       = new bool[6];
            //Para.eLanSel   = EN_LAN_SEL.Chinese;
            //Para.eLanSel   = EN_LAN_SEL.Korean;

            switch (Eqp.sLanguage)
            {
            default: CLanguage.ChangeLanguage("en"); Para.eLanSel = EN_LAN_SEL.English; break;

            case "English": CLanguage.ChangeLanguage("en"); Para.eLanSel = EN_LAN_SEL.English; break;

            case "Korean": CLanguage.ChangeLanguage("ko"); Para.eLanSel = EN_LAN_SEL.Korean; break;

            case "Chinese": CLanguage.ChangeLanguage("zh-Hans"); Para.eLanSel = EN_LAN_SEL.Chinese; break;
            }

            //Error
            SM.TParaErr Err;
            Para.Err.bUseErrPic = true;
            Para.Err.eErr       = new ei();
            Para.bTabHides[0]   = false;
            //D IO
            SM.TParaDio Dio;
            Para.Dio.eDioSel  = EN_DIO_SEL.AXL;
            Para.Dio.eX       = new xi();
            Para.Dio.eY       = new yi();
            Para.bTabHides[1] = false;
            //A IO
            SM.TParaAio Aio;
            Para.Aio.eAioSel    = EN_AIO_SEL.AXL;
            Para.Aio.eX         = new ax();
            Para.Aio.eY         = new ay();
            Para.Aio.iRangeAMin = 0;
            Para.Aio.iRangeAMax = 0;
            Para.bTabHides[2]   = false;

            //TowerLamp
            Para.bTabHides[3] = false;

            //Cylinder
            SM.TParaCyl Cyl;
            Para.Cyl.eCyl     = new ci();
            Para.bTabHides[4] = false;

            //Motor
            SM.TParaMtr Mtr;
            Para.Mtr.eMtrSel = new EN_MTR_SEL[(int)mi.MAX_MOTR];
            for (int i = 0; i < (int)mi.MAX_MOTR; i++)
            {
                Para.Mtr.eMtrSel[i] = EN_MTR_SEL.AXL;
            }
            Para.Mtr.eMtr     = new mi();
            Para.bTabHides[5] = false;

            //
            //SM.InitErr(Para,Err);
            //SM.InitDio(Para,Dio);
            //SM.InitAio(Para,Aio);
            //SM.InitCyl(Para,Cyl);
            //SM.InitMtr(Para,Mtr);

            SM.Init(Para);
            OM.Init();
            DM.Init();
            LOT.Init();
            SPC.Init();
            PM.Init(PM.PstnCnt);

            LaserMarking = new MD_X1000(2,
                                        xi.LSR_Error,
                                        xi.LSR_Warning,
                                        xi.LSR_TrgReady,
                                        xi.LSR_InPrint,
                                        xi.LSR_PrintEnd,
                                        xi.LSR_CheckOk,
                                        xi.LSR_CheckNg,
                                        yi.LSR_Triger,
                                        yi.LSR_Check);

            EmbededExe.CameraInit();

            //public MD_X1000(int _iPortId ,
            //            xi  _xError  ,
            //            xi  _xWarning,
            //            xi  _xReady  ,
            //            xi  _xWorking,
            //            xi  _xWorkEnd,
            //            xi  _xCheckOk,
            //            xi  _xCheckNg,
            //            yi  _yTrigger,
            //            yi  _yCheck  )


            //VisnComm.TPara VisnPara = new VisnComm.TPara();
            //VisnPara.sVisnPcName     = "Visn"          ; //파일저장시에 파일명에 삽입.
            //VisnPara.sVisnFolder     = "c:\\Data"      ; //파일저장 하는 폴더.
            //VisnPara.xVisn_Ready     = xi.VISN_Ready   ;
            //VisnPara.xVisn_Busy      = xi.VISN_Busy    ;

            //VisnPara.yVisn_Command   = yi.VISN_Command ;
            //VisnPara.yVisn_JobChange = yi.VISN_Change  ;
            //VisnPara.yVisn_Reset     = yi.VISN_Reset   ;
            //VisnPara.yVisn_ManMode   = yi.VISN_ManMode ;
            //VisnPara.yVisn_ManInsp   = yi.VISN_ManInsp ;
            //Visn.Init(ref VisnPara);

            MainThread.Priority = ThreadPriority.Highest;
            //MainThread.Priority = ThreadPriority.Normal;
            MainThread.Start();

            m_tmToStop    = new CDelayTimer();
            m_tmToStrt    = new CDelayTimer();
            m_tmFlickOn   = new CDelayTimer();
            m_tmFlickOff  = new CDelayTimer();
            m_tmCloseDoor = new CDelayTimer();
            m_tmTemp      = new CDelayTimer();

            m_cyWorktime = new CCycleTimer();

            VC.Init();

            m_bBtnReset = false;
            m_bBtnStart = false;
            m_bBtnStop  = false;
            m_bBtnAir   = false;

            m_bRun     = false;
            m_bRunEdge = false;
            m_bFlick   = false;
            m_iStep    = EN_SEQ_STEP.Idle;
            m_iSeqStat = EN_SEQ_STAT.Stop;

            //Run End Buzzer.
            m_bRunEnd = false;

            m_Part[(int)pi.LODR] = LODR; //m_Part[(int)pi.LODR].SetPartId((int)pi.LODR + ti.Max);
            m_Part[(int)pi.PLDR] = PLDR; //m_Part[(int)pi.LODR].SetPartId((int)pi.LODR + ti.Max);
            m_Part[(int)pi.MARK] = MARK; //m_Part[(int)pi.IDXR].SetPartId((int)pi.IDXR + ti.Max);
            m_Part[(int)pi.VISN] = VISN; //m_Part[(int)pi.IDXF].SetPartId((int)pi.IDXF + ti.Max);
            m_Part[(int)pi.TBLE] = TTBL; //m_Part[(int)pi.TOOL].SetPartId((int)pi.TOOL + ti.Max);
            m_Part[(int)pi.PULD] = PULD; //m_Part[(int)pi.IDXF].SetPartId((int)pi.IDXF + ti.Max);
            m_Part[(int)pi.ULDR] = ULDR; //m_Part[(int)pi.STCK].SetPartId((int)pi.STCK + ti.Max);
            m_Part[(int)pi.REJM] = REJM; //m_Part[(int)pi.STCK].SetPartId((int)pi.STCK + ti.Max);
            m_Part[(int)pi.REJV] = REJV; //m_Part[(int)pi.STCK].SetPartId((int)pi.STCK + ti.Max);
            //m_Part[(int)pi.] = BARZ; //m_Part[(int)pi.BARZ].SetPartId((int)pi.BARZ + ti.Max);

            //LoadCell   .PortOpen();
            //Dispr      .PortOpen();
            //HeightSnsr .PortOpen();
            //BarcordLODR.PortOpen();
            //BarcordBARZ.PortOpen();
            //Temp       .PortOpen();

            //ML.IO_SetY(yi.SSTG_HeaterOn,true);


            //DateTime Time =  DateTime.Now ;
            //bool bConnect = SEQ.Oracle.OpenDB(OM.CmnOptn.sOracleIP , OM.CmnOptn.sOraclePort , OM.CmnOptn.sOracleID , OM.CmnOptn.sOraclePassword);//"192.168.1.77" , "1521" , "hr","hr"
            //TimeSpan Span =  DateTime.Now - Time ;
            //double dVal = Span.TotalMilliseconds ;


            //if(!OM.CmnOptn.bOracleNotUse && !bConnect) Log.ShowMessage("Oracle","DB Connection Error");
        }