Exemple #1
0
        private void btCylinder1_Click(object sender, EventArgs e)
        {
            string sText = ((Button)sender).Text;

            Log.Trace(sFormText + sText + " Button Clicked", ti.Frm);

            int iBtnTag = Convert.ToInt32(((Button)sender).Tag);

            ML.CL_Move((ci)iBtnTag, ML.CL_GetCmd((ci)iBtnTag) == fb.Bwd ? fb.Fwd : fb.Bwd);
        }
Exemple #2
0
        private void tmUpdate_Tick(object sender, EventArgs e)
        {
            tmUpdate.Enabled = false;

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

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


            if (bCmd != m_bPreCmd)
            {
                if ((int)ML.CL_GetCmd(m_iActrId) == 0)
                {
                    lbFwd.BackColor = Color.ForestGreen; lbBwd.BackColor = SystemColors.Control;
                }
                else
                {
                    lbBwd.BackColor = Color.ForestGreen; lbFwd.BackColor = SystemColors.Control;
                }
            }

            m_bPreCmd = bCmd;

            if (!this.Visible)
            {
                tmUpdate.Enabled = false;
                return;
            }
            tmUpdate.Enabled = true;
        }
Exemple #3
0
        private void tmUpdate_Tick(object sender, EventArgs e)
        {
            tmUpdate.Enabled = false;

            bool bCmd  = ML.CL_GetCmd(m_iActrId) == 0 ? true : false;
            bool bErr  = ML.CL_Err(m_iActrId);
            bool bDone = ML.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)ML.CL_GetCmd(m_iActrId) == 0)
                {
                    btAction.ImageIndex = iFwd; btAction.Text = sFwd;
                }
                else
                {
                    btAction.ImageIndex = iBwd; btAction.Text = sBwd;
                }
            }

            m_bPreCmd = bCmd;

            if (!this.Visible)
            {
                tmUpdate.Enabled = false;
                return;
            }
            tmUpdate.Enabled = true;
        }
Exemple #4
0
        private void btAction_Click(object sender, EventArgs e)
        {
            fb sCylderPos = 0;

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

            ML.CL_Move(m_iActrId, sCylderPos);

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

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

            //Log.Trace("Operator", sMsg);
            Log.Trace(sMsg, ti.Frm);
        }
Exemple #5
0
        private void btCyl_Click(object sender, EventArgs e)
        {
            string sText = ((Label)sender).Text;

            Log.Trace(sFormText + sText + " Button Clicked", ForContext.Frm);

            Label iSelLabel = sender as Label;

            if (iSelLabel == null)
            {
                return;
            }

            if (SEQ._bRun)
            {
                return;
            }


            int iSel = Convert.ToInt32(iSelLabel.Tag);

            ML.CL_Move(iSel, ML.CL_GetCmd(iSel) == fb.Fwd ? fb.Bwd : fb.Fwd);
        }
