private void btLotOpen_Click(object sender, EventArgs e) { if (tbLotId.Text == "") { tbLotId.Text = DateTime.Now.ToString("HHmmss"); } string LotNo = tbLotId.Text.Trim(); string Device = tbSelDevice.Text.Trim(); DM.ARAY[(int)ri.IDX].SetStat(cs.Empty); SPC.LOT.ClearData(); if (!SM.IO_GetX(xi.IDX_Detect1)) { DM.ARAY[ri.IDX].SetStat(0, 0, cs.Unkwn); } else { DM.ARAY[ri.IDX].SetStat(0, 0, cs.Empty); } if (!SM.IO_GetX(xi.IDX_Detect2)) { DM.ARAY[ri.IDX].SetStat(0, 1, cs.Unkwn); } else { DM.ARAY[ri.IDX].SetStat(0, 1, cs.Empty); } if (!SM.IO_GetX(xi.IDX_Detect3)) { DM.ARAY[ri.IDX].SetStat(0, 2, cs.Unkwn); } else { DM.ARAY[ri.IDX].SetStat(0, 2, cs.Empty); } if (!SM.IO_GetX(xi.IDX_Detect4)) { DM.ARAY[ri.IDX].SetStat(0, 3, cs.Unkwn); } else { DM.ARAY[ri.IDX].SetStat(0, 3, cs.Empty); } if (!SM.IO_GetX(xi.IDX_Detect5)) { DM.ARAY[ri.IDX].SetStat(0, 4, cs.Unkwn); } else { DM.ARAY[ri.IDX].SetStat(0, 4, cs.Empty); } LOT.LotOpen(LotNo, Device); Log.Trace("LotOpen", "Try"); OM.EqpStat.iWorkCnt = 0; Close(); }
private void btLotOpen_Click(object sender, EventArgs e) { string sText = ((Button)sender).Text; Log.Trace(sFormText + sText + " Button Clicked", ti.Frm); if (tbLotNo.Text == "") { return; // tbLotId.Text = DateTime.Now.ToString("HHmmss"); } string LotNo = tbLotNo.Text.Trim(); string Device = tbSelDevice.Text.Trim(); LOT.TLot Lot; Lot.sLotNo = tbLotNo.Text.Trim(); LOT.LotOpen(Lot); //Log.Trace("LotOpen", "Try"); //CDelayTimer TimeOut = new CDelayTimer(); //TimeOut.Clear(); //SEQ.Visn.SendLotStart(Lot.sLotNo); //while(!SEQ.Visn.GetSendCycleEnd(VisnCom.vs.LotStart )){ // Thread.Sleep(1); // if(TimeOut.OnDelay(5000)) { // SM.ER_SetErr(ei.VSN_ComErr,"Lot Start TimeOut"); // break; // } //} DM.ARAY[ri.LODR].SetStat(cs.Unknown); DM.ARAY[ri.PLDR].SetStat(cs.None); DM.ARAY[ri.TLDR].SetStat(cs.None); DM.ARAY[ri.TVSN].SetStat(cs.None); DM.ARAY[ri.TMRK].SetStat(cs.None); DM.ARAY[ri.TULD].SetStat(cs.None); DM.ARAY[ri.TRJM].SetStat(cs.None); DM.ARAY[ri.TRJV].SetStat(cs.None); DM.ARAY[ri.PULD].SetStat(cs.None); DM.ARAY[ri.ULDR].SetStat(cs.Empty); DM.ARAY[ri.PICK].SetStat(cs.None); DM.ARAY[ri.PSHR].SetStat(cs.None); // DM.ARAY[ri.BPCK].SetStat(cs.None ); Close(); }
//private void UpdateLotList() //{ // lvLot.Clear(); // lvLot.View = View.Details; // lvLot.LabelEdit = true; // lvLot.AllowColumnReorder = true; // lvLot.FullRowSelect = true; // lvLot.GridLines = true; // //lvLot.Sorting = SortOrder.Descending; // lvLot.Scrollable = true; // // Type type = typeof(LOT.TLot); // int iCntOfItem = type.GetProperties().Length; // FieldInfo[] f = type.GetFields(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Instance); // // //컬럼추가 하고 이름을 넣는다. // lvLot.Columns.Add("No", 30, HorizontalAlignment.Left); // for (int c = 0; c < f.Length; c++) // { // lvLot.Columns.Add(f[c].Name, 90, HorizontalAlignment.Left); // } // // // lvLot.Items.Clear(); // string sValue = ""; // string sName = ""; // //ListViewItem[] liitem = new ListViewItem[LOT.LotList.Count]; // //for (int r = 0; r < LOT.LotList.Count; r++) // //{ // // liitem[r] = new ListViewItem(string.Format("{0}", r)); // // for (int c = 0; c < f.Length; c++) // // { // // sName = f[c].Name; // // sValue = f[c].GetValue(LOT.LotList[r]).ToString(); // // liitem[r].SubItems.Add(sValue); // // } // // liitem[r].UseItemStyleForSubItems = false; // // lvLot.Items.Add(liitem[r]); // //} // //lvLot.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); // //} private void btLotOpen_Click(object sender, EventArgs e) { if (tbLotNo.Text == "") { Log.ShowMessage("Error", "랏넘버가 공백입니다."); return; } string LotNo = tbLotNo.Text.Trim(); string Device = tbSelDevice.Text.Trim(); LOT.TLot Lot; Lot.sEmployeeID = tbEmployeeID.Text.Trim(); Lot.sLotNo = tbLotNo.Text.Trim(); LOT.LotOpen(Lot); Log.Trace("LotOpen", "Try"); Close(); }
private void btLotOpen_Click(object sender, EventArgs e) { if (tbLotNo.Text == "") { Log.ShowMessage("Error", "Lot No is Empty"); return;// tbLotId.Text = DateTime.Now.ToString("HHmmss"); } if (tbMaterialNo.Text == "") { Log.ShowMessage("Error", "Material No is Empty"); return;// tbLotId.Text = DateTime.Now.ToString("HHmmss"); } if (tbLotAlias.Text == "") { Log.ShowMessage("Error", "Lot Alias is Empty"); return;// tbLotId.Text = DateTime.Now.ToString("HHmmss"); } if (tbEmployeeID.Text == "") { Log.ShowMessage("Error", "EmployeeID is Empty"); return;// tbLotId.Text = DateTime.Now.ToString("HHmmss"); } if (!SM.IO_GetX(xi.VISN_Ready)) { Log.ShowMessage("Vision", SM.IO_GetXName(xi.VISN_Ready) + "Vision Ready IO is not On"); return; } OM.EqpStat.bWrapingEnd = false; Log.Trace("LotOpen", "Try"); string LotNo = tbLotNo.Text.Trim(); string Device = tbSelDevice.Text.Trim(); CDelayTimer TimeOut = new CDelayTimer(); TimeOut.Clear(); SEQ.Visn.SendLotStart(LotNo); while (!SEQ.Visn.GetSendCycleEnd(VisnCom.vs.LotStart)) { Thread.Sleep(1); if (TimeOut.OnDelay(5000)) { Log.ShowMessage("Vision", "Lot Start TimeOut"); return; } } OM.EqpStat.iWorkBundle = 0; LOT.TLot Lot; Lot.sEmployeeID = tbEmployeeID.Text.Trim(); Lot.sLotNo = tbLotNo.Text.Trim(); Lot.sMaterialNo = tbMaterialNo.Text.Trim(); Lot.sLotAlias = tbLotAlias.Text.Trim(); LOT.LotOpen(Lot); OM.EqpStat.sLotSttTime = DateTime.Now.ToString("HH:mm:ss"); if (!OM.CmnOptn.bOracleNotUse && !OM.CmnOptn.bIdleRun) { if (SEQ.Oracle.ProcessLotOpen(Lot.sLotNo, Lot.sMaterialNo, Lot.sLotAlias)) { if (!DeviceChange(SEQ.Oracle.Stat.sVisionRecipe_RecipeName)) { Log.ShowMessage("Device", "'" + SEQ.Oracle.Stat.sVisionRecipe_RecipeName + "'" + "dosn't exist!"); } } else { Log.ShowMessage("Oracle", SEQ.Oracle.GetLastMsg()); return; } //유닛아이디 리스트 만들기 시간 오래 걸려서 //별도 스레드 만듬. SEQ.Oracle.ThreadMakeUnitIDDMC1List(); } else { //Device Change에서 함. DM.ARAY[ri.SPLR].SetStat(cs.None); DM.ARAY[ri.IDXR].SetStat(cs.None); DM.ARAY[ri.IDXF].SetStat(cs.None); DM.ARAY[ri.PCKR].SetStat(cs.None); DM.ARAY[ri.TRYF].SetStat(cs.None); DM.ARAY[ri.TRYG].SetStat(cs.Good); DM.ARAY[ri.OUTZ].SetStat(cs.None); DM.ARAY[ri.STCK].SetStat(cs.Empty); DM.ARAY[ri.BARZ].SetStat(cs.None); DM.ARAY[ri.INSP].SetStat(cs.Good); DM.ARAY[ri.PSTC].SetStat(cs.None); Close(); } //if (Log.ShowMessageModal("Confirm", "Do you want to All Homming?") != DialogResult.Yes) ; //20180305 오스람 요청... 랏오픈시에 올홈. MM.SetManCycle(mc.AllHome); }
public bool CycleWork() { String sTemp; if (m_tmCycle.OnDelay(Step.iCycle != 0 && Step.iCycle == PreStep.iCycle && CheckStop() && !OM.MstOptn.bDebugMode, 5000)) { sTemp = string.Format("Time Out Step.iCycle={0:00}", Step.iCycle); sTemp = m_sPartName + " " + Step.eSeq.ToString() + sTemp; IO_SetY(yi.LODR_MgzInAC, false); IO_SetY(yi.LODR_MgzOutAC, false); IO_SetY(yi.PREB_AirBlower, false); IO_SetY(yi.RAIL_FeedingAC1, false); ER_SetErr(ei.ETC_CycleTO, sTemp); Trace(sTemp); return(true); } if (Step.iCycle != PreStep.iCycle) { sTemp = string.Format("Cycle Step.iCycle={0:00}", Step.iCycle); Trace(sTemp); } PreStep.iCycle = Step.iCycle; if (Stat.bReqStop) { //return true ; } int r, c = 0; //double dPos = 0; switch (Step.iCycle) { default: sTemp = string.Format("Cycle Default Clear Step.iCycle={0:00}", Step.iCycle); return(true); case 10: dPos = (DM.ARAY[ri.LODR].GetMaxRow() - DM.ARAY[ri.LODR].FindLastRow(cs.Unknown) - 1) * OM.DevInfo.dMgzPitch; double dWorkStt = PM.GetValue(mi.LODR_ZClmp, pv.ULDR_ZClmpWorkStart) + dPos; if (!MT_CmprPos(mi.LODR_ZClmp, dWorkStt) && IO_GetX(xi.PREB_PkgInDetect)) { ER_SetErr(ei.LODR_SupplyFail, "Pre Buffer In Sensor Checked"); return(true); } MoveCyl(ci.LODR_ClampUpDn, fb.Fwd); MoveCyl(ci.LODR_PusherFwBw, fb.Bwd); IO_SetY(yi.LODR_MgzInAC, false); IO_SetY(yi.LODR_MgzOutAC, false); Step.iCycle++; return(false); case 11: if (!CL_Complete(ci.LODR_ClampUpDn, fb.Fwd)) { return(false); } if (!CL_Complete(ci.LODR_PusherFwBw, fb.Bwd)) { return(false); } MoveMotr(mi.LODR_YClmp, pv.LODR_YClmpWork); Step.iCycle++; return(false); case 12: if (!MT_GetStopPos(mi.LODR_YClmp, pv.LODR_YClmpWork)) { return(false); } dPos = (DM.ARAY[ri.LODR].GetMaxRow() - DM.ARAY[ri.LODR].FindLastRow(cs.Unknown) - 1) * OM.DevInfo.dMgzPitch; MoveMotr(mi.LODR_ZClmp, pv.LODR_ZClmpWorkStart, dPos); Step.iCycle++; return(false); case 13: if (!MT_GetStopPos(mi.LODR_ZClmp, pv.LODR_ZClmpWorkStart, dPos)) { return(false); } MoveCyl(ci.LODR_PusherFwBw, fb.Fwd); IO_SetY(yi.RAIL_FeedingAC1, true); Step.iCycle++; return(false); case 14: if (IO_GetX(xi.LODR_PushOverload)) { MoveCyl(ci.LODR_PusherFwBw, fb.Bwd); ER_SetErr(ei.LODR_PushOverload); return(true); } if (!CL_Complete(ci.LODR_PusherFwBw, fb.Fwd)) { return(false); } if (!IO_GetX(xi.PREB_PkgInDetect)) //Have no strip { MoveCyl(ci.LODR_PusherFwBw, fb.Bwd); r = DM.ARAY[ri.LODR].FindLastRow(cs.Unknown); DM.ARAY[ri.LODR].SetStat(0, r, cs.Empty); Step.iCycle = 20; return(false); } //요기서 살짝 씀 SEQ.PREB.MoveCyl(ci.PREB_StprUpDn, fb.Fwd); IO_SetY(yi.PREB_AirBlower, true); MoveCyl(ci.LODR_PusherFwBw, fb.Bwd); Step.iCycle++; return(false); case 20: //Have no strip case if (!CL_Complete(ci.LODR_PusherFwBw, fb.Bwd)) { return(false); } IO_SetY(yi.RAIL_FeedingAC1, false); Step.iCycle = 0; return(true); case 15: if (!CL_Complete(ci.PREB_StprUpDn, fb.Fwd)) { return(false); } //IO_SetY(yi.RAIL_FeedingAC1,true); m_tmDelay.Clear(); Step.iCycle++; return(false); case 16: if (m_tmDelay.OnDelay(4000)) { IO_SetY(yi.RAIL_FeedingAC1, false); IO_SetY(yi.PREB_AirBlower, false); ER_SetErr(ei.RAIL_FeedingFail, "Loader Pusher Feeding Fail"); return(true); } if (!IO_GetX(xi.PREB_StrpDetect)) { return(false); } m_tmDelay.Clear(); Step.iCycle++; return(false); case 17: if (!m_tmDelay.OnDelay(100)) { return(false); //자꾸 튕겨서 센서밖으로 나가서. } IO_SetY(yi.RAIL_FeedingAC1, false); IO_SetY(yi.PREB_AirBlower, false); //?? 쉬프트로 하면 안됌.//DM.ShiftData(ri.LODR,ri.PREB); r = DM.ARAY[ri.LODR].FindLastRow(cs.Unknown); DM.ARAY[ri.LODR].SetStat(0, r, cs.Empty); DM.ARAY[ri.PREB].SetStat(cs.Unknown); DM.ARAY[ri.PREB].LotNo = DM.ARAY[ri.LODR].LotNo; DM.ARAY[ri.PREB].ID = (LOT.GetWorkMgzCnt() * 100 + r).ToString(); //100자리는 메거진카운트 10자리까진 슬롯. OM.CmnOptn.sLdrPreLotNo = DM.ARAY[ri.PREB].LotNo; OM.CmnOptn.sLdrPreLotId = DM.ARAY[ri.PREB].ID; if (LOT.GetLotNo() != DM.ARAY[ri.PREB].LotNo) { LOT.LotOpen(DM.ARAY[ri.PREB].LotNo); OM.EqpStat.iPreRsltCnts = (int [])OM.EqpStat.iRsltCnts.Clone(); System.Array.Clear(OM.EqpStat.iRsltCnts, 0, OM.EqpStat.iRsltCnts.Length); //OM.EqpStat.iRsltCnts.Initialize(); } m_tmDelay.Clear(); Step.iCycle++; return(false); case 18: if (!m_tmDelay.OnDelay(1000)) { return(false); //자꾸 튕겨서 센서밖으로 나가서. } if (IO_GetX(xi.PREB_StrpDetect)) { Step.iCycle = 0; return(true); } IO_SetY(yi.RAIL_FeedingAC1, true); m_tmDelay.Clear(); Step.iCycle++; return(false); case 19: if (!m_tmDelay.OnDelay(300)) { return(false); //자꾸 튕겨서 센서밖으로 나가서. } IO_SetY(yi.RAIL_FeedingAC1, false); Step.iCycle = 0; return(true); } }
private void button26_Click(object sender, EventArgs e) { LOT.LotOpen(tbLotNo.Text); }