Exemplo n.º 1
0
        private void btFwd_Click(object sender, EventArgs e)
        {
            Log.Trace(m_sActrName, "Fwd Clicked");

            if (m_iActrId == ci.LODR_ClampClOp)
            {
                SEQ.LODR.MoveCyl(m_iActrId, SM.CL_GetCmd(m_iActrId) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (m_iActrId == ci.LODR_SperatorUpDn)
            {
                SEQ.LODR.MoveCyl(m_iActrId, SM.CL_GetCmd(m_iActrId) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (m_iActrId == ci.STCK_RailClOp)
            {
                SEQ.STCK.MoveCyl(m_iActrId, SM.CL_GetCmd(m_iActrId) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (m_iActrId == ci.IDXR_ClampUpDn)
            {
                SEQ.IDXR.MoveCyl(m_iActrId, SM.CL_GetCmd(m_iActrId) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (m_iActrId == ci.IDXF_ClampUpDn)
            {
                SEQ.IDXF.MoveCyl(m_iActrId, SM.CL_GetCmd(m_iActrId) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (m_iActrId == ci.IDXR_ClampClOp)
            {
                SEQ.IDXR.MoveCyl(m_iActrId, SM.CL_GetCmd(m_iActrId) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (m_iActrId == ci.IDXF_ClampClOp)
            {
                SEQ.IDXF.MoveCyl(m_iActrId, SM.CL_GetCmd(m_iActrId) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (m_iActrId == ci.STCK_RailTrayUpDn)
            {
                SEQ.STCK.MoveCyl(m_iActrId, SM.CL_GetCmd(m_iActrId) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (m_iActrId == ci.STCK_StackStprUpDn)
            {
                SEQ.STCK.MoveCyl(m_iActrId, SM.CL_GetCmd(m_iActrId) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (m_iActrId == ci.STCK_StackOpCl)
            {
                SEQ.STCK.MoveCyl(m_iActrId, SM.CL_GetCmd(m_iActrId) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (m_iActrId == ci.BARZ_BrcdStprUpDn)
            {
                SEQ.BARZ.MoveCyl(m_iActrId, SM.CL_GetCmd(m_iActrId) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (m_iActrId == ci.BARZ_BrcdTrayUpDn)
            {
                SEQ.BARZ.MoveCyl(m_iActrId, SM.CL_GetCmd(m_iActrId) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (m_iActrId == ci.BARZ_YPckrFwBw)
            {
                SEQ.BARZ.MoveCyl(m_iActrId, SM.CL_GetCmd(m_iActrId) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }


            //SM.CL_Move(m_iActrId, fb.Fwd);
        }
Exemplo n.º 2
0
        private void btCylinder1_Click(object sender, EventArgs e)
        {
            int iBtnTag = Convert.ToInt32(((Button)sender).Tag);

            if (iBtnTag == (int)ci.LODR_ClampClOp)
            {
                SEQ.LODR.MoveCyl((ci)iBtnTag, SM.CL_GetCmd((ci)iBtnTag) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (iBtnTag == (int)ci.LODR_SperatorUpDn)
            {
                SEQ.LODR.MoveCyl((ci)iBtnTag, SM.CL_GetCmd((ci)iBtnTag) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (iBtnTag == (int)ci.STCK_RailClOp)
            {
                SEQ.STCK.MoveCyl((ci)iBtnTag, SM.CL_GetCmd((ci)iBtnTag) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (iBtnTag == (int)ci.IDXR_ClampUpDn)
            {
                SEQ.IDXR.MoveCyl((ci)iBtnTag, SM.CL_GetCmd((ci)iBtnTag) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (iBtnTag == (int)ci.IDXF_ClampUpDn)
            {
                SEQ.IDXF.MoveCyl((ci)iBtnTag, SM.CL_GetCmd((ci)iBtnTag) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (iBtnTag == (int)ci.IDXR_ClampClOp)
            {
                SEQ.IDXR.MoveCyl((ci)iBtnTag, SM.CL_GetCmd((ci)iBtnTag) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (iBtnTag == (int)ci.IDXF_ClampClOp)
            {
                SEQ.IDXF.MoveCyl((ci)iBtnTag, SM.CL_GetCmd((ci)iBtnTag) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (iBtnTag == (int)ci.STCK_RailTrayUpDn)
            {
                SEQ.STCK.MoveCyl((ci)iBtnTag, SM.CL_GetCmd((ci)iBtnTag) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (iBtnTag == (int)ci.STCK_StackStprUpDn)
            {
                SEQ.STCK.MoveCyl((ci)iBtnTag, SM.CL_GetCmd((ci)iBtnTag) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (iBtnTag == (int)ci.STCK_StackOpCl)
            {
                SEQ.STCK.MoveCyl((ci)iBtnTag, SM.CL_GetCmd((ci)iBtnTag) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (iBtnTag == (int)ci.BARZ_BrcdStprUpDn)
            {
                SEQ.BARZ.MoveCyl((ci)iBtnTag, SM.CL_GetCmd((ci)iBtnTag) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (iBtnTag == (int)ci.BARZ_BrcdTrayUpDn)
            {
                SEQ.BARZ.MoveCyl((ci)iBtnTag, SM.CL_GetCmd((ci)iBtnTag) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
            if (iBtnTag == (int)ci.BARZ_YPckrFwBw)
            {
                SEQ.BARZ.MoveCyl((ci)iBtnTag, SM.CL_GetCmd((ci)iBtnTag) == fb.Bwd ? fb.Fwd : fb.Bwd);
            }
        }
Exemplo n.º 3
0
        private void btAction_Click(object sender, EventArgs e)
        {
            fb sCylderPos = 0;

            if (SM.CL_GetCmd(m_iActrId) == 0)
            {
                sCylderPos = fb.Fwd;
            }
            else
            {
                sCylderPos = fb.Bwd;
            }

            SM.CL_Move(m_iActrId, sCylderPos);

            string sMsg = "FrameCyl Form_Cylinder Move Button Click" + SM.CL_GetName(m_iActrId).ToString();

            sMsg += SM.CL_GetCmd(m_iActrId) == 0 ? "(Fwd)" : "(Bwd)";

            Log.Trace("Operator", sMsg);
        }
Exemplo n.º 4
0
        private void tmUpdate_Tick(object sender, EventArgs e)
        {
            tmUpdate.Enabled = false;

            bool bCmd     = SM.CL_GetCmd(m_iActrId) == fb.Bwd ? true : false;
            bool bErr     = SM.CL_Err(m_iActrId);
            bool bDone    = SM.CL_Complete(m_iActrId);
            bool bDoneFwd = SM.CL_Complete(m_iActrId, fb.Fwd);
            bool bDoneBwd = SM.CL_Complete(m_iActrId, fb.Bwd);

            //if (bDone)
            //{
            //    lbFwd.BackColor = bCmd ? Color.ForestGreen    : SystemColors.Control;
            //    lbBwd.BackColor = bCmd ? SystemColors.Control : Color.ForestGreen   ;
            //}
            if (bErr)
            {
                lbFwd.BackColor = Color.Red;
                lbBwd.BackColor = Color.Red;
            }


            if (bCmd != m_bPreCmd)
            {
                if (SM.CL_GetCmd(m_iActrId) == fb.Bwd)
                {
                    lbBwd.BackColor = Color.ForestGreen; lbFwd.BackColor = SystemColors.Control;
                }
                else
                {
                    lbFwd.BackColor = Color.ForestGreen; lbBwd.BackColor = SystemColors.Control;
                }
            }

            m_bPreCmd        = bCmd;
            tmUpdate.Enabled = true;
        }
Exemplo n.º 5
0
        private void tmUpdate_Tick(object sender, EventArgs e)
        {
            tmUpdate.Enabled = false;

            bool bCmd  = SM.CL_GetCmd(m_iActrId) == 0 ? true : false;
            bool bErr  = SM.CL_Err(m_iActrId);
            bool bDone = SM.CL_Complete(m_iActrId);

            if (bDone)
            {
                btAction.ForeColor = Color.Lime;
            }
            else if (bErr)
            {
                btAction.ForeColor = Color.Red;
            }
            else
            {
                btAction.ForeColor = Color.Black;
            }

            if (bCmd != m_bPreCmd)
            {
                if ((int)SM.CL_GetCmd(m_iActrId) == 0)
                {
                    btAction.ImageIndex = iFwd; btAction.Text = sFwd;
                }
                else
                {
                    btAction.ImageIndex = iBwd; btAction.Text = sBwd;
                }
            }

            m_bPreCmd        = bCmd;
            tmUpdate.Enabled = true;
        }
Exemplo n.º 6
0
        private void timer1_Tick(object sender, EventArgs e)
        {
            tmUpdate.Enabled = false;

            //로그인/로그아웃 방식
            if (SML.FrmLogOn.GetLevel() == (int)EN_LEVEL.LogOff)
            {
                btOperator.Text   = "LOG IN";
                pnDataMap.Enabled = false;
                //pnDayInfo .Enabled = false;
                pnLotInfo.Enabled = false;
                pnError.Enabled   = false;
                pnOperMan.Enabled = false;
                //pnWorkInfo.Enabled = false;
                pnLotOpen.Enabled = false;
                //btStart   .Enabled = LOT.LotList.Count == 0 || !LOT.LotOpened;
                btStart.Enabled      = false;
                btStop.Enabled       = false;
                btReset.Enabled      = false;
                btLightOnOff.Enabled = false;
                btOperator.Enabled   = true;
            }
            else
            {
                btOperator.Text   = SML.FrmLogOn.GetLevel().ToString();
                pnDataMap.Enabled = true;
                //pnDayInfo .Enabled = true;
                pnLotInfo.Enabled = true;
                pnError.Enabled   = true;
                pnOperMan.Enabled = true;
                //pnWorkInfo.Enabled = true;
                pnLotOpen.Enabled = true;
                //btStart   .Enabled = LOT.LotList.Count != 0 || LOT.LotOpened;
                btStart.Enabled      = true;
                btStop.Enabled       = true;
                btReset.Enabled      = true;
                btLightOnOff.Enabled = true;
            }



            btLotOpen.Enabled = !LOT.GetLotOpen();


            lbDate.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");

            TimeSpan Span;

            try{
                Span = TimeSpan.FromMilliseconds(SPC.LOT.Data.RunTime);
            }
            catch (Exception ex) {
                Span = TimeSpan.FromMilliseconds(0);
            }
            //label11.Text = OM.EqpStat.iLDRSplyCnt.ToString() ;

            string Str;
            int    iPreErrCnt  = 0;
            int    iCrntErrCnt = 0;

            for (int i = 0; i < SML.ER._iMaxErrCnt; i++)
            {
                if (SML.ER.GetErr(i))
                {
                    iCrntErrCnt++;
                }
            }
            if (iPreErrCnt != iCrntErrCnt)
            {
                lbErr.Items.Clear();
                int iErrNo = SM.ER_GetLastErr();
                for (int i = 0; i < SML.ER._iMaxErrCnt; i++)
                {
                    if (SML.ER.GetErr(i))
                    {
                        Str  = string.Format("[ERR{0:000}]", i);
                        Str += SML.ER.GetErrName(i) + " " + SML.ER.GetErrSubMsg(i);
                        lbErr.Items.Add(Str);
                    }
                }
            }
            if (SEQ._iSeqStat != EN_SEQ_STAT.Error)
            {
                lbErr.Items.Clear();
            }
            iPreErrCnt = iCrntErrCnt;


            if (!SM.MT_GetHomeDoneAll())
            {
                btAllHome.ForeColor = SEQ._bFlick ? Color.Black : Color.Red;
            }
            else
            {
                btAllHome.ForeColor = Color.Black;
            }

            SPC.LOT.DispLotInfo(lvLotInfo);

            btInputTrayF.Enabled   = !SEQ._bRun;
            btInputTrayG.Enabled   = !SEQ._bRun;
            btAllEmptyTray.Enabled = !SEQ._bRun;
            btBarCodeReTry.Enabled = !SEQ._bRun;

            if (SM.IO_GetX(xi.BARZ_PckrVac))
            {
                lbBarVac.BackColor = Color.Lime;
            }
            else
            {
                lbBarVac.BackColor = Color.Red;
            }

            //JS
            //Manual Button Text.
            if (SM.CL_GetCmd(ci.LODR_ClampClOp) == fb.Bwd)
            {
                btCylinder1.Text = "Loader Clamp OPEN";
            }
            else
            {
                btCylinder1.Text = "Loader Clamp CLOSE";
            }
            btCylinder1.ForeColor = SM.CL_Complete(ci.LODR_ClampClOp) ? Color.Black : Color.Lime;

            if (SM.CL_GetCmd(ci.LODR_SperatorUpDn) == fb.Bwd)
            {
                btCylinder2.Text = "Loader Sperator DOWN";
            }
            else
            {
                btCylinder2.Text = "Loader Sperator Up";
            }
            btCylinder2.ForeColor = SM.CL_Complete(ci.LODR_SperatorUpDn) ? Color.Black : Color.Lime;

            if (SM.CL_GetCmd(ci.IDXR_ClampClOp) == fb.Bwd)
            {
                btCylinder4.Text = "Index Rear Clamp OPEN";
            }
            else
            {
                btCylinder4.Text = "Index Rear Clamp CLOSE";
            }
            btCylinder4.ForeColor = SM.CL_Complete(ci.IDXR_ClampClOp) ? Color.Black : Color.Lime;

            if (SM.CL_GetCmd(ci.IDXR_ClampUpDn) == fb.Bwd)
            {
                btCylinder5.Text = "Index Rear Clamp DOWN";
            }
            else
            {
                btCylinder5.Text = "Index Rear Clamp UP";
            }
            btCylinder5.ForeColor = SM.CL_Complete(ci.IDXR_ClampUpDn) ? Color.Black : Color.Lime;

            if (SM.CL_GetCmd(ci.IDXF_ClampClOp) == fb.Bwd)
            {
                btCylinder6.Text = "Index Front Clamp OPEN";
            }
            else
            {
                btCylinder6.Text = "Index Front Clamp CLOSE";
            }
            btCylinder6.ForeColor = SM.CL_Complete(ci.IDXF_ClampClOp) ? Color.Black : Color.Lime;

            if (SM.CL_GetCmd(ci.IDXF_ClampUpDn) == fb.Bwd)
            {
                btCylinder3.Text = "Index Front Clamp DOWN";
            }
            else
            {
                btCylinder3.Text = "Index Front Clamp UP";
            }
            btCylinder3.ForeColor = SM.CL_Complete(ci.IDXF_ClampUpDn) ? Color.Black : Color.Lime;

            if (SM.CL_GetCmd(ci.STCK_RailClOp) == fb.Bwd)
            {
                btCylinder7.Text = "Tray Rail      OPEN";
            }
            else
            {
                btCylinder7.Text = "Tray Rail      CLOSE";
            }
            btCylinder7.ForeColor = SM.CL_Complete(ci.STCK_RailClOp) ? Color.Black : Color.Lime;

            if (SM.CL_GetCmd(ci.STCK_RailTrayUpDn) == fb.Bwd)
            {
                btCylinder8.Text = "Stacker Rail Tray DOWN";
            }
            else
            {
                btCylinder8.Text = "Stacker Rail Tray UP";
            }
            btCylinder8.ForeColor = SM.CL_Complete(ci.STCK_RailTrayUpDn) ? Color.Black : Color.Lime;

            if (SM.CL_GetCmd(ci.STCK_StackStprUpDn) == fb.Bwd)
            {
                btCylinder9.Text = "Stacker Stopper DOWN";
            }
            else
            {
                btCylinder9.Text = "Stacker Stopper UP";
            }
            btCylinder9.ForeColor = SM.CL_Complete(ci.STCK_StackStprUpDn) ? Color.Black : Color.Lime;

            if (SM.CL_GetCmd(ci.STCK_StackOpCl) == fb.Bwd)
            {
                btCylinder10.Text = "Stacker Rail     CLOSE";
            }
            else
            {
                btCylinder10.Text = "Stacker Rail     OPEN";
            }
            btCylinder10.ForeColor = SM.CL_Complete(ci.STCK_StackOpCl) ? Color.Black : Color.Lime;

            if (SM.CL_GetCmd(ci.BARZ_BrcdStprUpDn) == fb.Bwd)
            {
                btCylinder11.Text = "Barcode Stopper DOWN";
            }
            else
            {
                btCylinder11.Text = "Barcode Stopper UP";
            }
            btCylinder11.ForeColor = SM.CL_Complete(ci.BARZ_BrcdStprUpDn) ? Color.Black : Color.Lime;

            if (SM.CL_GetCmd(ci.BARZ_BrcdTrayUpDn) == fb.Bwd)
            {
                btCylinder12.Text = "Barcode Tray DOWN";
            }
            else
            {
                btCylinder12.Text = "Barcode Tray UP";
            }
            btCylinder12.ForeColor = SM.CL_Complete(ci.BARZ_BrcdTrayUpDn) ? Color.Black : Color.Lime;

            if (SM.CL_GetCmd(ci.BARZ_YPckrFwBw) == fb.Bwd)
            {
                btCylinder13.Text = "Barcode Picker BWD";
            }
            else
            {
                btCylinder13.Text = "Barcode Picker FWD";
            }
            btCylinder13.ForeColor = SM.CL_Complete(ci.BARZ_YPckrFwBw)    ? Color.Black : Color.Lime;

            btManual1.ForeColor = (MM.GetManNo() == mc.LODR_Home) ? Color.Lime : Color.Black;
            btManual2.ForeColor = (MM.GetManNo() == mc.TOOL_Home) ? Color.Lime : Color.Black;
            btManual3.ForeColor = (MM.GetManNo() == mc.BARZ_Home) ? Color.Lime : Color.Black;
            btManual4.ForeColor = (MM.GetManNo() == mc.IDXR_Home) ? Color.Lime : Color.Black;
            btManual5.ForeColor = (MM.GetManNo() == mc.IDXF_Home) ? Color.Lime : Color.Black;
            btManual6.ForeColor = (MM.GetManNo() == mc.STCK_Home) ? Color.Lime : Color.Black;

            Refresh();
            tmUpdate.Enabled = true;
        }
Exemplo n.º 7
0
        public void SetConfig(ci _iActrId, string _sTitle, EN_MOVE_DIRECTION _iActrType, Control _wcParent /*, dgCheckSafe _CheckSafe*/)
        {
            string sActrName;

            sActrName = _sTitle;
            if (sActrName == null)
            {
                return;
            }
            sActrName = sActrName.Replace("_", "");



            m_iActrId    = _iActrId;
            lbTitle.Text = sActrName;
            m_iType      = _iActrType;
            this.Parent  = _wcParent;
            //m_CheckSafe = _CheckSafe;

            m_bPreCmd = true;
            //btAction.ImageIndex = 1;
            tmUpdate.Enabled = true;



            switch (m_iType)
            {
            default: iFwd = Right; sFwd = "RIGHT"; iBwd = Left; sBwd = "LEFT"; break;

            case EN_MOVE_DIRECTION.LR: iFwd = Right; sFwd = "RIGHT";
                iBwd = Left; sBwd = "LEFT"; break;

            case EN_MOVE_DIRECTION.RL: iFwd = Left; sFwd = "LEFT";
                iBwd = Right; sBwd = "RIGHT"; break;

            case EN_MOVE_DIRECTION.BF: iFwd = Left; sFwd = "Fwd";
                iBwd = Right; sBwd = "Bwd"; break;

            case EN_MOVE_DIRECTION.FB: iFwd = Right; sFwd = "Bwd";
                iBwd = Left; sBwd = "Fwd"; break;

            case EN_MOVE_DIRECTION.UD: iFwd = Down; sFwd = "DN";
                iBwd = Up; sBwd = "Up"; break;

            case EN_MOVE_DIRECTION.DU: iFwd = Up; sFwd = "UP";
                iBwd = Down; sBwd = "DN"; break;

            case EN_MOVE_DIRECTION.CA: iFwd = CCW; sFwd = "CCW";
                iBwd = CW; sBwd = "CW"; break;

            case EN_MOVE_DIRECTION.AC: iFwd = CW; sFwd = "CW";
                iBwd = CCW; sBwd = "CCW"; break;

            case EN_MOVE_DIRECTION.CO: iFwd = Right; sFwd = "CLOSE";
                iBwd = Left; sBwd = "OPEN"; break;

            case EN_MOVE_DIRECTION.OC: iFwd = Right; sFwd = "OPEN";
                iBwd = Left; sBwd = "CLOSE"; break;
            }

            if ((int)SM.CL_GetCmd(m_iActrId) == 0)
            {
                btAction.ImageIndex = iFwd; btAction.Text = sFwd;
            }
            else
            {
                btAction.ImageIndex = iBwd; btAction.Text = sBwd;
            }


            //btAction.ImageIndex = Right;
            //ImgLstBt.Images.SetKeyName(1, "Right");
        }
Exemplo n.º 8
0
        public void SetConfig(ci _iActrId, string _sTitle, EN_MOVE_DIRECTION _iActrType, Control _wcParent /*, dgCheckSafe _CheckSafe*/)
        {
            m_sActrName = _sTitle;
            //bActivate = new bool [SML.CL]
            if (m_sActrName == null)
            {
                return;
            }
            m_sActrName = m_sActrName.Replace("_", " ");

            m_iActrId      = _iActrId;    //실린더 넘버
            lbCylNo.Text   = ((int)m_iActrId).ToString();
            lbCylName.Text = m_sActrName; //실린더 이름
            m_iType        = _iActrType;
            this.Parent    = _wcParent;

            m_bPreCmd        = true;
            tmUpdate.Enabled = true;

            switch (m_iType)
            {
            default: iFwd = Left; sFwd = "LEFT"; iBwd = Right; sBwd = "RIGHT"; break;

            case EN_MOVE_DIRECTION.LR: sFwd = "RIGHT";
                sBwd = "LEFT"; break;

            case EN_MOVE_DIRECTION.RL: sFwd = "LEFT";
                sBwd = "RIGHT"; break;

            case EN_MOVE_DIRECTION.BF: sFwd = "Fwd";
                sBwd = "Bwd"; break;

            case EN_MOVE_DIRECTION.FB: sFwd = "Bwd";
                sBwd = "Fwd"; break;

            case EN_MOVE_DIRECTION.UD: sFwd = "DN";
                sBwd = "Up"; break;

            case EN_MOVE_DIRECTION.DU: sFwd = "UP";
                sBwd = "DN"; break;

            case EN_MOVE_DIRECTION.CA: sFwd = "CCW";
                sBwd = "CW"; break;

            case EN_MOVE_DIRECTION.AC: sFwd = "CW";
                sBwd = "CCW"; break;

            case EN_MOVE_DIRECTION.CO: sFwd = "OPEN";
                sBwd = "CLOSE"; break;

            case EN_MOVE_DIRECTION.OC: sFwd = "CLOSE";
                sBwd = "OPEN"; break;
            }

            lbBwd.BackColor = Color.ForestGreen;
            lbFwd.BackColor = SystemColors.Control;

            if ((int)SM.CL_GetCmd(m_iActrId) == 0)
            {
                btFwd.Text = sFwd; btBwd.Text = sBwd;
            }
            else
            {
                btBwd.Text = sBwd; btFwd.Text = sFwd;
            }
        }
Exemplo n.º 9
0
        //Manual Processing.
        public static bool SetManCycle(mc _iNo)
        {
            m_iCrntManNo = m_iManNo;

            if (_iNo < 0)
            {
                Log.ShowMessage("ERROR", "Wrong Manual No"); return(false);
            }
            if (_iNo >= mc.MAX_MANUAL_CYCLE)
            {
                Log.ShowMessage("ERROR", "Wrong Manual No"); return(false);
            }
            if (m_iManNo != mc.NoneCycle)
            {
                Log.ShowMessage("ERROR", "Doing Manual Cycle"); return(false);
            }
            if (SEQ._bRun)
            {
                Log.ShowMessage("ERROR", "Autorunning"); return(false);
            }
            if (_iNo > mc.STCK_Home && !SEQ.InspectHomeDone())
            {
                return(false);
            }

            //   mcLDR_RHome
            m_bManSetting = true; //SetManCycle함수는 화면 쓰레드. 업데이트 함수에서 다른쓰레드로 들어와서 갱신하기에 플레그 걸어 막아둠.    //   mcIDX_Home
            m_iManNo      = _iNo;

            //   mcLTL_Home
            //   mcRTL_Home

            //SM.ER.SetDisp(true);jinseop

            bool bRet = true;                                                                                                                //   mcSTG_Home

            //   mcULD_Home
            /********************/
            /********************/
            if (m_iManNo == mc.NoneCycle)
            {
                bRet = false;
            }
            else if (m_iManNo == mc.AllHome)
            {
            }
            else if (m_iManNo == mc.LODR_Home)
            {
            }
            else if (m_iManNo == mc.TOOL_Home)
            {
            }
            else if (m_iManNo == mc.BARZ_Home)
            {
            }
            else if (m_iManNo == mc.IDXR_Home)
            {
            }
            else if (m_iManNo == mc.IDXF_Home)
            {
            }
            else if (m_iManNo == mc.STCK_Home)
            {
            }

            else if (m_iManNo == mc.LODR_CycleSply)
            {
                if (SM.CL_GetCmd(ci.IDXR_ClampUpDn) == fb.Fwd && SM.MT_GetCmdPos(mi.IDXR_XRear) < OM.CmnOptn.dIdxRSplyPos)
                {
                    Log.ShowMessage("Warring", "Rear Index Clamp is Up!");
                    bRet = false;
                }
                if (SM.CL_GetCmd(ci.IDXF_ClampUpDn) == fb.Fwd && SM.MT_GetCmdPos(mi.IDXF_XFrnt) < OM.CmnOptn.dIdxFSplyPos)
                {
                    Log.ShowMessage("Warring", "Front Index Clamp is Up!");
                    bRet = false;
                }
            }

            else if (m_iManNo == mc.IDXF_CycleGet)
            {
                if (!SM.MT_CmprPos(mi.IDXR_XRear, SM.PM_GetValue(mi.IDXR_XRear, pv.IDXR_XRearWait), 1.0))
                {
                    Log.ShowMessage("Warring", "Rear Index is not in wait Position.");
                    bRet = false;
                }
            }
            else if (m_iManNo == mc.IDXF_CycleBarcode)
            {
                if (!SM.MT_CmprPos(mi.IDXR_XRear, SM.PM_GetValue(mi.IDXR_XRear, pv.IDXR_XRearWait), 1.0))
                {
                    Log.ShowMessage("Warring", "Rear Index is not in wait Position.");
                    bRet = false;
                }
                if (!DM.ARAY[ri.IDXR].CheckAllStat(cs.None))
                {
                    Log.ShowMessage("Warring", "Rear IndexData Exist!");
                    bRet = false;
                }
                if (SM.CL_GetCmd(ci.IDXR_ClampUpDn) == fb.Fwd)
                {
                    Log.ShowMessage("Warring", "Rear Index Clamp is Up!");
                    bRet = false;
                }
            }
            else if (m_iManNo == mc.IDXF_CycleOut)
            {
                if (!SM.MT_CmprPos(mi.IDXR_XRear, SM.PM_GetValue(mi.IDXR_XRear, pv.IDXR_XRearWait), 1.0))
                {
                    Log.ShowMessage("Warring", "Rear Index is not in wait Position.");
                    bRet = false;
                }
                if (!DM.ARAY[ri.OUTZ].CheckAllStat(cs.None))
                {
                    Log.ShowMessage("Warring", "OutZone Data Exist!");
                    bRet = false;
                }

                if (!DM.ARAY[ri.IDXR].CheckAllStat(cs.None))
                {
                    Log.ShowMessage("Warring", "Rear IndexData Exist!");
                    bRet = false;
                }
                if (SM.CL_GetCmd(ci.IDXR_ClampUpDn) == fb.Fwd)
                {
                    Log.ShowMessage("Warring", "Rear Index Clamp is Up!");
                    bRet = false;
                }
            }


            else if (m_iManNo == mc.IDXR_CycleGet)
            {
                if (!SM.MT_CmprPos(mi.IDXF_XFrnt, SM.PM_GetValue(mi.IDXF_XFrnt, pv.IDXF_XFrntWait), 1.0))
                {
                    Log.ShowMessage("Warring", "Front Index is not in wait Position.");
                    bRet = false;
                }
            }
            else if (m_iManNo == mc.IDXR_CycleBarcode)
            {
                if (!SM.MT_CmprPos(mi.IDXF_XFrnt, SM.PM_GetValue(mi.IDXF_XFrnt, pv.IDXF_XFrntWait), 1.0))
                {
                    Log.ShowMessage("Warring", "Front Index is not in wait Position.");
                    bRet = false;
                }

                if (!DM.ARAY[ri.IDXF].CheckAllStat(cs.None))
                {
                    Log.ShowMessage("Warring", "Front IndexData Exist!");
                    bRet = false;
                }
                if (SM.CL_GetCmd(ci.IDXF_ClampUpDn) == fb.Fwd)
                {
                    Log.ShowMessage("Warring", "Front Index Clamp is Up!");
                    bRet = false;
                }
            }
            else if (m_iManNo == mc.IDXR_CycleOut)
            {
                if (!SM.MT_CmprPos(mi.IDXF_XFrnt, SM.PM_GetValue(mi.IDXF_XFrnt, pv.IDXF_XFrntWait), 1.0))
                {
                    Log.ShowMessage("Warring", "Front Index is not in wait Position.");
                    bRet = false;
                }
                if (!DM.ARAY[ri.OUTZ].CheckAllStat(cs.None))
                {
                    Log.ShowMessage("Warring", "OutZone Data Exist!");
                    bRet = false;
                }

                if (!DM.ARAY[ri.IDXF].CheckAllStat(cs.None))
                {
                    Log.ShowMessage("Warring", "Front IndexData Exist!");
                    bRet = false;
                }
                if (SM.CL_GetCmd(ci.IDXF_ClampUpDn) == fb.Fwd)
                {
                    Log.ShowMessage("Warring", "Front Index Clamp is Up!");
                    bRet = false;
                }
            }
            else if (m_iManNo == mc.TOOL_CycleVisn)
            {
            }
            else if (m_iManNo == mc.TOOL_CycleNGPick)
            {
            }
            else if (m_iManNo == mc.TOOL_CycleNGPlace)
            {
            }
            else if (m_iManNo == mc.TOOL_CycleGoodPick)
            {
            }
            else if (m_iManNo == mc.TOOL_CycleGoodPlace)
            {
            }

            else if (m_iManNo == mc.STCK_CycleToStack)
            {
            }
            else if (m_iManNo == mc.STCK_CycleStack)
            {
            }
            else if (m_iManNo == mc.STCK_CycleOut)
            {
            }

            else if (m_iManNo == mc.BARZ_CycleBarPick)
            {
            }
            else if (m_iManNo == mc.BARZ_CycleBarPlace)
            {
            }
            else if (m_iManNo == mc.BARZ_CycleOut)
            {
            }
            if (!bRet)
            {
                Init();
            }

            /********************/
            /* 처리..           */
            /********************/

            if (m_iManNo == mc.NoneCycle)
            {
            }
            else if (m_iManNo == mc.AllHome)
            {
                SM.MT_SetServoAll(true);
                SEQ.LODR.InitHomeStep();
                SEQ.TOOL.InitHomeStep();
                SEQ.BARZ.InitHomeStep();
                SEQ.IDXR.InitHomeStep();
                SEQ.IDXF.InitHomeStep();
                SEQ.STCK.InitHomeStep();
            }
            else if (m_iManNo == mc.LODR_Home)
            {
                SM.MT_SetServoAll(true); SEQ.LODR.InitHomeStep();
            }
            else if (m_iManNo == mc.TOOL_Home)
            {
                SM.MT_SetServoAll(true); SEQ.TOOL.InitHomeStep();
            }
            else if (m_iManNo == mc.BARZ_Home)
            {
                SM.MT_SetServoAll(true); SEQ.BARZ.InitHomeStep();
            }
            else if (m_iManNo == mc.IDXR_Home)
            {
                SM.MT_SetServoAll(true); SEQ.IDXR.InitHomeStep();
            }
            else if (m_iManNo == mc.IDXF_Home)
            {
                SM.MT_SetServoAll(true); SEQ.IDXF.InitHomeStep();
            }
            else if (m_iManNo == mc.STCK_Home)
            {
                SM.MT_SetServoAll(true); SEQ.STCK.InitHomeStep();
            }

            else if (m_iManNo == mc.LODR_CycleSply)
            {
                SEQ.LODR.InitCycleStep();
            }

            else if (m_iManNo == mc.IDXF_CycleGet)
            {
                SEQ.IDXF.InitCycleStep();
            }
            else if (m_iManNo == mc.IDXF_CycleBarcode)
            {
                SEQ.IDXF.InitCycleStep();
            }
            else if (m_iManNo == mc.IDXF_CycleOut)
            {
                SEQ.IDXF.InitCycleStep();
            }
            else if (m_iManNo == mc.IDXR_CycleGet)
            {
                SEQ.IDXR.InitCycleStep();
            }
            else if (m_iManNo == mc.IDXR_CycleBarcode)
            {
                SEQ.IDXR.InitCycleStep();
            }
            else if (m_iManNo == mc.IDXR_CycleOut)
            {
                SEQ.IDXR.InitCycleStep();
            }

            else if (m_iManNo == mc.TOOL_CycleVisn)
            {
                SEQ.TOOL.InitCycleStep();
            }
            else if (m_iManNo == mc.TOOL_CycleNGPick)
            {
                SEQ.TOOL.InitCycleStep();
            }
            else if (m_iManNo == mc.TOOL_CycleNGPlace)
            {
                SEQ.TOOL.InitCycleStep();
            }
            else if (m_iManNo == mc.TOOL_CycleGoodPick)
            {
                SEQ.TOOL.InitCycleStep();
            }
            else if (m_iManNo == mc.TOOL_CycleGoodPlace)
            {
                SEQ.TOOL.InitCycleStep();
            }

            else if (m_iManNo == mc.STCK_CycleToStack)
            {
                SEQ.STCK.InitCycleStep();
            }
            else if (m_iManNo == mc.STCK_CycleStack)
            {
                SEQ.STCK.InitCycleStep();
            }
            else if (m_iManNo == mc.STCK_CycleOut)
            {
                SEQ.STCK.InitCycleStep();
            }

            else if (m_iManNo == mc.BARZ_CycleBarPick)
            {
                SEQ.BARZ.InitCycleStep();
            }
            else if (m_iManNo == mc.BARZ_CycleBarPlace)
            {
                SEQ.BARZ.InitCycleStep();
            }
            else if (m_iManNo == mc.BARZ_CycleOut)
            {
                SEQ.BARZ.InitCycleStep();
            }

            //else if (m_iManNo == mBARZ_CycleBarPick  c.TOOL_SubsAlignVisn ) { SEQ.TOOL.InitCycleStep(); }
            //else if (m_iManNo == mBARZ_CycleBarPlace c.TOOL_WafrAlignVisn ) { SEQ.TOOL.InitCycleStep(); }
            //else if (m_iManNo == mBARZ_CycleOut      c.WSTG_WaferGet      ) { SEQ.WSTG.InitCycleStep(); }
            //else if (m_iManNo == mc.TOOL_Eject         ) { SEQ.TOOL.InitCycleStep(); }
            //else if (m_iManNo == mc.TOOL_DispCheck     ) { SEQ.TOOL.InitCycleStep(); }
            //else if (m_iManNo == mc.TOOL_HghtCheck     ) { SEQ.TOOL.InitCycleStep(); }
            //else if (m_iManNo == mc.WSTG_ExpdWork      ) { SML.MT.GoAbsRun((int)mi.WSTG_ZExpd, PM.GetValue(mi.WSTG_ZExpd, pv.WSTG_ZExpdWork));}
            //else if (m_iManNo == mc.SSTG_SubsRailConv  ) { SEQ.SSTG.InitCycleStep(); }
            //else if (m_iManNo == mc.SSTG_WafrRailConv  ) { SEQ.WSTG.InitCycleStep(); }
            //else if (m_iManNo == mc.SSTG_SubsRailHome  ) { SML.MT.GoHome((int)mi.SSTG_XRail); }


            //else if (m_iManNo == mc.PCK_CyclePick    ) {SEQ.PCK.InitCycleStep(); }
            //else if (m_iManNo == mc.PCK_CycleVisn    ) {SEQ.PCK.InitCycleStep(); }
            //else if (m_iManNo == mc.PCK_CyclePrnt    ) {SEQ.PCK.InitCycleStep(); }
            //else if (m_iManNo == mc.PCK_CyclePlce    ) {SEQ.PCK.InitCycleStep(); }

            //else if (m_iManNo == mc.IDX_CycleSupply  ) {SEQ.IDX.InitCycleStep(); }
            //else if (m_iManNo == mc.IDX_CycleWork    ) {SEQ.IDX.InitCycleStep(); }
            //else if (m_iManNo == mc.IDX_CycleOut     ) {SEQ.IDX.InitCycleStep(); }
            //else if (m_iManNo == mc.IDX_LtPitchMove  ) {SML.MT.GoIncMan((int)mi.IDX_X,  OM.DevInfo.dTrayColPitch);}
            //else if (m_iManNo == mc.IDX_RtPitchMove  ) {SML.MT.GoIncMan((int)mi.IDX_X, -OM.DevInfo.dTrayColPitch);}


            m_bManSetting = false; //m_bManSetting 중요함 리턴전에 꼭 펄스 시켜야함. 쓰레드가 달라서. ::Update에서 m_iManNo=0이 되므로 주의.
            return(true);
        }