Exemple #6
0
        private void tmUpdate_Tick(object sender, EventArgs e)
        {
            tmUpdate.Enabled = false;
            //로그인/로그아웃 방식
            if (SM.FrmLogOn.GetLevel() == (int)EN_LEVEL.LogOff)
            {
                btOperator.Text = "  LOG IN";

                pnManual.Enabled = false;
            }
            else
            {
                btOperator.Text = "  " + SM.FrmLogOn.GetLevel().ToString();

                pnManual.Enabled = true;
            }

            //if (SML.FrmLogOn.GetLevel() != (int)EN_LEVEL.LogOff)
            //{
            //    btStart.Enabled = LOT.GetLotOpen();
            //}

            SPC.LOT.DispLotInfo(lvLotInfo);
            SPC.DAY.DispDayInfo(lvDayInfo);

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

            for (int i = 0; i < ML.ER_MaxCount(); i++)
            {
                if (ML.ER_GetErr((ei)i))
                {
                    iCrntErrCnt++;
                }
            }
            if (iPreErrCnt != iCrntErrCnt)
            {
                lbErr.Items.Clear();
                int iErrNo = ML.ER_GetLastErr();
                for (int i = 0; i < ML.ER_MaxCount(); i++)
                {
                    if (ML.ER_GetErr((ei)i))
                    {
                        Str  = string.Format("[ERR{0:000}]", i);
                        Str += ML.ER_GetErrName(i) + " " + ML.ER_GetErrSubMsg((ei)i);
                        lbErr.Items.Add(Str);
                    }
                }
            }
            if (SEQ._iSeqStat != EN_SEQ_STAT.Error)
            {
                lbErr.Items.Clear();
            }
            iPreErrCnt = iCrntErrCnt;

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

            if (LOT.GetLotOpen() && !SEQ._bRun)
            {
                btLotOpen.Text = "WORK ING";
                //btLotOpen.Enabled = true;
                btLotEnd.Enabled = true;
            }
            else
            {
                btLotOpen.Text = "WORK STT";
                //btLotOpen.Enabled = true ;
                btLotEnd.Enabled = false;
            }

            //결과 색 이름 표기
            pnC0.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor0); lbC0.Text = OM.CmnOptn.sRsltName0; lbCnt0.Text = OM.EqpStat.iRsltCnts[(int)cs.Rslt0].ToString();
            pnC1.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor1); lbC1.Text = OM.CmnOptn.sRsltName1; lbCnt1.Text = OM.EqpStat.iRsltCnts[(int)cs.Rslt1].ToString();
            pnC2.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor2); lbC2.Text = OM.CmnOptn.sRsltName2; lbCnt2.Text = OM.EqpStat.iRsltCnts[(int)cs.Rslt2].ToString();
            pnC3.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor3); lbC3.Text = OM.CmnOptn.sRsltName3; lbCnt3.Text = OM.EqpStat.iRsltCnts[(int)cs.Rslt3].ToString();
            pnC4.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor4); lbC4.Text = OM.CmnOptn.sRsltName4; lbCnt4.Text = OM.EqpStat.iRsltCnts[(int)cs.Rslt4].ToString();
            pnC5.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor5); lbC5.Text = OM.CmnOptn.sRsltName5; lbCnt5.Text = OM.EqpStat.iRsltCnts[(int)cs.Rslt5].ToString();
            pnC6.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor6); lbC6.Text = OM.CmnOptn.sRsltName6; lbCnt6.Text = OM.EqpStat.iRsltCnts[(int)cs.Rslt6].ToString();
            pnC7.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor7); lbC7.Text = OM.CmnOptn.sRsltName7; lbCnt7.Text = OM.EqpStat.iRsltCnts[(int)cs.Rslt7].ToString();
            pnC8.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor8); lbC8.Text = OM.CmnOptn.sRsltName8; lbCnt8.Text = OM.EqpStat.iRsltCnts[(int)cs.Rslt8].ToString();
            pnC9.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor9); lbC9.Text = OM.CmnOptn.sRsltName9; lbCnt9.Text = OM.EqpStat.iRsltCnts[(int)cs.Rslt9].ToString();
            pnCA.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorA); lbCA.Text = OM.CmnOptn.sRsltNameA; lbCntA.Text = OM.EqpStat.iRsltCnts[(int)cs.RsltA].ToString();
            pnCB.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorB); lbCB.Text = OM.CmnOptn.sRsltNameB; lbCntB.Text = OM.EqpStat.iRsltCnts[(int)cs.RsltB].ToString();
            pnCC.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorC); lbCC.Text = OM.CmnOptn.sRsltNameC; lbCntC.Text = OM.EqpStat.iRsltCnts[(int)cs.RsltC].ToString();
            pnCD.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorD); lbCD.Text = OM.CmnOptn.sRsltNameD; lbCntD.Text = OM.EqpStat.iRsltCnts[(int)cs.RsltD].ToString();
            pnCE.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorE); lbCE.Text = OM.CmnOptn.sRsltNameE; lbCntE.Text = OM.EqpStat.iRsltCnts[(int)cs.RsltE].ToString();
            pnCF.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorF); lbCF.Text = OM.CmnOptn.sRsltNameF; lbCntF.Text = OM.EqpStat.iRsltCnts[(int)cs.RsltF].ToString();
            pnCG.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorG); lbCG.Text = OM.CmnOptn.sRsltNameG; lbCntG.Text = OM.EqpStat.iRsltCnts[(int)cs.RsltG].ToString();
            pnCH.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorH); lbCH.Text = OM.CmnOptn.sRsltNameH; lbCntH.Text = OM.EqpStat.iRsltCnts[(int)cs.RsltH].ToString();
            pnCI.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorI); lbCI.Text = OM.CmnOptn.sRsltNameI; lbCntI.Text = OM.EqpStat.iRsltCnts[(int)cs.RsltI].ToString();
            pnCJ.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorJ); lbCJ.Text = OM.CmnOptn.sRsltNameJ; lbCntJ.Text = OM.EqpStat.iRsltCnts[(int)cs.RsltJ].ToString();
            pnCK.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorK); lbCK.Text = OM.CmnOptn.sRsltNameK; lbCntK.Text = OM.EqpStat.iRsltCnts[(int)cs.RsltK].ToString();
            pnCL.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorL); lbCL.Text = OM.CmnOptn.sRsltNameL; lbCntL.Text = OM.EqpStat.iRsltCnts[(int)cs.RsltL].ToString();

            C0.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor0);   T0.Text = OM.CmnOptn.sRsltName0;     N0.Text = OM.EqpStat.iPreRsltCnts[(int)cs.Rslt0].ToString();
            C1.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor1);   T1.Text = OM.CmnOptn.sRsltName1;     N1.Text = OM.EqpStat.iPreRsltCnts[(int)cs.Rslt1].ToString();
            C2.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor2);   T2.Text = OM.CmnOptn.sRsltName2;     N2.Text = OM.EqpStat.iPreRsltCnts[(int)cs.Rslt2].ToString();
            C3.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor3);   T3.Text = OM.CmnOptn.sRsltName3;     N3.Text = OM.EqpStat.iPreRsltCnts[(int)cs.Rslt3].ToString();
            C4.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor4);   T4.Text = OM.CmnOptn.sRsltName4;     N4.Text = OM.EqpStat.iPreRsltCnts[(int)cs.Rslt4].ToString();
            C5.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor5);   T5.Text = OM.CmnOptn.sRsltName5;     N5.Text = OM.EqpStat.iPreRsltCnts[(int)cs.Rslt5].ToString();
            C6.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor6);   T6.Text = OM.CmnOptn.sRsltName6;     N6.Text = OM.EqpStat.iPreRsltCnts[(int)cs.Rslt6].ToString();
            C7.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor7);   T7.Text = OM.CmnOptn.sRsltName7;     N7.Text = OM.EqpStat.iPreRsltCnts[(int)cs.Rslt7].ToString();
            C8.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor8);   T8.Text = OM.CmnOptn.sRsltName8;     N8.Text = OM.EqpStat.iPreRsltCnts[(int)cs.Rslt8].ToString();
            C9.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColor9);   T9.Text = OM.CmnOptn.sRsltName9;     N9.Text = OM.EqpStat.iPreRsltCnts[(int)cs.Rslt9].ToString();
            CA.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorA);   TA.Text = OM.CmnOptn.sRsltNameA;     NA.Text = OM.EqpStat.iPreRsltCnts[(int)cs.RsltA].ToString();
            CB.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorB);   TB.Text = OM.CmnOptn.sRsltNameB;     NB.Text = OM.EqpStat.iPreRsltCnts[(int)cs.RsltB].ToString();
            CC.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorC);   TC.Text = OM.CmnOptn.sRsltNameC;     NC.Text = OM.EqpStat.iPreRsltCnts[(int)cs.RsltC].ToString();
            CD.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorD);   TD.Text = OM.CmnOptn.sRsltNameD;     ND.Text = OM.EqpStat.iPreRsltCnts[(int)cs.RsltD].ToString();
            CE.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorE);   TE.Text = OM.CmnOptn.sRsltNameE;     NE.Text = OM.EqpStat.iPreRsltCnts[(int)cs.RsltE].ToString();
            CF.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorF);   TF.Text = OM.CmnOptn.sRsltNameF;     NF.Text = OM.EqpStat.iPreRsltCnts[(int)cs.RsltF].ToString();
            CG.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorG);   TG.Text = OM.CmnOptn.sRsltNameG;     NG.Text = OM.EqpStat.iPreRsltCnts[(int)cs.RsltG].ToString();
            CH.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorH);   TH.Text = OM.CmnOptn.sRsltNameH;     NH.Text = OM.EqpStat.iPreRsltCnts[(int)cs.RsltH].ToString();
            CI.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorI);   TI.Text = OM.CmnOptn.sRsltNameI;     NI.Text = OM.EqpStat.iPreRsltCnts[(int)cs.RsltI].ToString();
            CJ.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorJ);   TJ.Text = OM.CmnOptn.sRsltNameJ;     NJ.Text = OM.EqpStat.iPreRsltCnts[(int)cs.RsltJ].ToString();
            CK.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorK);   TK.Text = OM.CmnOptn.sRsltNameK;     NK.Text = OM.EqpStat.iPreRsltCnts[(int)cs.RsltK].ToString();
            CL.BackColor = Color.FromArgb(OM.CmnOptn.iRsltColorL);   TL.Text = OM.CmnOptn.sRsltNameL;     NL.Text = OM.EqpStat.iPreRsltCnts[(int)cs.RsltL].ToString();


            //인풋
            lbPREB_PkgInDetect.BackColor = ML.IO_GetX(xi.PREB_PkgInDetect) ? Color.Lime : Color.Gray; lbPREB_PkgInDetect.Text = ML.IO_GetX(xi.PREB_PkgInDetect) ? "ON" : "OFF";
            lbPREB_StrpDetect.BackColor  = ML.IO_GetX(xi.PREB_StrpDetect) ? Color.Lime : Color.Gray; lbPREB_StrpDetect.Text = ML.IO_GetX(xi.PREB_StrpDetect) ? "ON" : "OFF";
            lbRAIL_Vsn1Detect.BackColor  = ML.IO_GetX(xi.RAIL_Vsn1Detect) ? Color.Lime : Color.Gray; lbRAIL_Vsn1Detect.Text = ML.IO_GetX(xi.RAIL_Vsn1Detect) ? "ON" : "OFF";
            lbRAIL_Vsn2Detect.BackColor  = ML.IO_GetX(xi.RAIL_Vsn2Detect) ? Color.Lime : Color.Gray; lbRAIL_Vsn2Detect.Text = ML.IO_GetX(xi.RAIL_Vsn2Detect) ? "ON" : "OFF";
            lbRAIL_Vsn3Detect.BackColor  = ML.IO_GetX(xi.RAIL_Vsn3Detect) ? Color.Lime : Color.Gray; lbRAIL_Vsn3Detect.Text = ML.IO_GetX(xi.RAIL_Vsn3Detect) ? "ON" : "OFF";
            lbPSTB_MarkDetect.BackColor  = ML.IO_GetX(xi.PSTB_MarkDetect) ? Color.Lime : Color.Gray; lbPSTB_MarkDetect.Text = ML.IO_GetX(xi.PSTB_MarkDetect) ? "ON" : "OFF";
            lbPSTB_PkgDetect1.BackColor  = ML.IO_GetX(xi.PSTB_PkgDetect1) ? Color.Lime : Color.Gray; lbPSTB_PkgDetect1.Text = ML.IO_GetX(xi.PSTB_PkgDetect1) ? "ON" : "OFF";
            lbPSTB_PkgDetect2.BackColor  = ML.IO_GetX(xi.PSTB_PkgDetect2) ? Color.Lime : Color.Gray; lbPSTB_PkgDetect2.Text = ML.IO_GetX(xi.PSTB_PkgDetect2) ? "ON" : "OFF";

            //실린더
            lbPREB_StprUpDn.BackColor     = ML.CL_GetCmd(ci.PREB_StprUpDn) == fb.Fwd ? Color.Aqua : Color.Yellow; lbPREB_StprUpDn.Text = ML.CL_GetCmd(ci.PREB_StprUpDn) == fb.Fwd ? "UP" : "DN";
            lbRAIL_Vsn1StprUpDn.BackColor = ML.CL_GetCmd(ci.RAIL_Vsn1StprUpDn) == fb.Fwd ? Color.Aqua : Color.Yellow; lbRAIL_Vsn1StprUpDn.Text = ML.CL_GetCmd(ci.RAIL_Vsn1StprUpDn) == fb.Fwd ? "UP" : "DN";
            lbRAIL_Vsn2StprUpDn.BackColor = ML.CL_GetCmd(ci.RAIL_Vsn2StprUpDn) == fb.Fwd ? Color.Aqua : Color.Yellow; lbRAIL_Vsn2StprUpDn.Text = ML.CL_GetCmd(ci.RAIL_Vsn2StprUpDn) == fb.Fwd ? "UP" : "DN";
            lbRAIL_Vsn3StprUpDn.BackColor = ML.CL_GetCmd(ci.RAIL_Vsn3StprUpDn) == fb.Fwd ? Color.Aqua : Color.Yellow; lbRAIL_Vsn3StprUpDn.Text = ML.CL_GetCmd(ci.RAIL_Vsn3StprUpDn) == fb.Fwd ? "UP" : "DN";
            lbPSTB_MarkStprUpDn.BackColor = ML.CL_GetCmd(ci.PSTB_MarkStprUpDn) == fb.Fwd ? Color.Aqua : Color.Yellow; lbPSTB_MarkStprUpDn.Text = ML.CL_GetCmd(ci.PSTB_MarkStprUpDn) == fb.Fwd ? "UP" : "DN";

            lbPSTB_PusherFwBw.BackColor = ML.CL_GetCmd(ci.PSTB_PusherFwBw) == fb.Fwd ? Color.Aqua : Color.Yellow; lbPSTB_PusherFwBw.Text = ML.CL_GetCmd(ci.PSTB_PusherFwBw) == fb.Fwd ? "FW" : "BW";

            lbRAIL_Vsn1AlignFwBw.BackColor = ML.CL_GetCmd(ci.RAIL_Vsn1AlignFwBw) == fb.Fwd ? Color.Aqua : Color.Yellow; lbRAIL_Vsn1AlignFwBw.Text = ML.CL_GetCmd(ci.RAIL_Vsn1AlignFwBw) == fb.Fwd ? "FW" : "BW";
            lbRAIL_Vsn2AlignFwBw.BackColor = ML.CL_GetCmd(ci.RAIL_Vsn2AlignFwBw) == fb.Fwd ? Color.Aqua : Color.Yellow; lbRAIL_Vsn2AlignFwBw.Text = ML.CL_GetCmd(ci.RAIL_Vsn2AlignFwBw) == fb.Fwd ? "FW" : "BW";
            lbRAIL_Vsn3AlignFwBw.BackColor = ML.CL_GetCmd(ci.RAIL_Vsn3AlignFwBw) == fb.Fwd ? Color.Aqua : Color.Yellow; lbRAIL_Vsn3AlignFwBw.Text = ML.CL_GetCmd(ci.RAIL_Vsn3AlignFwBw) == fb.Fwd ? "FW" : "BW";
            lbPSTB_MarkAlignFWBw.BackColor = ML.CL_GetCmd(ci.PSTB_MarkAlignFWBw) == fb.Fwd ? Color.Aqua : Color.Yellow; lbPSTB_MarkAlignFWBw.Text = ML.CL_GetCmd(ci.PSTB_MarkAlignFWBw) == fb.Fwd ? "FW" : "BW";

            lbRAIL_Vsn1SttnUpDn.BackColor = ML.CL_GetCmd(ci.RAIL_Vsn1SttnUpDn) == fb.Fwd ? Color.Aqua : Color.Yellow; lbRAIL_Vsn1SttnUpDn.Text = ML.CL_GetCmd(ci.RAIL_Vsn1SttnUpDn) == fb.Fwd ? "UP" : "DN";
            lbRAIL_Vsn2SttnUpDn.BackColor = ML.CL_GetCmd(ci.RAIL_Vsn2SttnUpDn) == fb.Fwd ? Color.Aqua : Color.Yellow; lbRAIL_Vsn2SttnUpDn.Text = ML.CL_GetCmd(ci.RAIL_Vsn2SttnUpDn) == fb.Fwd ? "UP" : "DN";
            lbRAIL_Vsn3SttnUpDn.BackColor = ML.CL_GetCmd(ci.RAIL_Vsn3SttnUpDn) == fb.Fwd ? Color.Aqua : Color.Yellow; lbRAIL_Vsn3SttnUpDn.Text = ML.CL_GetCmd(ci.RAIL_Vsn3SttnUpDn) == fb.Fwd ? "UP" : "DN";
            lbPSTB_MarkSttnUpDn.BackColor = ML.CL_GetCmd(ci.PSTB_MarkSttnUpDn) == fb.Fwd ? Color.Aqua : Color.Yellow; lbPSTB_MarkSttnUpDn.Text = ML.CL_GetCmd(ci.PSTB_MarkSttnUpDn) == fb.Fwd ? "UP" : "DN";

            //아웃풋.
            lbRAIL_FeedingAC1.BackColor = ML.IO_GetY(yi.RAIL_FeedingAC1) ? Color.Lime : Color.Gray; lbRAIL_FeedingAC1.Text = ML.IO_GetY(yi.RAIL_FeedingAC1) ? "ON" : "OFF";
            lbRAIL_FeedingAC2.BackColor = ML.IO_GetY(yi.RAIL_FeedingAC2) ? Color.Lime : Color.Gray; lbRAIL_FeedingAC2.Text = ML.IO_GetY(yi.RAIL_FeedingAC2) ? "ON" : "OFF";
            lbRAIL_FeedingAC3.BackColor = ML.IO_GetY(yi.RAIL_FeedingAC3) ? Color.Lime : Color.Gray; lbRAIL_FeedingAC3.Text = ML.IO_GetY(yi.RAIL_FeedingAC3) ? "ON" : "OFF";
            lbMainAir.BackColor         = ML.IO_GetY(yi.ETC_MainAirOnOff) ? Color.Lime : Color.Gray; lbMainAir.Text = ML.IO_GetY(yi.ETC_MainAirOnOff) ? "ON" : "OFF";

            PanelRefresh();

            //Strip Check
            bool Strip1 = !DM.ARAY[ri.PREB].CheckAllStat(cs.None); bool Sensor1 = ML.IO_GetX(xi.PREB_StrpDetect);
            bool Strip2 = !DM.ARAY[ri.VSN1].CheckAllStat(cs.None); bool Sensor2 = ML.IO_GetX(xi.RAIL_Vsn1Detect);
            bool Strip3 = !DM.ARAY[ri.VSN2].CheckAllStat(cs.None); bool Sensor3 = ML.IO_GetX(xi.RAIL_Vsn2Detect);
            bool Strip4 = !DM.ARAY[ri.VSN3].CheckAllStat(cs.None); bool Sensor4 = ML.IO_GetX(xi.RAIL_Vsn3Detect);
            bool Strip5 = !DM.ARAY[ri.PSTB].CheckAllStat(cs.None); bool Sensor5 = ML.IO_GetX(xi.PSTB_MarkDetect) || ML.IO_GetX(xi.PSTB_PkgDetect1) || ML.IO_GetX(xi.PSTB_PkgDetect2);

            bool Lift1Dn = ML.CL_Complete(ci.RAIL_Vsn1SttnUpDn, fb.Bwd);
            bool Lift2Dn = ML.CL_Complete(ci.RAIL_Vsn2SttnUpDn, fb.Bwd);
            bool Lift3Dn = ML.CL_Complete(ci.RAIL_Vsn3SttnUpDn, fb.Bwd);
            bool Lift4Dn = ML.CL_Complete(ci.PSTB_MarkSttnUpDn, fb.Bwd);

            if (Strip1 && Sensor1)
            {
                s1.Visible = true;
            }
            else if (!Strip1 && !Sensor1)
            {
                s1.Visible = false;
            }
            else
            {
                s1.Visible = SEQ._bFlick ? true : false;
            }
            if (Strip2 && Sensor2)
            {
                s2.Visible = true;
            }
            else if (Strip2 && !Sensor2 && !Lift1Dn)
            {
                s2.Visible = true;
            }
            else if (!Strip2 && !Sensor2)
            {
                s2.Visible = false;
            }
            else
            {
                s2.Visible = SEQ._bFlick ? true : false;
            }
            if (Strip3 && Sensor3)
            {
                s3.Visible = true;
            }
            else if (Strip3 && !Sensor3 && !Lift2Dn)
            {
                s3.Visible = true;
            }
            else if (!Strip3 && !Sensor3)
            {
                s3.Visible = false;
            }
            else
            {
                s3.Visible = SEQ._bFlick ? true : false;
            }
            if (Strip4 && Sensor4)
            {
                s4.Visible = true;
            }
            else if (Strip4 && !Sensor4 && !Lift3Dn)
            {
                s4.Visible = true;
            }
            else if (!Strip4 && !Sensor4)
            {
                s4.Visible = false;
            }
            else
            {
                s4.Visible = SEQ._bFlick ? true : false;
            }
            if (Strip5 && Sensor5)
            {
                s5.Visible = true;
            }
            else if (Strip5 && !Sensor5 && !Lift4Dn)
            {
                s5.Visible = true;
            }
            else if (!Strip5 && !Sensor5)
            {
                s5.Visible = false;
            }
            else
            {
                s5.Visible = SEQ._bFlick ? true : false;
            }



            //Sensor
            RA1.BackColor = ML.IO_GetX(xi.PREB_PkgInDetect) ? Color.Lime : SystemColors.ActiveCaption;
            RA2.BackColor = ML.IO_GetX(xi.PREB_StrpDetect) ? Color.Lime : SystemColors.ActiveCaption;
            RB1.BackColor = ML.IO_GetX(xi.RAIL_Vsn1Detect) ? Color.Lime : SystemColors.ActiveCaption;
            RC1.BackColor = ML.IO_GetX(xi.RAIL_Vsn2Detect) ? Color.Lime : SystemColors.ActiveCaption;
            RD1.BackColor = ML.IO_GetX(xi.RAIL_Vsn3Detect) ? Color.Lime : SystemColors.ActiveCaption;
            RE1.BackColor = ML.IO_GetX(xi.PSTB_MarkDetect) ? Color.Lime : SystemColors.ActiveCaption;
            RF1.BackColor = ML.IO_GetX(xi.PSTB_PkgDetect1) ? Color.Lime : SystemColors.ActiveCaption;
            RF2.BackColor = ML.IO_GetX(xi.PSTB_PkgDetect2) ? Color.Lime : SystemColors.ActiveCaption;

            tmUpdate.Enabled = true;
        }
Exemple #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;
            }

            if ((int)ML.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");
        }