private void timer1_Tick(object sender, EventArgs e) { tmUpdate.Enabled = false; //Information lbDevice.Text = OM.GetCrntDev().ToString(); lbLotNo.Text = LOT.GetLotNo(); btStart.Enabled = LOT.GetLotOpen(); btLotEnd.Enabled = LOT.GetLotOpen(); bool bRet = false; IsWow64Process(System.Diagnostics.Process.GetCurrentProcess().Handle, out bRet); //if (bRet) label3.Text = "32BIt"; //else label3.Text = "64BIt"; //패스워드만 쓰는 방식 //int iLevel = (int)FormPassword.GetLevel(); //switch (iLevel) //{ // case (int)EN_LEVEL.Operator: btOperator.Text = "OPERATOR"; break; // case (int)EN_LEVEL.Engineer: btOperator.Text = "ENGINEER"; break; // case (int)EN_LEVEL.Master : btOperator.Text = " ADMIN "; break; // default : btOperator.Text = " ERROR "; break; //} //로그인/로그아웃 방식 if (SM.FrmLogOn.GetLevel() == (int)EN_LEVEL.LogOff) { btOperator.Text = " LOG IN"; pnULDR.Enabled = false; pnPSHR.Enabled = false; pnPICK.Enabled = false; pnPULD.Enabled = false; pnTULD.Enabled = false; pnTMRK.Enabled = false; pnTRJM.Enabled = false; pnTVSN.Enabled = false; pnTLDR.Enabled = false; pnTRJV.Enabled = false; pnPLDR.Enabled = false; pnLODR.Enabled = false; //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; btHome.Enabled = false; btOperator.Enabled = true; } else { pnULDR.Enabled = true; pnPSHR.Enabled = true; pnPICK.Enabled = true; pnPULD.Enabled = true; pnTULD.Enabled = true; pnTMRK.Enabled = true; pnTRJM.Enabled = true; pnTVSN.Enabled = true; pnTLDR.Enabled = true; pnTRJV.Enabled = true; pnPLDR.Enabled = true; pnLODR.Enabled = true; btOperator.Text = " " + SM.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; btHome.Enabled = true; } //if (SML.FrmLogOn.GetLevel() != (int)EN_LEVEL.LogOff) //{ // btStart.Enabled = LOT.GetLotOpen(); //} TimeSpan Span; try{ Span = TimeSpan.FromMilliseconds(SPC.LOT.Data.RunTime); } catch (Exception ex) { Span = TimeSpan.FromMilliseconds(0); } //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; WorkInfo(); string sCycleTimeSec; int iCycleTimeMs; //Door Sensor. 나중에 찾아보자 //bool isAllCloseDoor = SM.IO.GetX((int)EN_INPUT_ID.xETC_DoorFt) && // SM.IO.GetX((int)EN_INPUT_ID.xETC_DoorLt) && // SM.IO.GetX((int)EN_INPUT_ID.xETC_DoorRt) && // SM.IO.GetX((int)EN_INPUT_ID.xETC_DoorRr) ; //if (FormPassword.GetLevel() != EN_LEVEL.lvOperator && isAllCloseDoor && CMachine._bRun) //{ // //FM_SetLevel(lvOperator); //} if (!ML.MT_GetHomeDoneAll()) { btAllHome.ForeColor = SEQ._bFlick ? Color.Black : Color.Red; } else { btAllHome.ForeColor = Color.Black; } SPC.LOT.DispLotInfo(lvLotInfo); //Refresh(); //Invalidate(true); pnULDR.Invalidate(true); pnPSHR.Invalidate(true); pnPICK.Invalidate(true); pnPULD.Invalidate(true); pnTULD.Invalidate(true); pnTMRK.Invalidate(true); pnTRJM.Invalidate(true); pnTVSN.Invalidate(true); pnTLDR.Invalidate(true); pnTRJV.Invalidate(true); pnPLDR.Invalidate(true); pnLODR.Invalidate(true); //pnLODR.Update(); if (ML.IO_GetY(yi.ETC_LightOn)) { btlightOn.Text = " LIGHT ON "; } //btlightOn.BackColor = Color.Lime;} else { btlightOn.Text = " LIGHT OFF"; } //btlightOn.BackColor = Color.Red ;} if (ML.IO_GetY(yi.MARK_Light)) { btMarklightOn.Text = " MARK LIGHT ON "; } //btlightOn.BackColor = Color.Lime;} else { btMarklightOn.Text = " MARK LIGHT OFF"; } //btlightOn.BackColor = Color.Red ;} if (!this.Visible) { tmUpdate.Enabled = false; return; } tmUpdate.Enabled = true; }
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; }