/// <summary> /// Primary Message를 Biuld하여 Transaction을 Return한다. /// </summary> /// <param name="strParameters">Parameter 문자열</param> public Transaction funPrimarySend(string strParameters) { string strGLSID = ""; string[] arrayEvent; try { arrayEvent = strParameters.Split(','); int dintCEID = 1025; pMsgTran = pSecsDrv.MakeTransaction(this.StrPrimaryMsgName); pMsgTran.Primary().Item("DATAID").Putvalue(0); pMsgTran.Primary().Item("CEID").Putvalue(dintCEID); pMsgTran.Primary().Item("MODULEID").Putvalue(pInfo.Unit(3).SubUnit(Convert.ToInt32(arrayEvent[4])).ModuleID); pMsgTran.Primary().Item("MCMD").Putvalue(pInfo.All.ControlState); pMsgTran.Primary().Item("MODULE_STATE").Putvalue(pInfo.Unit(0).SubUnit(0).EQPState); pMsgTran.Primary().Item("PROC_STATE").Putvalue(pInfo.Unit(0).SubUnit(0).EQPProcessState); pMsgTran.Primary().Item("L3_1_Count").Putvalue(1); strGLSID = arrayEvent[2]; InfoAct.clsGLS CurrentGLS = pInfo.GLSID(strGLSID); if (CurrentGLS == null) { pMsgTran.Primary().Item("H_GLASS_ID" + 0).Putvalue(""); pMsgTran.Primary().Item("MATERIAL_ID" + 0).Putvalue(""); pMsgTran.Primary().Item("USE_COUNT" + 0).Putvalue(""); pMsgTran.Primary().Item("PROCESS_ACT" + 0).Putvalue(""); pMsgTran.Primary().Item("LIBRARYID" + 0).Putvalue(""); pMsgTran.Primary().Item("LOCATION" + 0).Putvalue(""); pMsgTran.Primary().Item("ADDITION_NAME1" + 0).Putvalue(""); pMsgTran.Primary().Item("ADDITION_NAME2" + 0).Putvalue(""); pMsgTran.Primary().Item("ADDITION_NAME3" + 0).Putvalue(""); pMsgTran.Primary().Item("ADDITION_NAME4" + 0).Putvalue(""); } else { pMsgTran.Primary().Item("H_GLASS_ID" + 0).Putvalue(CurrentGLS.H_PANELID); pMsgTran.Primary().Item("MATERIAL_ID" + 0).Putvalue(CurrentGLS.FilmID); pMsgTran.Primary().Item("USE_COUNT" + 0).Putvalue(CurrentGLS.USE_COUNT.PadLeft(3, '0')); pMsgTran.Primary().Item("PROCESS_ACT" + 0).Putvalue(""); pMsgTran.Primary().Item("LIBRARYID" + 0).Putvalue(""); pMsgTran.Primary().Item("LOCATION" + 0).Putvalue(""); pMsgTran.Primary().Item("ADDITION_NAME1" + 0).Putvalue(""); pMsgTran.Primary().Item("ADDITION_NAME2" + 0).Putvalue(""); pMsgTran.Primary().Item("ADDITION_NAME3" + 0).Putvalue(""); pMsgTran.Primary().Item("ADDITION_NAME4" + 0).Putvalue(""); } return(pMsgTran); } catch (Exception error) { funSetLog(InfoAct.clsInfo.LogType.CIM, error.ToString()); return(null); } }
/// <summary> /// CIM에서 설비로 발생하는 Event에 대한 처리 /// </summary> /// <param name="parameters">Parameter Array</param> /// <remarks> /// parameters[0] : cmdName /// parameters[1] : 1st parameter /// parameters[2] : 2nd parameter /// parameters[3] : 3rd parameter /// parameters[4] : 4th parameter /// parameters[5] : 5th Parameter /// </remarks> public void funProcessCIMEvent(object[] parameters) { string dstrBitAddress = "B0020"; string dstrWordAddress = "W0100"; string dstrLOTID = ""; string dstrGLSID = ""; int dintUnitID = 0; try { dstrLOTID = parameters[0].ToString().Trim(); dstrGLSID = parameters[1].ToString().Trim(); dintUnitID = Convert.ToInt32(parameters[2].ToString()); InfoAct.clsLOT CurrentLot = pInfo.LOTID(dstrLOTID); if (CurrentLot == null) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, string.Format("Scrap Index Report Error!! Current Lot Error!! LOTID : {0}, GLSID : {1}, UnitNo : {2}", dstrLOTID, dstrGLSID, dintUnitID)); return; } InfoAct.clsGLS CurrentGLS = CurrentLot.GLSID(dstrGLSID); if (CurrentGLS == null) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, string.Format("Scrap Index Report Error!! Current GLS Error!! LOTID : {0}, GLSID : {1}, UnitNo : {2}", dstrLOTID, dstrGLSID, dintUnitID)); return; } dstrWordAddress = CommonAct.FunTypeConversion.funAddressAdd(dstrWordAddress, 16 * (dintUnitID - 2)); pEqpAct.funWordWrite(dstrWordAddress, pInfo.Port(CurrentLot.InPortID).HostReportPortID, EnuEQP.PLCRWType.ASCII_Data); dstrWordAddress = CommonAct.FunTypeConversion.funAddressAdd(dstrWordAddress, 2); pEqpAct.funWordWrite(dstrWordAddress, CurrentGLS.SlotID.ToString(), EnuEQP.PLCRWType.Int_Data); dstrWordAddress = CommonAct.FunTypeConversion.funAddressAdd(dstrWordAddress, 1); pEqpAct.funWordWrite(dstrWordAddress, dstrGLSID.PadRight(20), EnuEQP.PLCRWType.ASCII_Data); //LotStartFlag 처리 dstrWordAddress = CommonAct.FunTypeConversion.funAddressAdd(dstrWordAddress, 10); //pEqpAct.funWordWrite(dstrWordAddress, , EnuEQP.PLCRWType.Int_Data); //LotEndFlag 처리 dstrWordAddress = CommonAct.FunTypeConversion.funAddressAdd(dstrWordAddress, 10); //pEqpAct.funWordWrite(dstrWordAddress, , EnuEQP.PLCRWType.Int_Data); dstrBitAddress = CommonAct.FunTypeConversion.funAddressAdd(dstrBitAddress, dintUnitID - 2); pEqpAct.funBitWrite(dstrBitAddress, "1"); } catch (Exception ex) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString()); } }
/// <summary> /// Primary Message를 Biuld하여 Transaction을 Return한다. /// </summary> /// <param name="strParameters">Parameter 문자열</param> public Transaction funPrimarySend(string strParameters) { string[] arrayEvent; int dintUnitID = 0; int dintCount = 0; string dstrFilmID = ""; int dintSlotID = 0; try { arrayEvent = strParameters.Split(','); int dintCEID = Convert.ToInt32(arrayEvent[1]); //CEID dintUnitID = Convert.ToInt32(arrayEvent[2]); //UnitID dstrFilmID = arrayEvent[3]; dintSlotID = Convert.ToInt32(arrayEvent[4]); pMsgTran = pSecsDrv.MakeTransaction(this.StrPrimaryMsgName); pMsgTran.Primary().Item("DATAID").Putvalue(0); //Fixed Value pMsgTran.Primary().Item("CEID").Putvalue(dintCEID); pMsgTran.Primary().Item("RPTID").Putvalue(1); //Fixed Value pMsgTran.Primary().Item("MODULEID").Putvalue(pInfo.Unit(dintUnitID).SubUnit(0).ModuleID); pMsgTran.Primary().Item("MCMD").Putvalue(pInfo.All.ControlState); pMsgTran.Primary().Item("MODULE_STATE").Putvalue(pInfo.Unit(dintUnitID).SubUnit(0).EQPState); pMsgTran.Primary().Item("PROC_STATE").Putvalue(pInfo.Unit(dintUnitID).SubUnit(0).EQPProcessState); pMsgTran.Primary().Item("BYWHO").Putvalue(3); pMsgTran.Primary().Item("OPERID").Putvalue(this.pInfo.All.UserID); pMsgTran.Primary().Item("MODULEID2").Putvalue(pInfo.Unit(dintUnitID).SubUnit(0).ModuleID); //Fixed Value pMsgTran.Primary().Item("COUNT").Putvalue(1); //임시 20101015 어우수 pMsgTran.Primary().Item("MATERIAL_ID" + 0).Putvalue(dstrFilmID); pMsgTran.Primary().Item("PROD_TYPE" + 0).Putvalue(""); pMsgTran.Primary().Item("LIBRARYID" + 0).Putvalue(""); pMsgTran.Primary().Item("STAGE_STATE" + 0).Putvalue(""); if (dintCEID == 201 || dintCEID == 203) { pMsgTran.Primary().Item("MATERIAL_STATE" + 0).Putvalue("1"); } else { pMsgTran.Primary().Item("MATERIAL_STATE" + 0).Putvalue("4"); } pMsgTran.Primary().Item("LOCATION" + 0).Putvalue(""); //string[] darrSize = currentSlot.SIZE.Split(' '); pMsgTran.Primary().Item("MATERIAL_SIZE" + 0).Putvalue(""); pMsgTran.Primary().Item("L4" + 0).Putvalue(1); if (pInfo.Unit(8).SubUnit(0).CurrGLSCount > 0) { InfoAct.clsGLS CurrentGLS = pInfo.Unit(8).SubUnit(0).CurrGLS(pInfo.Unit(8).SubUnit(0).HGLSID); if (pInfo.LOTID(CurrentGLS.LOTID) != null) { if (pInfo.LOTID(CurrentGLS.LOTID).Slot(dintSlotID) != null) { InfoAct.clsSlot currentSlot = pInfo.LOTID(CurrentGLS.LOTID).Slot(dintSlotID); pMsgTran.Primary().Item("PRODUCTID" + 0 + 0).Putvalue(currentSlot.PRODUCTID); pMsgTran.Primary().Item("STEPID" + 0 + 0).Putvalue(currentSlot.STEPID); pMsgTran.Primary().Item("PPID2" + 0 + 0).Putvalue(currentSlot.HOSTPPID); } else { pMsgTran.Primary().Item("PRODUCTID" + 0 + 0).Putvalue(""); pMsgTran.Primary().Item("STEPID" + 0 + 0).Putvalue(""); pMsgTran.Primary().Item("PPID2" + 0 + 0).Putvalue(""); } } else { pMsgTran.Primary().Item("PRODUCTID" + 0 + 0).Putvalue(""); pMsgTran.Primary().Item("STEPID" + 0 + 0).Putvalue(""); pMsgTran.Primary().Item("PPID2" + 0 + 0).Putvalue(""); } } else { pMsgTran.Primary().Item("PRODUCTID" + 0 + 0).Putvalue(""); pMsgTran.Primary().Item("STEPID" + 0 + 0).Putvalue(""); pMsgTran.Primary().Item("PPID2" + 0 + 0).Putvalue(""); } return(pMsgTran); } catch (Exception error) { funSetLog(InfoAct.clsInfo.LogType.CIM, error.ToString()); return(null); } }
/// <summary> /// 설비에서 CIM으로 발생하는 Event에 대한 처리 /// </summary> /// <param name="parameters">Parameter Array</param> /// <remarks> /// parameters[0] : strCompBit /// parameters[1] : dstrACTVal /// parameters[2] : dintActFrom /// parameters[3] : dstrACTFromSub /// parameters[4] : intBitVal /// parameters[5] : Special Parameter /// </remarks> public void funProcessEQPEvent(string[] parameters) { string strCompBit = parameters[0]; try { int intUnitID = Convert.ToInt32(parameters[2]); int intSubUnitID = 0; int.TryParse(parameters[3].ToString(), out intSubUnitID); int dintACTVal = 0; int.TryParse(parameters[1], out dintACTVal); int intBitVal = 0; int.TryParse(parameters[4].ToString(), out intBitVal); int intPortID = 0; int intSlotNo = 0; string strAddress = ""; string strLOTID = ""; string strGLSID = ""; string strJudgeID = ""; int Arr_dintSlotNo = 0; int Dep_dintSlotNo = 0; bool Arrive_CheckFlag = false; bool Dep_CheckFlag = false; string strLogMSG = ""; DateTime dtNow = DateTime.Now; string strPortID = ""; string strLotStartFlag = ""; string strLotEndFlag = ""; DateTime dtDVTime = new DateTime(); string strDVValue = ""; switch (intUnitID) { case 1: switch (dintACTVal) { case 1: //Port In - Port에 Glass가 들어옴. strPortID = m_pEqpAct.funWordRead("W3040", 2, EnuEQP.PLCRWType.ASCII_Data); intPortID = Convert.ToInt32(strPortID.Substring(1)); intSlotNo = Convert.ToInt32(m_pEqpAct.funWordRead("W3042", 1, EnuEQP.PLCRWType.Int_Data)); strGLSID = m_pEqpAct.funWordRead("W3043", 10, EnuEQP.PLCRWType.ASCII_Data).Trim(); strLOTID = pInfo.Port(intPortID).LOTID.Trim(); strLotStartFlag = m_pEqpAct.funWordRead("W304D", 1, EnuEQP.PLCRWType.Int_Data); strLotEndFlag = m_pEqpAct.funWordRead("W304E", 1, EnuEQP.PLCRWType.Int_Data); pInfo.LOTID(strLOTID).GLSID(strGLSID).RunState = "E"; pInfo.LOTID(strLOTID).EndGLSCount++; //Component in by Indexer 보고 pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11_ComponentReport, 322, intUnitID, pInfo.LOTID(strLOTID).InPortID, strLOTID, strGLSID); pInfo.Port(intPortID).Slot(intSlotNo).SLOTINFO = "P"; bool dbolWaitGLSCheck = false; for (int dintLoop = 0; dintLoop < pInfo.Port(intPortID).SlotCount; dintLoop++) { if (pInfo.Port(intPortID).Slot(dintLoop + 1).SLOTINFO == "W" || pInfo.Port(intPortID).Slot(dintLoop + 1).SLOTINFO == "R") { dbolWaitGLSCheck = true; break; } } if (dbolWaitGLSCheck == false) { pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F3_DVReport, 501, 0, 0, strLOTID, strGLSID); pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F103, strLOTID); if (pInfo.Port(intPortID).AbortFlag == true) { pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11_ProcessReport, 303, intUnitID, pInfo.LOTID(strLOTID).InPortID, strLOTID, strGLSID); } else if (pInfo.Port(intPortID).OffineChangeFlag == true) { pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11_ProcessReport, 303, intUnitID, pInfo.LOTID(strLOTID).InPortID, strLOTID, strGLSID); } else { pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11_ProcessReport, 302, intUnitID, pInfo.LOTID(strLOTID).InPortID, strLOTID, strGLSID); } pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.UnloadReqCMD, intPortID); if (pInfo.Port(intPortID).LOTST == "3") { pInfo.Port(intPortID).LOTST = "4"; } } //bool dbolGLSCheckFlag = false; //if (pInfo.Port(intPortID).AbortFlag == true) //{ // foreach (string str in pInfo.LOTID(strLOTID).GLS()) // { // InfoAct.clsGLS CurrentGLS = pInfo.LOTID(strLOTID).GLSID(str); // if (CurrentGLS.RunState == "S") // { // dbolGLSCheckFlag = true; // break; // } // } // if (dbolGLSCheckFlag == false) // { // pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F103, strLOTID); // pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F3_DVReport, 501, 0, 0, strLOTID, strGLSID); // pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11_ProcessReport, 303, intUnitID, pInfo.LOTID(strLOTID).InPortID, strLOTID, strGLSID); // } //} //else if (pInfo.LOTID(strLOTID).EndGLSCount == pInfo.LOTID(strLOTID).StartGLSCount + pInfo.LOTID(strLOTID).ScrapCount) //Lot의 마지막 Glass일때 //{ // pInfo.LOTID(strLOTID).EndFlag = true; // //Lot Summary DV Data // pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F3_DVReport, 501, 0, 0, strLOTID, strGLSID); // //Lot Information Upload // pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F103, strLOTID); // //Process END 보고 // pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11_ProcessReport, 302, intUnitID, pInfo.LOTID(strLOTID).InPortID, strLOTID, strGLSID); //} //for (int dintLoop = 0; dintLoop < pInfo.PortCount(); dintLoop++) //{ // for (int dintLoop2 = 0; dintLoop2 < pInfo.Port(dintLoop + 1).SlotCount; dintLoop2++) // { // if (pInfo.Port(dintLoop + 1).Slot(dintLoop2 + 1).GLSID.Trim() == strGLSID.Trim()) // { // Dep_CheckFlag = true; // Dep_dintSlotNo = dintLoop2 + 1; // break; // } // } // if (Dep_CheckFlag) // { // break; // } //} strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, pInfo.Unit(intUnitID).SubUnit(0).ReportUnitID, "Out", "Index -> P0" + intPortID); pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, strLogMSG); break; case 2: //Port Out - Port에서 Glass를 꺼냄. strPortID = m_pEqpAct.funWordRead("W3050", 2, EnuEQP.PLCRWType.ASCII_Data); intPortID = Convert.ToInt32(strPortID.Substring(1)); intSlotNo = Convert.ToInt32(m_pEqpAct.funWordRead("W3052", 1, EnuEQP.PLCRWType.Int_Data)); strGLSID = m_pEqpAct.funWordRead("W3053", 10, EnuEQP.PLCRWType.ASCII_Data).Trim(); strLOTID = pInfo.Port(intPortID).LOTID.Trim(); pInfo.Port(intPortID).Slot(intSlotNo).SLOTINFO = "R"; strLotStartFlag = m_pEqpAct.funWordRead("W305D", 1, EnuEQP.PLCRWType.Int_Data); strLotEndFlag = m_pEqpAct.funWordRead("W305E", 1, EnuEQP.PLCRWType.Int_Data); if (strLotStartFlag == "1" || pInfo.LOTID(strLOTID).StartFlag) { pInfo.LOTID(strLOTID).StartFlag = false; //Process Start 보고 pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11_ProcessReport, 301, intUnitID, intPortID, strLOTID, strGLSID); //Process Start } //Component Out by Indexer 보고 pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11_ComponentReport, 321, intPortID, 0, strLOTID, strGLSID); pInfo.LOTID(strLOTID).GLSID(strGLSID).RunState = "S"; strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, pInfo.Unit(intUnitID).SubUnit(0).ReportUnitID, "In", "P0" + intPortID + " -> Index"); pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, strLogMSG); break; case 3: //index in - sky C/V에서 Glass를 받음. strPortID = m_pEqpAct.funWordRead("W3060", 2, EnuEQP.PLCRWType.ASCII_Data); intPortID = Convert.ToInt32(strPortID.Substring(1)); intSlotNo = Convert.ToInt32(m_pEqpAct.funWordRead("W3062", 1, EnuEQP.PLCRWType.Int_Data)); strLOTID = pInfo.Port(intPortID).LOTID.Trim(); strGLSID = m_pEqpAct.funWordRead("W3063", 10, EnuEQP.PLCRWType.ASCII_Data).Trim(); strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, pInfo.Unit(intUnitID).SubUnit(0).ReportUnitID, "In", "Sky C/V -> Index"); pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, strLogMSG); break; case 4: //index out - Index가 Cleaner에게 Glass를 줌. strPortID = m_pEqpAct.funWordRead("W3070", 2, EnuEQP.PLCRWType.ASCII_Data); intPortID = Convert.ToInt32(strPortID.Substring(1)); intSlotNo = Convert.ToInt32(m_pEqpAct.funWordRead("W3072", 1, EnuEQP.PLCRWType.Int_Data)); strLOTID = pInfo.Port(intPortID).LOTID.Trim(); strGLSID = m_pEqpAct.funWordRead("W3073", 10, EnuEQP.PLCRWType.ASCII_Data).Trim(); strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, pInfo.Unit(intUnitID).SubUnit(0).ReportUnitID, "Out", "Index -> Cleaner"); pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, strLogMSG); break; default: //다른 이벤트는 보고하지 않음. break; } break; case 2: // Cleaner string strCleanerWordAddress = "W4400"; strCleanerWordAddress = FunTypeConversion.funAddressAdd(strCleanerWordAddress, 32 * (intSubUnitID - 1)); strLOTID = m_pEqpAct.funWordRead(strCleanerWordAddress, 10, EnuEQP.PLCRWType.ASCII_Data).Trim(); strCleanerWordAddress = FunTypeConversion.funAddressAdd(strCleanerWordAddress, 10); strGLSID = m_pEqpAct.funWordRead(strCleanerWordAddress, 10, EnuEQP.PLCRWType.ASCII_Data).Trim(); strCleanerWordAddress = FunTypeConversion.funAddressAdd(strCleanerWordAddress, 10); strJudgeID = m_pEqpAct.funWordRead(strCleanerWordAddress, 1, EnuEQP.PLCRWType.Int_Data); if (intBitVal == 1) { pInfo.Unit(intUnitID).SubUnit(intSubUnitID).GLSID = strGLSID; pInfo.Unit(intUnitID).SubUnit(intSubUnitID).LOTID = strLOTID; if (pInfo.Unit(intUnitID).SubUnit(0).CurrGLS(strGLSID) == null) { pInfo.Unit(intUnitID).SubUnit(0).AddCurrGLS(strGLSID); pInfo.Unit(intUnitID).SubUnit(0).CurrGLS(strGLSID).LOTID = strLOTID; } if (pInfo.Unit(intUnitID).SubUnit(intSubUnitID).CurrGLS(strGLSID) == null) { pInfo.Unit(intUnitID).SubUnit(intSubUnitID).AddCurrGLS(strGLSID); pInfo.Unit(intUnitID).SubUnit(intSubUnitID).CurrGLS(strGLSID).LOTID = strLOTID; } if (intSubUnitID == 1) { //Component In By Cleaner pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11_ComponentReport, 324, intUnitID, 0, strLOTID, strGLSID); strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, pInfo.Unit(intUnitID).SubUnit(0).ReportUnitID, "In", ""); pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, strLogMSG); } } else { pInfo.Unit(intUnitID).SubUnit(intSubUnitID).GLSID = ""; pInfo.Unit(intUnitID).SubUnit(intSubUnitID).LOTID = ""; if (intSubUnitID == 10) { string address = "W4200"; string strCleanerDVData = ""; try { dtDVTime = DateTime.Now; strDVValue = dtDVTime.ToString("yyyy-MM-dd HH:mm:ss") + ","; strDVValue += strGLSID + ","; strDVValue += "U01,"; //DVReport for (int dintLoop = 0; dintLoop < pInfo.Unit(2).SubUnit(0).GLSAPDCount; dintLoop++) { if (dintLoop != 0) { address = CommonAct.FunTypeConversion.funAddressAdd(address, 2); } //if (pInfo.Unit(2).SubUnit(0).GLSAPD(dintLoop + 1).Length == 1 || pInfo.Unit(2).SubUnit(0).GLSAPD(dintLoop + 1).Length == 2) //{ strCleanerDVData = m_pEqpAct.funWordRead(address, 2, EnuEQP.PLCRWType.Int_Data); strCleanerDVData = CommonAct.FunStringH.funPoint(strCleanerDVData, pInfo.Unit(2).SubUnit(0).GLSAPD(dintLoop + 1).Format); pInfo.Unit(2).SubUnit(0).GLSAPD(dintLoop + 1).Value = Convert.ToSingle(strCleanerDVData); pInfo.LOTID(strLOTID).LOTAPD(dintLoop + 1).Value += pInfo.Unit(2).SubUnit(0).GLSAPD(dintLoop + 1).Value; strDVValue += pInfo.Unit(2).SubUnit(0).GLSAPD(dintLoop + 1).Value + ","; //} } strDVValue = strDVValue.Substring(0, strDVValue.Length - 1); pInfo.subLog_Set(InfoAct.clsInfo.LogType.Clenaer_DV, strDVValue); } catch (Exception ex) { try { for (int dintLoop = 0; dintLoop < pInfo.Unit(2).SubUnit(0).GLSAPDCount; dintLoop++) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, string.Format("Cleaner DV Data List {0} : {1}", dintLoop + 1, m_pEqpAct.funWordRead("W4200", pInfo.Unit(2).SubUnit(0).GLSAPD(dintLoop + 1).Length, EnuEQP.PLCRWType.Int_Data))); } } catch (Exception ex2) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, "Cleaner DVData Read Error!!"); pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex2.ToString()); } pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString()); } pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F3_DVReport, 500, intUnitID, 0, strLOTID, strGLSID); //Component Out By Clenaer pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11_ComponentReport, 323, intUnitID, 0, strLOTID, strGLSID); pInfo.Unit(intUnitID).SubUnit(0).RemoveCurrGLS(strGLSID); strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, pInfo.Unit(intUnitID).SubUnit(0).ReportUnitID, "Out", ""); pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, strLogMSG); } pInfo.Unit(intUnitID).SubUnit(intSubUnitID).RemoveCurrGLS(strGLSID); } break; case 3: //Sky C/V intBitVal = Convert.ToInt32(parameters[4]); string strOvenWordAddress = "W5400"; strOvenWordAddress = FunTypeConversion.funAddressAdd(strOvenWordAddress, 32 * (intSubUnitID - 1)); strLOTID = m_pEqpAct.funWordRead(strOvenWordAddress, 10, EnuEQP.PLCRWType.ASCII_Data).Trim(); strOvenWordAddress = FunTypeConversion.funAddressAdd(strOvenWordAddress, 10); strGLSID = m_pEqpAct.funWordRead(strOvenWordAddress, 10, EnuEQP.PLCRWType.ASCII_Data).Trim(); strOvenWordAddress = FunTypeConversion.funAddressAdd(strOvenWordAddress, 10); strJudgeID = m_pEqpAct.funWordRead(strOvenWordAddress, 1, EnuEQP.PLCRWType.Int_Data); if (intBitVal == 1) { //strLOTID = m_pEqpAct.funWordRead("W5400", 10, EnuEQP.PLCRWType.ASCII_Data).Trim(); //strGLSID = m_pEqpAct.funWordRead("W540A", 10, EnuEQP.PLCRWType.ASCII_Data).Trim(); //strJudgeID = m_pEqpAct.funWordRead("W5414", 1, EnuEQP.PLCRWType.Int_Data); pInfo.Unit(intUnitID).SubUnit(intSubUnitID).GLSID = strGLSID; pInfo.Unit(intUnitID).SubUnit(intSubUnitID).LOTID = strLOTID; if (pInfo.Unit(intUnitID).SubUnit(0).CurrGLS(strGLSID) == null) { pInfo.Unit(intUnitID).SubUnit(0).AddCurrGLS(strGLSID); pInfo.Unit(intUnitID).SubUnit(0).CurrGLS(strGLSID).LOTID = strLOTID; } if (pInfo.Unit(intUnitID).SubUnit(intSubUnitID).CurrGLS(strGLSID) == null) { pInfo.Unit(intUnitID).SubUnit(intSubUnitID).AddCurrGLS(strGLSID); pInfo.Unit(intUnitID).SubUnit(intSubUnitID).CurrGLS(strGLSID).LOTID = strLOTID; } if (intSubUnitID == 1) { //pInfo.Unit(intUnitID).SubUnit(intSubUnitID).AddCurrGLS(strGLSID); //pInfo.Unit(intUnitID).SubUnit(0).AddCurrGLS(strGLSID); //Component In By Cleaner pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11_ComponentReport, 324, intUnitID, 0, strLOTID, strGLSID); strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, pInfo.Unit(intUnitID).SubUnit(0).ReportUnitID, "In", ""); pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, strLogMSG); } } else { //strLOTID = m_pEqpAct.funWordRead("W5460", 10, EnuEQP.PLCRWType.ASCII_Data); //strGLSID = m_pEqpAct.funWordRead("W546A", 10, EnuEQP.PLCRWType.ASCII_Data); //strJudgeID = m_pEqpAct.funWordRead("W5474", 1, EnuEQP.PLCRWType.Int_Data); pInfo.Unit(intUnitID).SubUnit(intSubUnitID).GLSID = ""; pInfo.Unit(intUnitID).SubUnit(intSubUnitID).LOTID = ""; if (intSubUnitID == 4) { //Component Out By Clenaer pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11_ComponentReport, 323, intUnitID, 0, strLOTID, strGLSID); pInfo.Unit(intUnitID).SubUnit(0).RemoveCurrGLS(strGLSID); strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, pInfo.Unit(intUnitID).SubUnit(0).ReportUnitID, "Out", ""); pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, strLogMSG); } pInfo.Unit(intUnitID).SubUnit(intSubUnitID).RemoveCurrGLS(strGLSID); } break; case 4: //Robot strAddress = "W6200"; strAddress = CommonAct.FunTypeConversion.funAddressAdd(strAddress, 32 * (dintACTVal - 1)); strLOTID = m_pEqpAct.funWordRead(strAddress, 10, EnuEQP.PLCRWType.ASCII_Data); strAddress = CommonAct.FunTypeConversion.funAddressAdd(strAddress, 10); strGLSID = m_pEqpAct.funWordRead(strAddress, 10, EnuEQP.PLCRWType.ASCII_Data); InfoAct.clsGLS CurrentGLS = null; if (pInfo.Unit(4).SubUnit(0).CurrGLS(strGLSID) == null) { pInfo.Unit(4).SubUnit(0).AddCurrGLS(strGLSID); } switch (dintACTVal) { case 1: CurrentGLS = pInfo.Unit(4).SubUnit(0).CurrGLS(strGLSID); CurrentGLS.LOTID = strLOTID; strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, "Oven Robot", "In", "Cleaner -> Oven Robot"); break; case 2: pInfo.Unit(4).SubUnit(0).RemoveCurrGLS(strGLSID); strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, "Oven Robot", "Out", "Oven Robot -> Sky C/V"); break; case 3: pInfo.Unit(4).SubUnit(0).RemoveCurrGLS(strGLSID); strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, "Oven Robot", "Out", "Oven Robot -> Oven1"); break; case 4: CurrentGLS = pInfo.Unit(4).SubUnit(0).CurrGLS(strGLSID); CurrentGLS.LOTID = strLOTID; strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, "Oven Robot", "In", "Oven1 -> Oven Robot"); break; case 5: pInfo.Unit(4).SubUnit(0).RemoveCurrGLS(strGLSID); strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, "Oven Robot", "Out", "Oven Robot -> Oven2"); break; case 6: CurrentGLS = pInfo.Unit(4).SubUnit(0).CurrGLS(strGLSID); CurrentGLS.LOTID = strLOTID; strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, "Oven Robot", "In", "Oven2 -> Oven Robot"); break; } pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, strLogMSG); break; case 5: //OVEN#01 intBitVal = Convert.ToInt32(parameters[4]); strAddress = CommonAct.FunTypeConversion.funAddressAdd("W7500", (intSubUnitID - 1) * 32); strLOTID = m_pEqpAct.funWordRead(strAddress, 10, EnuEQP.PLCRWType.ASCII_Data).Trim(); strAddress = CommonAct.FunTypeConversion.funAddressAdd(strAddress, 10); strGLSID = m_pEqpAct.funWordRead(strAddress, 10, EnuEQP.PLCRWType.ASCII_Data).Trim(); strAddress = CommonAct.FunTypeConversion.funAddressAdd(strAddress, 10); strJudgeID = m_pEqpAct.funWordRead(strAddress, 1, EnuEQP.PLCRWType.Int_Data); if (intBitVal == 1) { pInfo.Unit(intUnitID).SubUnit(intSubUnitID).GLSID = strGLSID; pInfo.Unit(intUnitID).SubUnit(intSubUnitID).LOTID = strLOTID; if (pInfo.Unit(intUnitID).SubUnit(0).CurrGLS(strGLSID) == null) { pInfo.Unit(intUnitID).SubUnit(0).AddCurrGLS(strGLSID); pInfo.Unit(intUnitID).SubUnit(0).CurrGLS(strGLSID).LOTID = strLOTID; } if (pInfo.Unit(intUnitID).SubUnit(intSubUnitID).CurrGLS(strGLSID) == null) { pInfo.Unit(intUnitID).SubUnit(intSubUnitID).AddCurrGLS(strGLSID); pInfo.Unit(intUnitID).SubUnit(intSubUnitID).CurrGLS(strGLSID).LOTID = strLOTID; } //Component In By Cleaner pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11_ComponentReport, 324, intUnitID, 0, strLOTID, strGLSID); strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, pInfo.Unit(intUnitID).SubUnit(0).ReportUnitID, "In", ""); pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, strLogMSG); } else { pInfo.Unit(intUnitID).SubUnit(intSubUnitID).GLSID = ""; pInfo.Unit(intUnitID).SubUnit(intSubUnitID).LOTID = ""; pInfo.Unit(intUnitID).SubUnit(intSubUnitID).RemoveCurrGLS(strGLSID); pInfo.Unit(intUnitID).SubUnit(0).RemoveCurrGLS(strGLSID); try { string address = "W7300"; string strOvenDVData = ""; dtDVTime = DateTime.Now; strDVValue = dtDVTime.ToString("yyyy-MM-dd HH:mm:ss") + ","; strDVValue += strGLSID + ","; strDVValue += "U02,"; int dintOven01UnitID = 5; //DVReport for (int dintLoop = 0; dintLoop < pInfo.Unit(dintOven01UnitID).SubUnit(0).GLSAPDCount; dintLoop++) { if (dintLoop != 0) { address = CommonAct.FunTypeConversion.funAddressAdd(address, pInfo.Unit(dintOven01UnitID).SubUnit(0).GLSAPD(dintLoop).Length); } if (pInfo.Unit(dintOven01UnitID).SubUnit(0).GLSAPD(dintLoop + 1).Length == 1) { strOvenDVData = m_pEqpAct.funWordRead(address, pInfo.Unit(dintOven01UnitID).SubUnit(0).GLSAPD(dintLoop + 1).Length, EnuEQP.PLCRWType.Int_Data); strOvenDVData = CommonAct.FunStringH.funPoint(strOvenDVData, pInfo.Unit(dintOven01UnitID).SubUnit(0).GLSAPD(dintLoop + 1).Format); pInfo.Unit(dintOven01UnitID).SubUnit(0).GLSAPD(dintLoop + 1).Value = Convert.ToSingle(strOvenDVData); strDVValue += strOvenDVData + ","; pInfo.LOTID(strLOTID.Trim()).LOTAPD(pInfo.Unit(2).SubUnit(0).GLSAPDCount + dintLoop).Value += pInfo.Unit(intUnitID).SubUnit(0).GLSAPD(dintLoop + 1).Value; } else if (pInfo.Unit(dintOven01UnitID).SubUnit(0).GLSAPD(dintLoop + 1).Length == 6) { string Oven01_DateTime = ""; Oven01_DateTime += m_pEqpAct.funWordRead(address, 1, EnuEQP.PLCRWType.Int_Data).PadLeft(2, '0'); address = CommonAct.FunTypeConversion.funAddressAdd(address, 1); Oven01_DateTime += m_pEqpAct.funWordRead(address, 1, EnuEQP.PLCRWType.Int_Data).PadLeft(2, '0'); address = CommonAct.FunTypeConversion.funAddressAdd(address, 1); Oven01_DateTime += m_pEqpAct.funWordRead(address, 1, EnuEQP.PLCRWType.Int_Data).PadLeft(2, '0'); address = CommonAct.FunTypeConversion.funAddressAdd(address, 1); Oven01_DateTime += m_pEqpAct.funWordRead(address, 1, EnuEQP.PLCRWType.Int_Data).PadLeft(2, '0'); address = CommonAct.FunTypeConversion.funAddressAdd(address, 1); Oven01_DateTime += m_pEqpAct.funWordRead(address, 1, EnuEQP.PLCRWType.Int_Data).PadLeft(2, '0'); address = CommonAct.FunTypeConversion.funAddressAdd(address, 1); Oven01_DateTime += m_pEqpAct.funWordRead(address, 1, EnuEQP.PLCRWType.Int_Data).PadLeft(2, '0'); address = CommonAct.FunTypeConversion.funAddressAdd(address, 1); //Oven01_DateTime += m_pEqpAct.funWordRead(address, 1, EnuEQP.PLCRWType.Int_Data).PadLeft(2, '0'); //address = CommonAct.FunTypeConversion.funAddressAdd(address, 1); if (pInfo.Unit(dintOven01UnitID).SubUnit(0).GLSAPD(dintLoop + 1).Name == "Oven01_LOADING_TIME") { pInfo.Unit(dintOven01UnitID).SubUnit(0).GLSAPD(dintLoop + 1).LoadingTIME = Oven01_DateTime; strDVValue += Oven01_DateTime + ","; } else { pInfo.Unit(dintOven01UnitID).SubUnit(0).GLSAPD(dintLoop + 1).UnloadingTIME = Oven01_DateTime; strDVValue += Oven01_DateTime + ","; } address = CommonAct.FunTypeConversion.funAddressAdd(address, -6); } } strDVValue = strDVValue.Substring(0, strDVValue.Length - 1); pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F3_DVReport, 500, intUnitID, 0, strLOTID, strGLSID); pInfo.subLog_Set(InfoAct.clsInfo.LogType.Oven_DV, strDVValue); } catch (Exception ex) { try { for (int dintLoop = 0; dintLoop < pInfo.Unit(intUnitID).SubUnit(0).GLSAPDCount; dintLoop++) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, string.Format("Oven01 DVData List {0} : {1}", dintLoop + 1, m_pEqpAct.funWordRead("W7300", pInfo.Unit(intUnitID).SubUnit(0).GLSAPD(dintLoop + 1).Length, EnuEQP.PLCRWType.Int_Data))); } } catch (Exception ex2) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, "Oven01 DVData Read Error!!"); pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex2.ToString()); } pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString()); } //Component In By Cleaner pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11_ComponentReport, 323, intUnitID, 0, strLOTID, strGLSID); strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, pInfo.Unit(intUnitID).SubUnit(0).ReportUnitID, "Out", ""); pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, strLogMSG); } break; case 6: //OVEN#02 intBitVal = Convert.ToInt32(parameters[4]); strAddress = CommonAct.FunTypeConversion.funAddressAdd("W8500", (intSubUnitID - 1) * 32); strLOTID = m_pEqpAct.funWordRead(strAddress, 10, EnuEQP.PLCRWType.ASCII_Data).Trim(); strAddress = CommonAct.FunTypeConversion.funAddressAdd(strAddress, 10); strGLSID = m_pEqpAct.funWordRead(strAddress, 10, EnuEQP.PLCRWType.ASCII_Data).Trim(); strAddress = CommonAct.FunTypeConversion.funAddressAdd(strAddress, 10); strJudgeID = m_pEqpAct.funWordRead(strAddress, 1, EnuEQP.PLCRWType.Int_Data); if (intBitVal == 1) { pInfo.Unit(intUnitID).SubUnit(intSubUnitID).GLSID = strGLSID; pInfo.Unit(intUnitID).SubUnit(intSubUnitID).LOTID = strLOTID; pInfo.Unit(intUnitID).SubUnit(intSubUnitID).AddCurrGLS(strGLSID); pInfo.Unit(intUnitID).SubUnit(0).AddCurrGLS(strGLSID); //Component In By Cleaner pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11_ComponentReport, 324, intUnitID, 0, strLOTID, strGLSID); strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, pInfo.Unit(intUnitID).SubUnit(0).ReportUnitID, "In", ""); pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, strLogMSG); } else { pInfo.Unit(intUnitID).SubUnit(intSubUnitID).GLSID = ""; pInfo.Unit(intUnitID).SubUnit(intSubUnitID).LOTID = ""; pInfo.Unit(intUnitID).SubUnit(intSubUnitID).RemoveCurrGLS(strGLSID); pInfo.Unit(intUnitID).SubUnit(0).RemoveCurrGLS(strGLSID); string Oven02_address = "W8300"; string strOven2DVData = ""; dtDVTime = DateTime.Now; strDVValue = dtDVTime.ToString("yyyy-MM-dd HH:mm:ss") + ","; strDVValue += strGLSID + ","; strDVValue += "U03,"; try { int dintOven02UnitID = 5; //DVReport for (int dintLoop = 0; dintLoop < pInfo.Unit(dintOven02UnitID).SubUnit(0).GLSAPDCount; dintLoop++) { if (dintLoop != 0) { Oven02_address = CommonAct.FunTypeConversion.funAddressAdd(Oven02_address, pInfo.Unit(dintOven02UnitID).SubUnit(0).GLSAPD(dintLoop).Length); } if (pInfo.Unit(dintOven02UnitID).SubUnit(0).GLSAPD(dintLoop + 1).Length == 1) { strOven2DVData = m_pEqpAct.funWordRead(Oven02_address, pInfo.Unit(dintOven02UnitID).SubUnit(0).GLSAPD(dintLoop + 1).Length, EnuEQP.PLCRWType.Int_Data); strOven2DVData = CommonAct.FunStringH.funPoint(strOven2DVData, pInfo.Unit(dintOven02UnitID).SubUnit(0).GLSAPD(dintLoop + 1).Format); pInfo.Unit(dintOven02UnitID).SubUnit(0).GLSAPD(dintLoop + 1).Value = Convert.ToSingle(strOven2DVData); strDVValue += strOven2DVData + ","; //pInfo.LOTID(strLOTID.Trim()).LOTAPD(pInfo.Unit(2).SubUnit(0).GLSAPDCount + pInfo.Unit(5).SubUnit(0).GLSAPDCount + dintLoop).Value += pInfo.Unit(intUnitID).SubUnit(0).GLSAPD(dintLoop + 1).Value; pInfo.LOTID(strLOTID.Trim()).LOTAPD(pInfo.Unit(2).SubUnit(0).GLSAPDCount + dintLoop).Value += pInfo.Unit(dintOven02UnitID).SubUnit(0).GLSAPD(dintLoop + 1).Value; } else if (pInfo.Unit(dintOven02UnitID).SubUnit(0).GLSAPD(dintLoop + 1).Length == 6) { string Oven02_DateTime = ""; Oven02_DateTime += m_pEqpAct.funWordRead(Oven02_address, 1, EnuEQP.PLCRWType.Int_Data).PadLeft(2, '0'); Oven02_address = CommonAct.FunTypeConversion.funAddressAdd(Oven02_address, 1); Oven02_DateTime += m_pEqpAct.funWordRead(Oven02_address, 1, EnuEQP.PLCRWType.Int_Data).PadLeft(2, '0'); Oven02_address = CommonAct.FunTypeConversion.funAddressAdd(Oven02_address, 1); Oven02_DateTime += m_pEqpAct.funWordRead(Oven02_address, 1, EnuEQP.PLCRWType.Int_Data).PadLeft(2, '0'); Oven02_address = CommonAct.FunTypeConversion.funAddressAdd(Oven02_address, 1); Oven02_DateTime += m_pEqpAct.funWordRead(Oven02_address, 1, EnuEQP.PLCRWType.Int_Data).PadLeft(2, '0'); Oven02_address = CommonAct.FunTypeConversion.funAddressAdd(Oven02_address, 1); Oven02_DateTime += m_pEqpAct.funWordRead(Oven02_address, 1, EnuEQP.PLCRWType.Int_Data).PadLeft(2, '0'); Oven02_address = CommonAct.FunTypeConversion.funAddressAdd(Oven02_address, 1); Oven02_DateTime += m_pEqpAct.funWordRead(Oven02_address, 1, EnuEQP.PLCRWType.Int_Data).PadLeft(2, '0'); Oven02_address = CommonAct.FunTypeConversion.funAddressAdd(Oven02_address, 1); //Oven02_DateTime += m_pEqpAct.funWordRead(Oven02_address, 1, EnuEQP.PLCRWType.Int_Data).PadLeft(2, '0'); //Oven02_address = CommonAct.FunTypeConversion.funAddressAdd(Oven02_address, 1); if (pInfo.Unit(dintOven02UnitID).SubUnit(0).GLSAPD(dintLoop + 1).Name == "Oven02_LOADING_TIME") { pInfo.Unit(dintOven02UnitID).SubUnit(0).GLSAPD(dintLoop + 1).LoadingTIME = Oven02_DateTime; strDVValue += Oven02_DateTime + ","; } else { pInfo.Unit(dintOven02UnitID).SubUnit(0).GLSAPD(dintLoop + 1).UnloadingTIME = Oven02_DateTime; strDVValue += Oven02_DateTime + ","; } Oven02_address = CommonAct.FunTypeConversion.funAddressAdd(Oven02_address, -6); } } strDVValue = strDVValue.Substring(0, strDVValue.Length - 1); pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F3_DVReport, 500, intUnitID, 0, strLOTID, strGLSID); pInfo.subLog_Set(InfoAct.clsInfo.LogType.Oven_DV, strDVValue); } catch (Exception ex) { try { for (int dintLoop = 0; dintLoop < pInfo.Unit(5).SubUnit(0).GLSAPDCount; dintLoop++) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, string.Format("Oven02 DVData List {0} : {1}", dintLoop + 1, m_pEqpAct.funWordRead("W8300", pInfo.Unit(5).SubUnit(0).GLSAPD(dintLoop + 1).Length, EnuEQP.PLCRWType.Int_Data))); } } catch (Exception ex2) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, "Oven02 DVData Read Error!!"); pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex2.ToString()); } pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString()); } //Component In By Cleaner pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11_ComponentReport, 323, intUnitID, 0, strLOTID, strGLSID); strLogMSG = string.Format("{0},{1},{2},{3},{4},{5}", dtNow.ToString("HH:mm:ss.ff"), strLOTID, strGLSID, pInfo.Unit(intUnitID).SubUnit(0).ReportUnitID, "Out", ""); pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, strLogMSG); } break; } if (intUnitID == 1 || intUnitID == 4) { intSubUnitID = 0; } if (intBitVal == 1) { try { pInfo.Unit(intUnitID).SubUnit(intSubUnitID).GLSExist = true; } catch (Exception ex) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, string.Format("IntUnitID : {0}, intSubUnitID : {1}", intUnitID, intSubUnitID)); pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString()); } //pInfo.Unit(intUnitID).SubUnit(intSubUnitID).GLSID = ""; //pInfo.Unit(intUnitID).SubUnit(intSubUnitID).LOTID = ""; } else { pInfo.Unit(intUnitID).SubUnit(intSubUnitID).GLSExist = false; } //if(strCompBit != null) m_pEqpAct.subSetConfirmBit(strCompBit); } catch (Exception ex) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString()); //m_pEqpAct.subSetConfirmBit(strCompBit); } }
/// <summary> /// Primary Message를 Biuld하여 Transaction을 Return한다. /// </summary> /// <param name="strParameters">Parameter 문자열</param> public Transaction funPrimarySend(string strParameters) { string[] arrayEvent; try { arrayEvent = strParameters.Split(','); int dintCEID = Convert.ToInt32(arrayEvent[1]); //CEID try { if (pInfo.CEID(dintCEID).Report == false) { return(null); } } catch (Exception) { } if (pInfo.All.DataID >= 9999) { pInfo.All.DataID = -1; } pInfo.All.DataID++; int dintUnitID = Convert.ToInt32(arrayEvent[2]); //UnitID int dintSubUnitID = Convert.ToInt32(arrayEvent[3]); //SubUnitID string strLOTID = arrayEvent[4].Trim(); //LOTID string strGLSID = arrayEvent[5].Trim(); //GLSID if (pInfo.LOTID(strLOTID) == null || pInfo.LOTID(strLOTID).GLSID(strGLSID) == null) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, string.Format("Component Report Error!! LOTID, GLSID Error => LOTID : {0}, GLSID : {1}", strLOTID, strGLSID)); pInfo.All.DataID--; return(null); } else { if (pInfo.LOTID(strLOTID).GLSID(strGLSID).ScrapFlag == false) { pMsgTran = pSecsDrv.MakeTransaction(this.StrPrimaryMsgName); InfoAct.clsSubUnit subUnit = pInfo.Unit(dintUnitID).SubUnit(0); pMsgTran.Primary().Item("DATAID").Putvalue(pInfo.All.DataID); pMsgTran.Primary().Item("CEID").Putvalue(dintCEID); pMsgTran.Primary().Item("RPTID").Putvalue(100); //FIX pMsgTran.Primary().Item("CRST").Putvalue(pInfo.All.ControlState); pMsgTran.Primary().Item("EQST").Putvalue(pInfo.Unit(0).SubUnit(0).EQPState); pMsgTran.Primary().Item("RPTID_SUB").Putvalue(321); InfoAct.clsGLS CurrentGLS = pInfo.LOTID(strLOTID).GLSID(strGLSID); pMsgTran.Primary().Item("UNITID").Putvalue(pInfo.Unit(dintUnitID).SubUnit(0).ReportUnitID); pMsgTran.Primary().Item("LOTID").Putvalue(CurrentGLS.LOTID); pMsgTran.Primary().Item("IPID").Putvalue(CurrentGLS.IPID); pMsgTran.Primary().Item("OPID").Putvalue(CurrentGLS.OPID); pMsgTran.Primary().Item("ICID").Putvalue(CurrentGLS.ICID); pMsgTran.Primary().Item("OCID").Putvalue(CurrentGLS.OCID); pMsgTran.Primary().Item("PPID").Putvalue(CurrentGLS.HostPPID); pMsgTran.Primary().Item("FSLOTID").Putvalue(CurrentGLS.FSLOTID); pMsgTran.Primary().Item("TSLOTID").Putvalue(CurrentGLS.TSLOTID); pMsgTran.Primary().Item("RGLSID").Putvalue(CurrentGLS.RGLSID); pMsgTran.Primary().Item("HGLSID").Putvalue(CurrentGLS.GLSID); pMsgTran.Primary().Item("GLSJUDGE").Putvalue(CurrentGLS.GLSJudge); return(pMsgTran); } else { return(null); } } } catch (Exception error) { funSetLog(InfoAct.clsInfo.LogType.CIM, error.ToString()); //pInfo.All.DataID--; pInfo.All.DataID--; return(null); } }
/// <summary> /// Primary Message를 Biuld하여 Transaction을 Return한다. /// </summary> /// <param name="strParameters">Parameter 문자열</param> public Transaction funPrimarySend(string strParameters) { string[] arrayEvent; try { arrayEvent = strParameters.Split(','); int dintCEID = Convert.ToInt32(arrayEvent[1]); try { if (pInfo.CEID(dintCEID).Report == false) { return(null); } } catch (Exception) { } if (pInfo.All.DataID >= 9999) { pInfo.All.DataID = -1; } pInfo.All.DataID++; int dintUnitID = Convert.ToInt32(arrayEvent[2]); int dintSubunitID = Convert.ToInt32(arrayEvent[3]); string dstrLotID = arrayEvent[4].ToString().Trim(); string dstrGLSID = arrayEvent[5].ToString().Trim(); if (pInfo.LOTID(dstrLotID) != null && pInfo.LOTID(dstrLotID).GLSID(dstrGLSID) != null) { if (pInfo.LOTID(dstrLotID).GLSID(dstrGLSID).ScrapFlag) { return(null); } } pMsgTran = pSecsDrv.MakeTransaction(this.StrPrimaryMsgName); InfoAct.clsSubUnit subUnit = this.pInfo.Unit(dintUnitID).SubUnit(dintSubunitID); if (dintCEID == 500) { pMsgTran.Primary().Item("CEID").Putvalue(dintCEID); pMsgTran.Primary().Item("UNITID").Putvalue(subUnit.ReportUnitID); pMsgTran.Primary().Item("LOTID").Putvalue(dstrLotID); pMsgTran.Primary().Item("CSTID").Putvalue(pInfo.LOTID(dstrLotID).CSTID); pMsgTran.Primary().Item("GLSID").Putvalue(dstrGLSID); pMsgTran.Primary().Item("CHID").Putvalue(""); pMsgTran.Primary().Item("OPERID").Putvalue(pInfo.LOTID(dstrLotID).OPERID); pMsgTran.Primary().Item("PRODID").Putvalue(pInfo.LOTID(dstrLotID).PRODID); pMsgTran.Primary().Item("PPID").Putvalue(pInfo.LOTID(dstrLotID).GLSID(dstrGLSID).HostPPID); if (dintUnitID == 6) { dintUnitID = 5; } pMsgTran.Primary().Item("L3").Putvalue(pInfo.Unit(dintUnitID).SubUnit(0).GLSAPDCount); for (int dintLoop = 0; dintLoop < pInfo.Unit(dintUnitID).SubUnit(0).GLSAPDCount; dintLoop++) { if (pInfo.Unit(dintUnitID).SubUnit(0).GLSAPD(dintLoop + 1).Length != 6) { pMsgTran.Primary().Item("DVNAME" + dintLoop).Putvalue(pInfo.Unit(dintUnitID).SubUnit(0).GLSAPD(dintLoop + 1).Name); pMsgTran.Primary().Item("DV" + dintLoop).Putvalue((pInfo.Unit(dintUnitID).SubUnit(0).GLSAPD(dintLoop + 1).Value).ToString()); } else { if (string.IsNullOrEmpty(pInfo.Unit(dintUnitID).SubUnit(0).GLSAPD(dintLoop + 1).LoadingTIME) == false) { pMsgTran.Primary().Item("DVNAME" + dintLoop).Putvalue(pInfo.Unit(dintUnitID).SubUnit(0).GLSAPD(dintLoop + 1).Name); pMsgTran.Primary().Item("DV" + dintLoop).Putvalue(pInfo.Unit(dintUnitID).SubUnit(0).GLSAPD(dintLoop + 1).LoadingTIME); } if (string.IsNullOrEmpty(pInfo.Unit(dintUnitID).SubUnit(0).GLSAPD(dintLoop + 1).UnloadingTIME) == false) { pMsgTran.Primary().Item("DVNAME" + dintLoop).Putvalue(pInfo.Unit(dintUnitID).SubUnit(0).GLSAPD(dintLoop + 1).Name); pMsgTran.Primary().Item("DV" + dintLoop).Putvalue(pInfo.Unit(dintUnitID).SubUnit(0).GLSAPD(dintLoop + 1).UnloadingTIME); } } } } else { pMsgTran.Primary().Item("CEID").Putvalue(dintCEID); pMsgTran.Primary().Item("UNITID").Putvalue(subUnit.ReportUnitID); pMsgTran.Primary().Item("LOTID").Putvalue(dstrLotID); pMsgTran.Primary().Item("CSTID").Putvalue(pInfo.LOTID(dstrLotID).CSTID); pMsgTran.Primary().Item("GLSID").Putvalue(""); pMsgTran.Primary().Item("CHID").Putvalue(""); pMsgTran.Primary().Item("OPERID").Putvalue(pInfo.LOTID(dstrLotID).OPERID); pMsgTran.Primary().Item("PRODID").Putvalue(pInfo.LOTID(dstrLotID).PRODID); pMsgTran.Primary().Item("PPID").Putvalue(pInfo.LOTID(dstrLotID).GLSID(dstrGLSID).HostPPID); pMsgTran.Primary().Item("L3").Putvalue(pInfo.LOTID(dstrLotID).LOTAPDCount); float flDVData = 0; for (int dintLoop = 0; dintLoop < pInfo.LOTID(dstrLotID).LOTAPDCount; dintLoop++) { if (pInfo.LOTID(dstrLotID).LOTAPD(dintLoop + 1).Length != 6) { flDVData = pInfo.LOTID(dstrLotID).LOTAPD(dintLoop + 1).Value; //if(pInfo.Port(pInfo.LOTID(dstrLotID).InPortID).AbortFlag == true) //{ int GLSRunCnt = 0; foreach (string str in pInfo.LOTID(dstrLotID).GLS()) { InfoAct.clsGLS CurrentGLS = pInfo.LOTID(dstrLotID).GLSID(str); if (CurrentGLS.RunState == "E") { GLSRunCnt++; } } flDVData = flDVData / GLSRunCnt; //} //else //{ // flDVData = flDVData / pInfo.LOTID(dstrLotID).GLSCount; //} pMsgTran.Primary().Item("DVNAME" + dintLoop).Putvalue(pInfo.LOTID(dstrLotID).LOTAPD(dintLoop + 1).Name); pMsgTran.Primary().Item("DV" + dintLoop).Putvalue(flDVData); } else { //시간 어떻게 할껀지 확인 필요.... pMsgTran.Primary().Item("DVNAME" + dintLoop).Putvalue(pInfo.LOTID(dstrLotID).LOTAPD(dintLoop + 1).Name); pMsgTran.Primary().Item("DV" + dintLoop).Putvalue(""); } } } return(pMsgTran); } catch (Exception error) { funSetLog(InfoAct.clsInfo.LogType.CIM, error.ToString()); return(null); } }
/// <summary> /// Primary Message에 대해 처리한 후 Secondary Message를 Biuld하여 Driver에 전송한다. /// </summary> /// <param name="msgTran">Primary Message의 Transaction</param> public void funPrimaryReceive(Transaction msgTran) { string dstrModuleID = ""; string dstrSFCD = ""; int dintIndex = 0; string dstrLOTID = ""; int dintSlotID = 0; Hashtable dhtGLSID = new Hashtable(); int dintSendIndex = 0; Boolean dbolLayerExist = false; bool dbolLayer1Report = false; bool dbolLayer2Report = false; int dintUnitID = 0; int dintSubUnitID = 0; try { dstrSFCD = msgTran.Primary().Item("SFCD").Getvalue().ToString().Trim(); dstrModuleID = msgTran.Primary().Item("MODULEID").Getvalue().ToString().Trim(); switch (dstrSFCD) { case "1": if (dstrModuleID != this.pInfo.Unit(3).SubUnit(0).ModuleID) { msgTran.Secondary2("S1F6WrongMODID").Item("MODULEID").Putvalue(dstrModuleID); msgTran.Secondary2("S1F6WrongMODID").Item("SFCD").Putvalue(dstrSFCD); funSendReply2(msgTran, "S1F6WrongMODID"); return; } break; case "2": if (dstrModuleID == pInfo.Unit(3).SubUnit(0).ModuleID) { dintUnitID = 0; dintSubUnitID = 0; } else if (dstrModuleID == this.pInfo.Unit(1).SubUnit(0).ModuleID || dstrModuleID == this.pInfo.Unit(2).SubUnit(0).ModuleID) { if (dstrModuleID == this.pInfo.Unit(1).SubUnit(0).ModuleID) { dintUnitID = 1; dintSubUnitID = 0; } else { dintUnitID = 2; dintSubUnitID = 0; } } else { for (int dintLoop = 0; dintLoop < pInfo.Unit(1).SubUnitCount; dintLoop++) { if (dstrModuleID == pInfo.Unit(1).SubUnit(dintLoop + 1).ModuleID) { dbolLayerExist = true; dintUnitID = 1; dintSubUnitID = dintLoop + 1; } if (dbolLayerExist) { break; } } if (dbolLayerExist == false) { for (int dintLoop = 0; dintLoop < pInfo.Unit(2).SubUnitCount; dintLoop++) { if (dstrModuleID == pInfo.Unit(2).SubUnit(dintLoop + 1).ModuleID) { dbolLayerExist = true; dintUnitID = 2; dintSubUnitID = dintLoop + 1; } if (dbolLayerExist) { break; } } } if (!dbolLayerExist) { msgTran.Secondary2("S1F6WrongMODID").Item("MODULEID").Putvalue(dstrModuleID); msgTran.Secondary2("S1F6WrongMODID").Item("SFCD").Putvalue(dstrSFCD); funSendReply2(msgTran, "S1F6WrongMODID"); return; } } break; case "3": if (dstrModuleID != this.pInfo.Unit(3).SubUnit(0).ModuleID&& dstrModuleID != this.pInfo.Unit(3).SubUnit(7).ModuleID && dstrModuleID != this.pInfo.Unit(3).SubUnit(8).ModuleID) { msgTran.Secondary2("S1F6WrongMODID").Item("MODULEID").Putvalue(dstrModuleID); msgTran.Secondary2("S1F6WrongMODID").Item("SFCD").Putvalue(dstrSFCD); funSendReply2(msgTran, "S1F6WrongMODID"); return; } break; case "4": if (dstrModuleID != this.pInfo.Unit(3).SubUnit(0).ModuleID) { msgTran.Secondary2("S1F6WrongMODID").Item("MODULEID").Putvalue(dstrModuleID); msgTran.Secondary2("S1F6WrongMODID").Item("SFCD").Putvalue(dstrSFCD); funSendReply2(msgTran, "S1F6WrongMODID"); return; } break; case "31": if (dstrModuleID != this.pInfo.Unit(3).SubUnit(0).ModuleID) { msgTran.Secondary2("S1F6WrongMODID").Item("MODULEID").Putvalue(dstrModuleID); msgTran.Secondary2("S1F6WrongMODID").Item("SFCD").Putvalue(dstrSFCD); funSendReply2(msgTran, "S1F6WrongMODID"); return; } break; } //for (int dintLoop = 0; dintLoop <= pInfo.UnitCount; dintLoop++) //{ // for (int dintLoop2 = 0; dintLoop2 <= pInfo.Unit(dintLoop).SubUnitCount; dintLoop2++) // { // if (dstrModuleID == pInfo.Unit(dintLoop).SubUnit(dintLoop2).ModuleID) // { // dintUnitID = dintLoop; // dintSubUnitID = dintLoop2; // dbolLayerExist = true; // break; // } // } // if (dbolLayerExist) // { // break; // } //} switch (dstrSFCD) { case "1": //EOID별 EOV값 List 보고 { msgTran.Secondary2("S1F6SFCD1").Item("MODULEID").Putvalue(dstrModuleID); msgTran.Secondary2("S1F6SFCD1").Item("SFCD").Putvalue(dstrSFCD); msgTran.Secondary2("S1F6SFCD1").Item("EOIDCNT").Putvalue(this.pInfo.All.HOSTReportEOIDCount); int eoidCount = pInfo.Unit(0).SubUnit(0).EOIDCount; for (int dintLoop = 1; dintLoop <= eoidCount; dintLoop++) { InfoAct.clsEOID eoID = pInfo.Unit(0).SubUnit(0).EOID(dintLoop); msgTran.Secondary2("S1F6SFCD1").Item("EOMDCNT" + dintSendIndex).Putvalue(1); msgTran.Secondary2("S1F6SFCD1").Item("EOID" + dintSendIndex).Putvalue(eoID.EOID); msgTran.Secondary2("S1F6SFCD1").Item("EOMD" + dintSendIndex + 0).Putvalue(eoID.EOMD); msgTran.Secondary2("S1F6SFCD1").Item("EOV" + dintSendIndex + 0).Putvalue(eoID.EOV); dintSendIndex += 1; } funSendReply2(msgTran, "S1F6SFCD1"); } break; case "2": msgTran.Secondary2("S1F6SFCD2").Item("MODULEID").Putvalue(dstrModuleID); msgTran.Secondary2("S1F6SFCD2").Item("SFCD").Putvalue(dstrSFCD); int dintCount = 0; if (dintUnitID == 0) { dintCount = pInfo.Unit(1).SubUnitCount + pInfo.Unit(2).SubUnitCount; msgTran.Secondary2("S1F6SFCD2").Item("PORTCNT").Putvalue(dintCount); for (int dintLoop = 1; dintLoop <= dintCount; dintLoop++) { InfoAct.clsPort CurrentPort = pInfo.Port(dintLoop); msgTran.Secondary2("S1F6SFCD2").Item("PORTID" + (dintLoop - 1)).Putvalue(CurrentPort.HostReportPortID); msgTran.Secondary2("S1F6SFCD2").Item("PTSTATE" + (dintLoop - 1)).Putvalue(CurrentPort.PortState); msgTran.Secondary2("S1F6SFCD2").Item("PTTYPE" + (dintLoop - 1)).Putvalue(CurrentPort.PortType); msgTran.Secondary2("S1F6SFCD2").Item("PTMODE" + (dintLoop - 1)).Putvalue(CurrentPort.PortMode); msgTran.Secondary2("S1F6SFCD2").Item("SORTTYPE" + (dintLoop - 1)).Putvalue(0); msgTran.Secondary2("S1F6SFCD2").Item("CSTID" + (dintLoop - 1)).Putvalue(CurrentPort.CSTID); msgTran.Secondary2("S1F6SFCD2").Item("CSTTYPE" + (dintLoop - 1)).Putvalue(CurrentPort.CSTType); msgTran.Secondary2("S1F6SFCD2").Item("MAPSTIF" + (dintLoop - 1)).Putvalue(CurrentPort.GLSLoaderMapping10); msgTran.Secondary2("S1F6SFCD2").Item("CURSTIF" + (dintLoop - 1)).Putvalue(CurrentPort.GLSRealMapping10); msgTran.Secondary2("S1F6SFCD2").Item("BATORDER" + (dintLoop - 1)).Putvalue(CurrentPort.BATCH_ORDER); dintSendIndex += 1; } } else { if (dintSubUnitID == 0) { msgTran.Secondary2("S1F6SFCD2").Item("PORTCNT").Putvalue(pInfo.Unit(dintUnitID).SubUnitCount); if (dintUnitID == 1) { dintCount = 0; } else { dintCount = 4; } for (int dintLoop = 1; dintLoop <= pInfo.Unit(dintUnitID).SubUnitCount; dintLoop++) { InfoAct.clsPort CurrentPort = pInfo.Port(dintLoop + dintCount); msgTran.Secondary2("S1F6SFCD2").Item("PORTID" + (dintLoop - 1)).Putvalue(CurrentPort.HostReportPortID); msgTran.Secondary2("S1F6SFCD2").Item("PTSTATE" + (dintLoop - 1)).Putvalue(CurrentPort.PortState); msgTran.Secondary2("S1F6SFCD2").Item("PTTYPE" + (dintLoop - 1)).Putvalue(CurrentPort.PortType); msgTran.Secondary2("S1F6SFCD2").Item("PTMODE" + (dintLoop - 1)).Putvalue(CurrentPort.PortMode); msgTran.Secondary2("S1F6SFCD2").Item("SORTTYPE" + (dintLoop - 1)).Putvalue(0); msgTran.Secondary2("S1F6SFCD2").Item("CSTID" + (dintLoop - 1)).Putvalue(CurrentPort.CSTID); msgTran.Secondary2("S1F6SFCD2").Item("CSTTYPE" + (dintLoop - 1)).Putvalue(CurrentPort.CSTType); msgTran.Secondary2("S1F6SFCD2").Item("MAPSTIF" + (dintLoop - 1)).Putvalue(CurrentPort.GLSLoaderMapping10); msgTran.Secondary2("S1F6SFCD2").Item("CURSTIF" + (dintLoop - 1)).Putvalue(CurrentPort.GLSRealMapping10); msgTran.Secondary2("S1F6SFCD2").Item("BATORDER" + (dintLoop - 1)).Putvalue(CurrentPort.BATCH_ORDER); dintSendIndex += 1; } } else { msgTran.Secondary2("S1F6SFCD2").Item("PORTCNT").Putvalue(1); int dintPortNo = 0; if (dintUnitID == 1) { dintPortNo = dintSubUnitID; } else { dintPortNo = dintSubUnitID + 4; } InfoAct.clsPort CurrentPort = pInfo.Port(dintPortNo); msgTran.Secondary2("S1F6SFCD2").Item("PORTID" + 0).Putvalue(CurrentPort.HostReportPortID); msgTran.Secondary2("S1F6SFCD2").Item("PTSTATE" + 0).Putvalue(CurrentPort.PortState); msgTran.Secondary2("S1F6SFCD2").Item("PTTYPE" + 0).Putvalue(CurrentPort.PortType); msgTran.Secondary2("S1F6SFCD2").Item("PTMODE" + 0).Putvalue(CurrentPort.PortMode); msgTran.Secondary2("S1F6SFCD2").Item("SORTTYPE" + 0).Putvalue(0); msgTran.Secondary2("S1F6SFCD2").Item("CSTID" + 0).Putvalue(CurrentPort.CSTID); msgTran.Secondary2("S1F6SFCD2").Item("CSTTYPE" + 0).Putvalue(CurrentPort.CSTType); msgTran.Secondary2("S1F6SFCD2").Item("MAPSTIF" + 0).Putvalue(CurrentPort.GLSLoaderMapping10); msgTran.Secondary2("S1F6SFCD2").Item("CURSTIF" + 0).Putvalue(CurrentPort.GLSRealMapping10); msgTran.Secondary2("S1F6SFCD2").Item("BATORDER" + 0).Putvalue(CurrentPort.BATCH_ORDER); } } funSendReply2(msgTran, "S1F6SFCD2"); break; case "3": //현재 장비내에 존재하는 GLS 정보 보고 { msgTran.Secondary2("S1F6SFCD3").Item("UNITCNT").Putvalue(1); msgTran.Secondary2("S1F6SFCD3").Item("MODULEID" + 0).Putvalue(dstrModuleID); msgTran.Secondary2("S1F6SFCD3").Item("SFCD" + 0).Putvalue(dstrSFCD); int dintTemp = 0; if (pInfo.Unit(3).SubUnit(0).ModuleID == dstrModuleID) { dintTemp = 0; } else if (pInfo.Unit(3).SubUnit(7).ModuleID == dstrModuleID) { dintTemp = 7; } else { dintTemp = 8; } //장비안에 GLS가 존재하지 않으면 L,0으로 보고한다. if (this.pInfo.Unit(3).SubUnit(dintTemp).GLSExist == false) { msgTran.Secondary2("S1F6SFCD3").Item("GLSCNT" + 0).Putvalue(0); funSendReply2(msgTran, "S1F6SFCD3"); //shtReturn = Convert.ToInt16(msgTran.Reply2("S1F6SFCD3")); } else { msgTran.Secondary2("S1F6SFCD3").Item("GLSCNT" + 0).Putvalue(this.pInfo.Unit(3).SubUnit(dintTemp).CurrGLSCount); foreach (string dstrHGLSID in this.pInfo.Unit(3).SubUnit(dintTemp).CurrGLS()) { InfoAct.clsGLS CurrentGLS = pInfo.GLSID(dstrHGLSID); //혹시나 1개의 GLS가 막 나갈려는 찰나에 양쪽 Unit에 걸쳐있을떄 GLSID 중복 보고 방지 if (dhtGLSID.ContainsKey(dstrHGLSID) == false && CurrentGLS.Scrap == false) { dhtGLSID.Add(dstrHGLSID, dstrHGLSID); msgTran.Secondary2("S1F6SFCD3").Item("H_PANELID" + 0 + dintIndex).Putvalue(dstrHGLSID); msgTran.Secondary2("S1F6SFCD3").Item("E_PANELID" + 0 + dintIndex).Putvalue(CurrentGLS.E_PANELID); msgTran.Secondary2("S1F6SFCD3").Item("LOTID" + 0 + dintIndex).Putvalue(CurrentGLS.LOTID); msgTran.Secondary2("S1F6SFCD3").Item("BATCHID" + 0 + dintIndex).Putvalue(CurrentGLS.BATCHID); msgTran.Secondary2("S1F6SFCD3").Item("JOBID" + 0 + dintIndex).Putvalue(CurrentGLS.JOBID); msgTran.Secondary2("S1F6SFCD3").Item("PORTID" + 0 + dintIndex).Putvalue(CurrentGLS.PORTID.Trim()); msgTran.Secondary2("S1F6SFCD3").Item("SLOTNO" + 0 + dintIndex).Putvalue(CurrentGLS.SLOTNO); msgTran.Secondary2("S1F6SFCD3").Item("PROD_TYPE" + 0 + dintIndex).Putvalue(CurrentGLS.PRODUCT_TYPE); msgTran.Secondary2("S1F6SFCD3").Item("PRODID" + 0 + dintIndex).Putvalue(CurrentGLS.PRODUCTID); msgTran.Secondary2("S1F6SFCD3").Item("RUNSPECID" + 0 + dintIndex).Putvalue(CurrentGLS.RUNSPECID); msgTran.Secondary2("S1F6SFCD3").Item("LAYERID" + 0 + dintIndex).Putvalue(CurrentGLS.LAYERID); msgTran.Secondary2("S1F6SFCD3").Item("STEPID" + 0 + dintIndex).Putvalue(CurrentGLS.STEPID); msgTran.Secondary2("S1F6SFCD3").Item("PPID" + 0 + dintIndex).Putvalue(CurrentGLS.HOSTPPID); msgTran.Secondary2("S1F6SFCD3").Item("FLOWID" + 0 + dintIndex).Putvalue(CurrentGLS.FLOWID); msgTran.Secondary2("S1F6SFCD3").Item("SIZE" + 0 + dintIndex).Putvalue(CurrentGLS.SIZE); msgTran.Secondary2("S1F6SFCD3").Item("THICKNESS" + 0 + dintIndex).Putvalue(CurrentGLS.THICKNESS); msgTran.Secondary2("S1F6SFCD3").Item("STATE" + 0 + dintIndex).Putvalue(CurrentGLS.GLASS_STATE); msgTran.Secondary2("S1F6SFCD3").Item("ORDER" + 0 + dintIndex).Putvalue(CurrentGLS.GLASS_ORDER); msgTran.Secondary2("S1F6SFCD3").Item("COMMENT" + 0 + dintIndex).Putvalue(CurrentGLS.COMMENT); msgTran.Secondary2("S1F6SFCD3").Item("USE_CNT" + 0 + dintIndex).Putvalue(CurrentGLS.USE_COUNT); msgTran.Secondary2("S1F6SFCD3").Item("JUDGE" + 0 + dintIndex).Putvalue(CurrentGLS.JUDGEMENT); msgTran.Secondary2("S1F6SFCD3").Item("REASONCODE" + 0 + dintIndex).Putvalue(CurrentGLS.REASON_CODE); msgTran.Secondary2("S1F6SFCD3").Item("INS_FLAG" + 0 + dintIndex).Putvalue(CurrentGLS.INS_FLAG); msgTran.Secondary2("S1F6SFCD3").Item("ENC_FLAG" + 0 + dintIndex).Putvalue(CurrentGLS.ENC_FLAG); msgTran.Secondary2("S1F6SFCD3").Item("PRERUNFLAG" + 0 + dintIndex).Putvalue(CurrentGLS.PRERUN_FLAG); msgTran.Secondary2("S1F6SFCD3").Item("TURN_DIR" + 0 + dintIndex).Putvalue(CurrentGLS.TURN_DIR); msgTran.Secondary2("S1F6SFCD3").Item("FLIPSTATE" + 0 + dintIndex).Putvalue(CurrentGLS.FLIP_STATE); msgTran.Secondary2("S1F6SFCD3").Item("WORKSTATE" + 0 + dintIndex).Putvalue(CurrentGLS.WORK_STATE); msgTran.Secondary2("S1F6SFCD3").Item("MULTIUSE" + 0 + dintIndex).Putvalue(CurrentGLS.MULTI_USE); msgTran.Secondary2("S1F6SFCD3").Item("PAIR_GLSID" + 0 + dintIndex).Putvalue(CurrentGLS.PAIR_GLASSID); msgTran.Secondary2("S1F6SFCD3").Item("PAIR_PPID" + 0 + dintIndex).Putvalue(CurrentGLS.PAIR_PPID); msgTran.Secondary2("S1F6SFCD3").Item("OPT_NAME1" + 0 + dintIndex).Putvalue(CurrentGLS.OPTION_NAME[0]); msgTran.Secondary2("S1F6SFCD3").Item("OPT_VALUE1" + 0 + dintIndex).Putvalue(CurrentGLS.OPTION_VALUE[0]); msgTran.Secondary2("S1F6SFCD3").Item("OPT_NAME2" + 0 + dintIndex).Putvalue(CurrentGLS.OPTION_NAME[1]); msgTran.Secondary2("S1F6SFCD3").Item("OPT_VALUE2" + 0 + dintIndex).Putvalue(CurrentGLS.OPTION_VALUE[1]); msgTran.Secondary2("S1F6SFCD3").Item("OPT_NAME3" + 0 + dintIndex).Putvalue(CurrentGLS.OPTION_NAME[2]); msgTran.Secondary2("S1F6SFCD3").Item("OPT_VALUE3" + 0 + dintIndex).Putvalue(CurrentGLS.OPTION_VALUE[2]); msgTran.Secondary2("S1F6SFCD3").Item("OPT_NAME4" + 0 + dintIndex).Putvalue(CurrentGLS.OPTION_NAME[3]); msgTran.Secondary2("S1F6SFCD3").Item("OPT_VALUE4" + 0 + dintIndex).Putvalue(CurrentGLS.OPTION_VALUE[3]); msgTran.Secondary2("S1F6SFCD3").Item("OPT_NAME5" + 0 + dintIndex).Putvalue(CurrentGLS.OPTION_NAME[4]); msgTran.Secondary2("S1F6SFCD3").Item("OPT_VALUE5" + 0 + dintIndex).Putvalue(CurrentGLS.OPTION_VALUE[4]); dintIndex++; } } if (dintIndex == 0) { msgTran.Secondary2("S1F6SFCD3").Item("GLSCNT").Putvalue(0); } funSendReply2(msgTran, "S1F6SFCD3"); } } break; case "4": //각 Unit(Module) 상태 보고 { msgTran.Secondary2("S1F6SFCD4").Item("MODULEID").Putvalue(dstrModuleID); msgTran.Secondary2("S1F6SFCD4").Item("MODULE_STATE").Putvalue(this.pInfo.Unit(3).SubUnit(0).EQPState); msgTran.Secondary2("S1F6SFCD4").Item("PROC_STATE").Putvalue(this.pInfo.Unit(3).SubUnit(0).EQPProcessState); msgTran.Secondary2("S1F6SFCD4").Item("MCMD").Putvalue(this.pInfo.All.ControlState); //msgTran.Secondary2("S1F6SFCD4").Item("LAYER1CNT").Putvalue(this.pInfo.UnitCount); msgTran.Secondary2("S1F6SFCD4").Item("LAYER1CNT").Putvalue(pInfo.Unit(3).SubUnitCount + 2); msgTran.Secondary2("S1F6SFCD4").Item("SFCD").Putvalue(dstrSFCD); for (int dintLoop = 1; dintLoop <= this.pInfo.Unit(3).SubUnitCount; dintLoop++) { msgTran.Secondary2("S1F6SFCD4").Item("MODULEID1" + (dintLoop - 1)).Putvalue(this.pInfo.Unit(3).SubUnit(dintLoop).ModuleID); msgTran.Secondary2("S1F6SFCD4").Item("MODULE_STATE1" + (dintLoop - 1)).Putvalue(this.pInfo.Unit(3).SubUnit(dintLoop).EQPState); msgTran.Secondary2("S1F6SFCD4").Item("PROC_STATE1" + (dintLoop - 1)).Putvalue(this.pInfo.Unit(3).SubUnit(dintLoop).EQPProcessState); msgTran.Secondary2("S1F6SFCD4").Item("LAYER2CNT" + (dintLoop - 1)).Putvalue(0); } //[2015/01/22] Port단 상태 보고(Add by HS) for (int dintLoop = 1; dintLoop <= 2; dintLoop++) { msgTran.Secondary2("S1F6SFCD4").Item("MODULEID1" + (this.pInfo.Unit(3).SubUnitCount - 1 + dintLoop)).Putvalue(this.pInfo.Unit(dintLoop).SubUnit(0).ModuleID); msgTran.Secondary2("S1F6SFCD4").Item("MODULE_STATE1" + (this.pInfo.Unit(3).SubUnitCount - 1 + dintLoop)).Putvalue(this.pInfo.Unit(dintLoop).SubUnit(0).EQPState); msgTran.Secondary2("S1F6SFCD4").Item("PROC_STATE1" + (this.pInfo.Unit(3).SubUnitCount - 1 + dintLoop)).Putvalue(this.pInfo.Unit(dintLoop).SubUnit(0).EQPProcessState); msgTran.Secondary2("S1F6SFCD4").Item("LAYER2CNT" + (this.pInfo.Unit(3).SubUnitCount - 1 + dintLoop)).Putvalue(0); } funSendReply2(msgTran, "S1F6SFCD4"); } break; case "31": { msgTran.Secondary2("S1F6SFCD31").Item("MODULEID").Putvalue(dstrModuleID); msgTran.Secondary2("S1F6SFCD31").Item("SFCD").Putvalue(dstrSFCD); msgTran.Secondary2("S1F6SFCD31").Item("MODULE_STATE").Putvalue(this.pInfo.Unit(0).SubUnit(0).EQPState); msgTran.Secondary2("S1F6SFCD31").Item("PROC_STATE").Putvalue(this.pInfo.Unit(0).SubUnit(0).EQPProcessState); msgTran.Secondary2("S1F6SFCD31").Item("CUR_STEPNO").Putvalue(0); // 협의 필요 msgTran.Secondary2("S1F6SFCD31").Item("CUR_STEPCNT").Putvalue(this.pInfo.Unit(0).SubUnit(0).CurrGLSCount); msgTran.Secondary2("S1F6SFCD31").Item("CUR_GLSCNT").Putvalue(this.pInfo.Unit(0).SubUnit(0).CurrGLSCount); msgTran.Secondary2("S1F6SFCD31").Item("CUR_M_CNT").Putvalue(this.pInfo.Unit(0).SubUnit(0).CurrGLSCount); int dintStepNoIndex = 0; foreach (InfoAct.clsGLS tmpGLS in this.pInfo.Unit(0).SubUnit(0).CurrGLSValues()) { InfoAct.clsSlot currentSlot = pInfo.LOTID(tmpGLS.LOTID).Slot(tmpGLS.SlotID); msgTran.Secondary2("S1F6SFCD31").Item("STEPNO" + dintStepNoIndex).Putvalue(currentSlot.StepNo); msgTran.Secondary2("S1F6SFCD31").Item("STEP_DESC" + dintStepNoIndex).Putvalue(this.pInfo.Unit(0).SubUnit(0).ProcessStep(currentSlot.StepNo).StepDesc); msgTran.Secondary2("S1F6SFCD31").Item("H_GLASSID" + dintStepNoIndex).Putvalue(currentSlot.H_PANELID); msgTran.Secondary2("S1F6SFCD31").Item("MATERIAL_ID" + dintStepNoIndex).Putvalue(currentSlot.H_PANELID); dintStepNoIndex++; } msgTran.Secondary2("S1F6SFCD31").Item("LAYER1CNT").Putvalue(this.pInfo.UnitCount); for (int dintLoop = 1; dintLoop <= this.pInfo.UnitCount; dintLoop++) { msgTran.Secondary2("S1F6SFCD31").Item("MODULEID1" + (dintLoop - 1)).Putvalue(this.pInfo.Unit(dintLoop).SubUnit(0).ModuleID); msgTran.Secondary2("S1F6SFCD31").Item("MODULE_STATE1" + (dintLoop - 1)).Putvalue(this.pInfo.Unit(dintLoop).SubUnit(0).EQPState); msgTran.Secondary2("S1F6SFCD31").Item("PROC_STATE1" + (dintLoop - 1)).Putvalue(this.pInfo.Unit(dintLoop).SubUnit(0).EQPProcessState); InfoAct.clsSlot currentSlot = null; if (!string.IsNullOrWhiteSpace(this.pInfo.Unit(dintLoop).SubUnit(0).HGLSID)) //this.pInfo.Unit(dintLoop).SubUnit(0).GLSExist) { InfoAct.clsGLS tmpGLS = this.pInfo.Unit(0).SubUnit(0).CurrGLS(this.pInfo.Unit(dintLoop).SubUnit(0).HGLSID); currentSlot = pInfo.LOTID(tmpGLS.LOTID).Slot(tmpGLS.SlotID); } msgTran.Secondary2("S1F6SFCD31").Item("CUR_STEPCNT1" + (dintLoop - 1)).Putvalue((currentSlot != null) ? 1 : 0); msgTran.Secondary2("S1F6SFCD31").Item("CUR_GLSCNT1" + (dintLoop - 1)).Putvalue((currentSlot != null) ? 1 : 0); msgTran.Secondary2("S1F6SFCD31").Item("CUR_M_CNT1" + (dintLoop - 1)).Putvalue((currentSlot != null) ? 1 : 0); int dintStepNo = (currentSlot != null) ? currentSlot.StepNo : 0; msgTran.Secondary2("S1F6SFCD31").Item("CUR_STEPNO1" + (dintLoop - 1)).Putvalue(dintStepNo); if (dintStepNo != 0) { msgTran.Secondary2("S1F6SFCD31").Item("STEPNO1" + (dintLoop - 1) + 0).Putvalue(dintStepNo); msgTran.Secondary2("S1F6SFCD31").Item("STEP_DESC1" + (dintLoop - 1) + 0).Putvalue(this.pInfo.Unit(0).SubUnit(0).ProcessStep(dintStepNo).StepDesc); msgTran.Secondary2("S1F6SFCD31").Item("H_GLASSID1" + (dintLoop - 1) + 0).Putvalue(this.pInfo.Unit(dintLoop).SubUnit(0).HGLSID); msgTran.Secondary2("S1F6SFCD31").Item("MATERIAL_ID1" + (dintLoop - 1) + 0).Putvalue(this.pInfo.Unit(dintLoop).SubUnit(0).HGLSID); //msgTran.Secondary2("S1F6SFCD31").Item("STEP_DESC1" /*+ (dintLoop - 1)*/).Putvalue(this.pInfo.Unit(0).SubUnit(0).ProcessStep(dintStepNo).StepDesc); //msgTran.Secondary2("S1F6SFCD31").Item("H_GLASSID1" /*+ (dintLoop - 1)*/).Putvalue(this.pInfo.Unit(dintLoop).SubUnit(0).HGLSID); //msgTran.Secondary2("S1F6SFCD31").Item("MATERIAL_ID1" /*+ (dintLoop - 1)*/).Putvalue(this.pInfo.Unit(dintLoop).SubUnit(0).HGLSID); } msgTran.Secondary2("S1F6SFCD31").Item("LAYER2CNT" + (dintLoop - 1)).Putvalue(0); } funSendReply2(msgTran, "S1F6SFCD31"); } break; default: //잘못된 SFCD가 내려올 경우 { msgTran.Secondary2("S1F6WrongMODID").Item("MODULEID").Putvalue(dstrModuleID); msgTran.Secondary2("S1F6WrongMODID").Item("SFCD").Putvalue(dstrSFCD); funSendReply2(msgTran, "S1F6WrongMODID"); } break; } } catch (Exception error) { funSetLog(InfoAct.clsInfo.LogType.CIM, error.ToString()); return; } }
/// <summary> /// Primary Message를 Biuld하여 Transaction을 Return한다. /// </summary> /// <param name="strParameters">Parameter 문자열</param> public Transaction funPrimarySend(string strParameters) { string[] arrayEvent; try { arrayEvent = strParameters.Split(','); string dstrLOTID = arrayEvent[1].Trim(); //LOTID int dintSlotID = Convert.ToInt32(arrayEvent[2]); //SlotID string dstrHGLSID = arrayEvent[3].Trim(); //GLSID 추가 20100320 어우수 pMsgTran = pSecsDrv.MakeTransaction(this.StrPrimaryMsgName); pMsgTran.Primary().Item("DATAID").Putvalue(0); //Fixed Value pMsgTran.Primary().Item("CEID").Putvalue(81); //Fixed Value pMsgTran.Primary().Item("RPTID").Putvalue(10); //Fixed Value pMsgTran.Primary().Item("GLASSCOUNT").Putvalue(1); //이시 20101018 어우수 //InfoAct.clsSlot currentSlot = this.pInfo.LOTID(dstrLOTID).Slot(dintSlotID); InfoAct.clsGLS CurrentGLS = pInfo.GLSID(dstrHGLSID); pMsgTran.Primary().Item("H_GLASSID" + 0).Putvalue(CurrentGLS.H_PANELID); pMsgTran.Primary().Item("E_GLASSID" + 0).Putvalue(CurrentGLS.E_PANELID); pMsgTran.Primary().Item("LOTID" + 0).Putvalue(CurrentGLS.LOTID); pMsgTran.Primary().Item("BATCHID" + 0).Putvalue(CurrentGLS.BATCHID); pMsgTran.Primary().Item("JOBID" + 0).Putvalue(CurrentGLS.JOBID); pMsgTran.Primary().Item("PORTID" + 0).Putvalue(CurrentGLS.PORTID); pMsgTran.Primary().Item("SLOTNO" + 0).Putvalue(CurrentGLS.SLOTNO); pMsgTran.Primary().Item("PROD_TYPE" + 0).Putvalue(CurrentGLS.PRODUCT_TYPE); pMsgTran.Primary().Item("PROD_KIND" + 0).Putvalue(CurrentGLS.PRODUCT_KIND); pMsgTran.Primary().Item("PRODUCTID" + 0).Putvalue(CurrentGLS.PRODUCTID); pMsgTran.Primary().Item("RUNSPECID" + 0).Putvalue(CurrentGLS.RUNSPECID); pMsgTran.Primary().Item("LAYERID" + 0).Putvalue(CurrentGLS.LAYERID); pMsgTran.Primary().Item("STEPID" + 0).Putvalue(CurrentGLS.STEPID); if (CurrentGLS.IsRPCRunning) { pMsgTran.Primary().Item("PPID" + 0).Putvalue(pInfo.All.RPCPPID); } else { pMsgTran.Primary().Item("PPID" + 0).Putvalue(CurrentGLS.HOSTPPID); } pMsgTran.Primary().Item("FLOWID" + 0).Putvalue(CurrentGLS.FLOWID); pMsgTran.Primary().Item("SIZE" + 0).Putvalue(CurrentGLS.SIZE); pMsgTran.Primary().Item("THICKNESS" + 0).Putvalue(CurrentGLS.THICKNESS); pMsgTran.Primary().Item("STATE" + 0).Putvalue(CurrentGLS.GLASS_STATE); pMsgTran.Primary().Item("ORDER" + 0).Putvalue(CurrentGLS.GLASS_ORDER); pMsgTran.Primary().Item("COMMENT" + 0).Putvalue(CurrentGLS.COMMENT); pMsgTran.Primary().Item("USE_COUNT" + 0).Putvalue(CurrentGLS.USE_COUNT); pMsgTran.Primary().Item("JUDGEMENT" + 0).Putvalue(CurrentGLS.JUDGEMENT); pMsgTran.Primary().Item("REASON_CODE" + 0).Putvalue(CurrentGLS.REASON_CODE); pMsgTran.Primary().Item("INS_FLAG" + 0).Putvalue(CurrentGLS.INS_FLAG); pMsgTran.Primary().Item("ENC_FLAG" + 0).Putvalue(CurrentGLS.ENC_FLAG); pMsgTran.Primary().Item("PRERUN_FLAG" + 0).Putvalue(CurrentGLS.PRERUN_FLAG); pMsgTran.Primary().Item("TURN_DIR" + 0).Putvalue(CurrentGLS.TURN_DIR); pMsgTran.Primary().Item("FLIP_STATE" + 0).Putvalue(CurrentGLS.FLIP_STATE); pMsgTran.Primary().Item("WORK_STATE" + 0).Putvalue(CurrentGLS.WORK_STATE); pMsgTran.Primary().Item("MULTI_USE" + 0).Putvalue(CurrentGLS.MULTI_USE); pMsgTran.Primary().Item("PAIR_GLASSID" + 0).Putvalue(CurrentGLS.PAIR_GLASSID); pMsgTran.Primary().Item("PAIR_PPID" + 0).Putvalue(CurrentGLS.PAIR_PPID); pMsgTran.Primary().Item("OPTION_NAME1" + 0).Putvalue(CurrentGLS.OPTION_NAME[0]); pMsgTran.Primary().Item("OPTION_VALUE1" + 0).Putvalue(CurrentGLS.OPTION_VALUE[0]); pMsgTran.Primary().Item("OPTION_NAME2" + 0).Putvalue(CurrentGLS.OPTION_NAME[1]); pMsgTran.Primary().Item("OPTION_VALUE2" + 0).Putvalue(CurrentGLS.OPTION_VALUE[1]); pMsgTran.Primary().Item("OPTION_NAME3" + 0).Putvalue(CurrentGLS.OPTION_NAME[2]); pMsgTran.Primary().Item("OPTION_VALUE3" + 0).Putvalue(CurrentGLS.OPTION_VALUE[2]); pMsgTran.Primary().Item("OPTION_NAME4" + 0).Putvalue(CurrentGLS.OPTION_NAME[3]); pMsgTran.Primary().Item("OPTION_VALUE4" + 0).Putvalue(CurrentGLS.OPTION_VALUE[3]); pMsgTran.Primary().Item("OPTION_NAME5" + 0).Putvalue(CurrentGLS.OPTION_NAME[4]); pMsgTran.Primary().Item("OPTION_VALUE5" + 0).Putvalue(CurrentGLS.OPTION_VALUE[4]); //GLS APD 추가 pMsgTran.Primary().Item("RPTID1").Putvalue(9); //Fixed Value pMsgTran.Primary().Item("MODULECNT").Putvalue(1); //임시 20101018 어우수 pMsgTran.Primary().Item("MODULEID" + 0).Putvalue(this.pInfo.Unit(3).SubUnit(0).ModuleID); int dintGlassApdCount = pInfo.Unit(0).SubUnit(0).GLSAPDReportCount; pMsgTran.Primary().Item("DATACOUNT" + 0).Putvalue(dintGlassApdCount); int dintAPDIndex = 0; for (int dintLoop = 1; dintLoop <= pInfo.Unit(0).SubUnit(0).GLSAPDCount; dintLoop++) { InfoAct.clsGLSAPD currentGlassApd = this.pInfo.Unit(0).SubUnit(0).GLSAPD(dintLoop); if (currentGlassApd.HostReportFlag) { pMsgTran.Primary().Item("DATA_ITEM" + 0 + dintAPDIndex).Putvalue(currentGlassApd.Name); pMsgTran.Primary().Item("DATA_VALUE" + 0 + dintAPDIndex).Putvalue(currentGlassApd.Value); dintAPDIndex++; } } pMsgTran.Primary().Item("RPTID2").Putvalue(12); //Fixed Value pMsgTran.Primary().Item("GLSCNT").Putvalue(1); //임시 20101018 어우수 return(pMsgTran); } catch (Exception error) { funSetLog(InfoAct.clsInfo.LogType.CIM, error.ToString()); return(null); } }
/// <summary> /// 설비에서 CIM으로 발생하는 Event에 대한 처리 /// </summary> /// <param name="parameters">Parameter Array</param> /// <remarks> /// parameters[0] : strCompBit /// parameters[1] : dstrACTVal /// parameters[2] : dintActFrom AlarmID /// parameters[3] : dstrACTFromSub /// parameters[4] : intBitVal Set/Reset /// parameters[5] : Special Parameter /// </remarks> public void funProcessEQPEvent(string[] parameters) { int dintAlarmID = -1; string dstrStatus = string.Empty; int dintUnitID = 0; int dintUnitID_TEMP = 0; int dintSubUnitID_TEMP = 0; bool dbolCheckFlag = false; string strMCCData = ""; try { dintAlarmID = Convert.ToInt32(parameters[2]); dstrStatus = (parameters[4] == "1") ? "SET" : "RESET"; if (pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID) == null || string.IsNullOrEmpty(pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmDesc) || pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmDesc == "Spare") { return; } if (dstrStatus.Equals("SET")) // 알람 발생 { pInfo.Unit(0).SubUnit(0).AddCurrAlarm(dintAlarmID); pInfo.Unit(0).SubUnit(0).CurrAlarm(dintAlarmID).AlarmEventType = "S"; // Set pInfo.Unit(0).SubUnit(0).CurrAlarm(dintAlarmID).AlarmType = pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmType; pInfo.Unit(0).SubUnit(0).CurrAlarm(dintAlarmID).AlarmReport = pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmReport; pInfo.Unit(0).SubUnit(0).CurrAlarm(dintAlarmID).SETCODE = 1; // Set pInfo.Unit(3).SubUnit(0).AddCurrAlarm(dintAlarmID); pInfo.Unit(3).SubUnit(0).CurrAlarm(dintAlarmID).AlarmEventType = "S"; // Set pInfo.Unit(3).SubUnit(0).CurrAlarm(dintAlarmID).AlarmType = pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmType; pInfo.Unit(3).SubUnit(0).CurrAlarm(dintAlarmID).AlarmReport = pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmReport; pInfo.Unit(3).SubUnit(0).CurrAlarm(dintAlarmID).SETCODE = 1; // Set //pInfo.Unit(0).SubUnit(0).CurrAlarm(dintAlarmID).ModuleID = pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).ModuleID; //Heavy Alarm이 발생하면 Alarm정보를 누적 저장한다. if (pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmType == "H") { pInfo.All.OccurHeavyAlarmID = dintAlarmID; //발생한 모든 Alarm을 연속해서 저장한다. if (pInfo.Unit(0).SetAlarmID == "") { pInfo.Unit(0).SetAlarmID = dintAlarmID.ToString(); } else { pInfo.Unit(0).SetAlarmID = pInfo.Unit(0).SetAlarmID + "," + dintAlarmID.ToString(); } } //int.TryParse(pInfo.ModuleIDToUnitID(pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).ModuleID), out dintUnitID); for (int dintLoop = 0; dintLoop <= pInfo.UnitCount; dintLoop++) { for (int dintLoop2 = 0; dintLoop2 < pInfo.Unit(dintLoop).SubUnitCount; dintLoop2++) { if (pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).ModuleID == pInfo.Unit(dintLoop).SubUnit(dintLoop2).ModuleID) { dintUnitID_TEMP = dintLoop; dintSubUnitID_TEMP = dintLoop2; dbolCheckFlag = true; break; } } if (dbolCheckFlag) { break; } } if (dintUnitID_TEMP != 0) { pInfo.Unit(dintUnitID_TEMP).SubUnit(0).AddCurrAlarm(dintAlarmID); pInfo.Unit(dintUnitID_TEMP).SubUnit(0).CurrAlarm(dintAlarmID).AlarmEventType = "S"; // Set pInfo.Unit(dintUnitID_TEMP).SubUnit(0).CurrAlarm(dintAlarmID).AlarmType = pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmType; pInfo.Unit(dintUnitID_TEMP).SubUnit(0).CurrAlarm(dintAlarmID).AlarmReport = pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmReport; pInfo.Unit(dintUnitID_TEMP).SubUnit(0).CurrAlarm(dintAlarmID).SETCODE = 1; // Set pInfo.Unit(dintUnitID_TEMP).SubUnit(dintSubUnitID_TEMP).AddCurrAlarm(dintAlarmID); pInfo.Unit(dintUnitID_TEMP).SubUnit(dintSubUnitID_TEMP).CurrAlarm(dintAlarmID).AlarmEventType = "S"; // Set pInfo.Unit(dintUnitID_TEMP).SubUnit(dintSubUnitID_TEMP).CurrAlarm(dintAlarmID).AlarmType = pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmType; pInfo.Unit(dintUnitID_TEMP).SubUnit(dintSubUnitID_TEMP).CurrAlarm(dintAlarmID).AlarmReport = pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmReport; pInfo.Unit(dintUnitID_TEMP).SubUnit(dintSubUnitID_TEMP).CurrAlarm(dintAlarmID).SETCODE = 1; // Set if (pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmType == "H") { pInfo.Unit(dintUnitID_TEMP).SubUnit(0).AlarmID = dintAlarmID; pInfo.Unit(dintUnitID_TEMP).SubUnit(dintSubUnitID_TEMP).AlarmID = dintAlarmID; } } } else // 알람 해제 { pInfo.Unit(0).SubUnit(0).CurrAlarm(dintAlarmID).AlarmEventType = "R"; // ReSet pInfo.Unit(0).SubUnit(0).CurrAlarm(dintAlarmID).SETCODE = 0; // Set //Heavy Alarm이 해제되면 Alarm정보를 누적 저장한다. if (pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmType == "H") { pInfo.All.ClearHeavyAlarmID = dintAlarmID; } for (int dintLoop = 0; dintLoop <= pInfo.UnitCount; dintLoop++) { for (int dintLoop2 = 0; dintLoop2 < pInfo.Unit(dintLoop).SubUnitCount; dintLoop2++) { if (pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).ModuleID == pInfo.Unit(dintLoop).SubUnit(dintLoop2).ModuleID) { dintUnitID_TEMP = dintLoop; dintSubUnitID_TEMP = dintLoop2; dbolCheckFlag = true; break; } } if (dbolCheckFlag) { break; } } if (dintUnitID != 0) { pInfo.Unit(dintUnitID_TEMP).SubUnit(0).RemoveCurrAlarm(dintAlarmID); pInfo.Unit(dintUnitID_TEMP).SubUnit(dintSubUnitID_TEMP).RemoveCurrAlarm(dintAlarmID); if (pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmType == "H") { pInfo.Unit(dintUnitID_TEMP).SubUnit(0).AlarmID = 0; pInfo.Unit(dintUnitID_TEMP).SubUnit(dintSubUnitID_TEMP).AlarmID = 0; } } } InfoAct.clsAlarm CurrentAlram = pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID); //현재 발생 혹은 해제한 AlarmID를 가지고 기준정보에서 Alarm 정보를 가져온다. string dstrAlarmTime = DateTime.Now.ToString("yyyyMMddHHmmss"); // Alarm 발생, 해제시간 설정 pInfo.Unit(0).SubUnit(0).CurrAlarm(dintAlarmID).AlarmType = CurrentAlram.AlarmType; pInfo.Unit(0).SubUnit(0).CurrAlarm(dintAlarmID).AlarmCode = CurrentAlram.AlarmCode; pInfo.Unit(0).SubUnit(0).CurrAlarm(dintAlarmID).AlarmDesc = CurrentAlram.AlarmDesc; pInfo.Unit(0).SubUnit(0).CurrAlarm(dintAlarmID).AlarmOCCTime = dstrAlarmTime; pInfo.Unit(0).SubUnit(0).CurrAlarm(dintAlarmID).ModuleID = CurrentAlram.ModuleID; pInfo.Unit(0).SubUnit(0).CurrAlarm(dintAlarmID).AlarmReport = CurrentAlram.AlarmReport; //S5F1 Alarm Host 보고 if (pInfo.Unit(0).SubUnit(0).CurrAlarm(dintAlarmID).AlarmReport == true) { pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S5F1AlarmReportsend, dintAlarmID); } if (dstrStatus == "RESET") // Alarm Reset 이면 발생알람을 구조체에서 삭제한다. { pInfo.Unit(0).SubUnit(0).RemoveCurrAlarm(dintAlarmID); } // Alarm 로그 Write string dstrAlarmMsg = dstrAlarmTime + "," + CurrentAlram.ModuleID + "," + dstrStatus + "," + dintAlarmID.ToString() + "," + CurrentAlram.AlarmCode + "," + CurrentAlram.AlarmType + "," + CurrentAlram.AlarmDesc; pInfo.subLog_Set(InfoAct.clsInfo.LogType.Alarm, dstrAlarmMsg); if (dstrStatus == "SET") { //알람발생시 장비내 Glass정보 저장 //subGLSPosLogWrite(dstrAlarmTime, pInfo.Unit(0).SubUnit(0).CurrAlarm(dintAlarmID).UnitID, dintAlarmID); } // Alarm Message를 MainView ComboBox에 추가 (Message에 발생시간은 제외 Combo에 시간이 이중으로 Display 되어서) dstrAlarmMsg = CurrentAlram.ModuleID + "," + dstrStatus + "," + dintAlarmID.ToString() + "," + CurrentAlram.AlarmCode + "," + CurrentAlram.AlarmType + "," + CurrentAlram.AlarmDesc; pInfo.subMessage_Set(InfoAct.clsInfo.MsgType.AlarmMsg, dstrAlarmMsg); int dintSubUnitID = 0; bool CheckFlag = false; for (int dintLoop = 0; dintLoop <= pInfo.UnitCount; dintLoop++) { for (int dintLoop2 = 0; dintLoop2 <= pInfo.Unit(dintLoop).SubUnitCount; dintLoop2++) { if (pInfo.Unit(dintLoop).SubUnit(dintLoop2).ModuleID == CurrentAlram.ModuleID) { dintUnitID = dintLoop; dintSubUnitID = dintLoop2; CheckFlag = true; break; } } if (CheckFlag) { break; } } //[2015/04/26]MCC Log(Add by HS) if (this.pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmType == "H") { strMCCData = "ERROR;"; } else { strMCCData = "WARNING;"; } InfoAct.clsGLS CurrentGLS = pInfo.GLSID(pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).HGLSID); strMCCData += pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).ModuleID.Substring(pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).ModuleID.Length - 4, 4) + ","; if (CurrentGLS != null) { strMCCData += CurrentGLS.STEPID + ","; strMCCData += CurrentGLS.H_PANELID + ","; strMCCData += CurrentGLS.LOTID + ","; strMCCData += pInfo.All.CurrentHOSTPPID + "=" + pInfo.All.CurrentEQPPPID + ","; } else { strMCCData += ",,,,"; } strMCCData += dstrStatus + ","; strMCCData += dintAlarmID.ToString() + ","; strMCCData += pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmDesc + ";"; pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.MCCDataSend, strMCCData); //if (dstrStatus == "SET") //{ //strMCCData = ","; //strMCCData += DateTime.Now.ToString("MMdd_HHmm_ss.fff") + ","; //strMCCData += pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).ModuleID.Substring(pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).ModuleID.Length - 4, 4) + ","; //strMCCData +=( (CurrentAlram.AlarmType == "H")? "E":"W") + ","; //if (pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).GLSExist) //{ // InfoAct.clsGLS CurrentGLS = pInfo.GLSID(pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).HGLSID); // strMCCData += CurrentGLS.STEPID + ","; // strMCCData += CurrentGLS.H_PANELID + ","; // strMCCData += CurrentGLS.LOTID + ","; //} //else //{ // strMCCData += ",,,"; //} //strMCCData += pInfo.All.CurrentHOSTPPID + "=" + pInfo.All.CurrentEQPPPID + ","; //strMCCData += string.Format("SET={0}={1}", dintAlarmID, pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmDesc); //pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.MCCDataSend, strMCCData); //} //else //{ //strMCCData = ","; //strMCCData += DateTime.Now.ToString("MMdd_HHmm_ss.fff") + ","; //strMCCData += pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).ModuleID.Substring(pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).ModuleID.Length - 4, 4) + ","; //strMCCData += ((CurrentAlram.AlarmType == "H")? "E":"W") + ","; //if (pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).GLSExist) //{ // InfoAct.clsGLS CurrentGLS = pInfo.GLSID(pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).HGLSID); // strMCCData += CurrentGLS.STEPID + ","; // strMCCData += CurrentGLS.H_PANELID + ","; // strMCCData += CurrentGLS.LOTID + ","; //} //else //{ // strMCCData += ",,,"; //} //strMCCData += pInfo.All.CurrentHOSTPPID + "=" + pInfo.All.CurrentEQPPPID + ","; //strMCCData += string.Format("RESET={0}={1}", dintAlarmID, pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmDesc); //pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.MCCDataSend, strMCCData); //} } catch (Exception ex) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString() + ", strStatus:" + dstrStatus + ", dintAlarmID:" + dintAlarmID); } }
/// <summary> /// Primary Message를 Biuld하여 Transaction을 Return한다. /// </summary> /// <param name="strParameters">Parameter 문자열</param> public Transaction funPrimarySend(string strParameters) { string[] arrayEvent; int dintBYWHO = 0; try { arrayEvent = strParameters.Split(','); pMsgTran = pSecsDrv.MakeTransaction(this.StrPrimaryMsgName); int dintCEID = Convert.ToInt32(arrayEvent[1]); //CEID int dintUnitID = Convert.ToInt32(arrayEvent[2]); //UnitID int dintSubUnitID = Convert.ToInt32(arrayEvent[3]); string dstrGLSID = arrayEvent[4]; //LOTID int dintSlotID = Convert.ToInt32(arrayEvent[5]); //SlotID //string dstrHGLSID = arrayEvent[5].Trim(); //GLSID pMsgTran.Primary().Item("DATAID").Putvalue(0); //Fixed Value pMsgTran.Primary().Item("CEID").Putvalue(dintCEID); pMsgTran.Primary().Item("RPTID").Putvalue(1); //Fixed Value pMsgTran.Primary().Item("MODULEID").Putvalue(pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).ModuleID); pMsgTran.Primary().Item("MCMD").Putvalue(pInfo.All.ControlState); pMsgTran.Primary().Item("MODULE_STATE").Putvalue(pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).EQPState); pMsgTran.Primary().Item("PROC_STATE").Putvalue(pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).EQPProcessState); //각 CEID별로 BYWHO값을 설정한다. switch (dintCEID) { case 10: dintBYWHO = 3; break; case 13: dintBYWHO = 3; break; case 18: dintBYWHO = 2; break; case 19: dintBYWHO = 2; break; case 21: dintBYWHO = 3; break; case 23: dintBYWHO = 3; break; default: dintBYWHO = 3; break; } pMsgTran.Primary().Item("BYWHO").Putvalue(dintBYWHO); pMsgTran.Primary().Item("OPERID").Putvalue(this.pInfo.All.UserID); pMsgTran.Primary().Item("RPTID2").Putvalue(10); //Fixed Value pMsgTran.Primary().Item("GLASSCOUNT").Putvalue(1); //임시 20101015 어우수 if (dintCEID.ToString().Length > 2) { InfoAct.clsSlot currentSlot = pInfo.LOTID(dstrGLSID).Slot(dintSlotID); pMsgTran.Primary().Item("H_GLASSID").Putvalue(currentSlot.H_PANELID); pMsgTran.Primary().Item("E_GLASSID").Putvalue(currentSlot.E_PANELID); pMsgTran.Primary().Item("LOTID").Putvalue(currentSlot.LOTID); pMsgTran.Primary().Item("BATCHID").Putvalue(currentSlot.BATCHID); pMsgTran.Primary().Item("JOBID").Putvalue(currentSlot.JOBID); pMsgTran.Primary().Item("PORTID1").Putvalue(currentSlot.PORTID.Trim()); pMsgTran.Primary().Item("SLOTNO").Putvalue(currentSlot.SLOTNO); pMsgTran.Primary().Item("PROD_TYPE").Putvalue(currentSlot.PRODUCT_TYPE); pMsgTran.Primary().Item("PROD_KIND").Putvalue(currentSlot.PRODUCT_KIND); pMsgTran.Primary().Item("PRODUCTID").Putvalue(currentSlot.PRODUCTID); pMsgTran.Primary().Item("RUNSPECID").Putvalue(currentSlot.RUNSPECID); pMsgTran.Primary().Item("LAYERID").Putvalue(currentSlot.LAYERID); pMsgTran.Primary().Item("STEPID").Putvalue(currentSlot.STEPID); pMsgTran.Primary().Item("PPID").Putvalue(currentSlot.HOSTPPID); pMsgTran.Primary().Item("FLOWID").Putvalue(currentSlot.FLOWID); string[] darrSize = currentSlot.SIZE.Split(' '); pMsgTran.Primary().Item("SIZE").Putvalue(darrSize); pMsgTran.Primary().Item("THICKNESS").Putvalue(currentSlot.THICKNESS); pMsgTran.Primary().Item("STATE").Putvalue(currentSlot.GLASS_STATE); pMsgTran.Primary().Item("ORDER").Putvalue(currentSlot.GLASS_ORDER); pMsgTran.Primary().Item("COMMENT").Putvalue(currentSlot.COMMENT); pMsgTran.Primary().Item("USE_COUNT").Putvalue(currentSlot.USE_COUNT); pMsgTran.Primary().Item("JUDGEMENT").Putvalue(currentSlot.JUDGEMENT); pMsgTran.Primary().Item("REASON_CODE").Putvalue(currentSlot.REASON_CODE); pMsgTran.Primary().Item("INS_FLAG").Putvalue(currentSlot.INS_FLAG); pMsgTran.Primary().Item("ENC_FLAG").Putvalue(currentSlot.ENC_FLAG); pMsgTran.Primary().Item("PRERUN_FLAG").Putvalue(currentSlot.PRERUN_FLAG); pMsgTran.Primary().Item("TURN_DIR").Putvalue(currentSlot.TURN_DIR); pMsgTran.Primary().Item("FLIP_STATE").Putvalue(currentSlot.FLIP_STATE); pMsgTran.Primary().Item("WORK_STATE").Putvalue(currentSlot.WORK_STATE); pMsgTran.Primary().Item("MULTI_USE").Putvalue(currentSlot.MULTI_USE); pMsgTran.Primary().Item("PAIR_GLASSID").Putvalue(currentSlot.PAIR_GLASSID); pMsgTran.Primary().Item("PAIR_PPID").Putvalue(currentSlot.PAIR_PPID); pMsgTran.Primary().Item("OPTION_NAME1").Putvalue(currentSlot.OPTION_NAME[0]); pMsgTran.Primary().Item("OPTION_VALUE1").Putvalue(currentSlot.OPTION_VALUE[0]); pMsgTran.Primary().Item("OPTION_NAME2").Putvalue(currentSlot.OPTION_NAME[1]); pMsgTran.Primary().Item("OPTION_VALUE2").Putvalue(currentSlot.OPTION_VALUE[1]); pMsgTran.Primary().Item("OPTION_NAME3").Putvalue(currentSlot.OPTION_NAME[2]); pMsgTran.Primary().Item("OPTION_VALUE3").Putvalue(currentSlot.OPTION_VALUE[2]); pMsgTran.Primary().Item("OPTION_NAME4").Putvalue(currentSlot.OPTION_NAME[3]); pMsgTran.Primary().Item("OPTION_VALUE4").Putvalue(currentSlot.OPTION_VALUE[3]); pMsgTran.Primary().Item("OPTION_NAME5").Putvalue(currentSlot.OPTION_NAME[4]); pMsgTran.Primary().Item("OPTION_VALUE5").Putvalue(currentSlot.OPTION_VALUE[4]); } else { //InfoAct.clsSlot currentSlot = pInfo.LOTID(dstrLOTID).Slot(dintSlotID); InfoAct.clsGLS CurrentGLS = pInfo.GLSID(dstrGLSID); pMsgTran.Primary().Item("H_GLASSID").Putvalue(CurrentGLS.H_PANELID); pMsgTran.Primary().Item("E_GLASSID").Putvalue(CurrentGLS.E_PANELID); pMsgTran.Primary().Item("LOTID").Putvalue(CurrentGLS.LOTID); pMsgTran.Primary().Item("BATCHID").Putvalue(CurrentGLS.BATCHID); pMsgTran.Primary().Item("JOBID").Putvalue(CurrentGLS.JOBID); pMsgTran.Primary().Item("PORTID1").Putvalue(CurrentGLS.PORTID.Trim()); pMsgTran.Primary().Item("SLOTNO").Putvalue(CurrentGLS.SLOTNO); pMsgTran.Primary().Item("PROD_TYPE").Putvalue(CurrentGLS.PRODUCT_TYPE); pMsgTran.Primary().Item("PROD_KIND").Putvalue(CurrentGLS.PRODUCT_KIND); pMsgTran.Primary().Item("PRODUCTID").Putvalue(CurrentGLS.PRODUCTID); pMsgTran.Primary().Item("RUNSPECID").Putvalue(CurrentGLS.RUNSPECID); pMsgTran.Primary().Item("LAYERID").Putvalue(CurrentGLS.LAYERID); pMsgTran.Primary().Item("STEPID").Putvalue(CurrentGLS.STEPID); pMsgTran.Primary().Item("PPID").Putvalue(CurrentGLS.HOSTPPID); pMsgTran.Primary().Item("FLOWID").Putvalue(CurrentGLS.FLOWID); string[] darrSize = CurrentGLS.SIZE.Split(' '); pMsgTran.Primary().Item("SIZE").Putvalue(darrSize); pMsgTran.Primary().Item("THICKNESS").Putvalue(CurrentGLS.THICKNESS); pMsgTran.Primary().Item("STATE").Putvalue(CurrentGLS.GLASS_STATE); pMsgTran.Primary().Item("ORDER").Putvalue(CurrentGLS.GLASS_ORDER); pMsgTran.Primary().Item("COMMENT").Putvalue(CurrentGLS.COMMENT); pMsgTran.Primary().Item("USE_COUNT").Putvalue(CurrentGLS.USE_COUNT); pMsgTran.Primary().Item("JUDGEMENT").Putvalue(CurrentGLS.JUDGEMENT); pMsgTran.Primary().Item("REASON_CODE").Putvalue(CurrentGLS.REASON_CODE); pMsgTran.Primary().Item("INS_FLAG").Putvalue(CurrentGLS.INS_FLAG); pMsgTran.Primary().Item("ENC_FLAG").Putvalue(CurrentGLS.ENC_FLAG); pMsgTran.Primary().Item("PRERUN_FLAG").Putvalue(CurrentGLS.PRERUN_FLAG); pMsgTran.Primary().Item("TURN_DIR").Putvalue(CurrentGLS.TURN_DIR); pMsgTran.Primary().Item("FLIP_STATE").Putvalue(CurrentGLS.FLIP_STATE); pMsgTran.Primary().Item("WORK_STATE").Putvalue(CurrentGLS.WORK_STATE); pMsgTran.Primary().Item("MULTI_USE").Putvalue(CurrentGLS.MULTI_USE); pMsgTran.Primary().Item("PAIR_GLASSID").Putvalue(CurrentGLS.PAIR_GLASSID); pMsgTran.Primary().Item("PAIR_PPID").Putvalue(CurrentGLS.PAIR_PPID); pMsgTran.Primary().Item("OPTION_NAME1").Putvalue(CurrentGLS.OPTION_NAME[0]); pMsgTran.Primary().Item("OPTION_VALUE1").Putvalue(CurrentGLS.OPTION_VALUE[0]); pMsgTran.Primary().Item("OPTION_NAME2").Putvalue(CurrentGLS.OPTION_NAME[1]); pMsgTran.Primary().Item("OPTION_VALUE2").Putvalue(CurrentGLS.OPTION_VALUE[1]); pMsgTran.Primary().Item("OPTION_NAME3").Putvalue(CurrentGLS.OPTION_NAME[2]); pMsgTran.Primary().Item("OPTION_VALUE3").Putvalue(CurrentGLS.OPTION_VALUE[2]); pMsgTran.Primary().Item("OPTION_NAME4").Putvalue(CurrentGLS.OPTION_NAME[3]); pMsgTran.Primary().Item("OPTION_VALUE4").Putvalue(CurrentGLS.OPTION_VALUE[3]); pMsgTran.Primary().Item("OPTION_NAME5").Putvalue(CurrentGLS.OPTION_NAME[4]); pMsgTran.Primary().Item("OPTION_VALUE5").Putvalue(CurrentGLS.OPTION_VALUE[4]); } return(pMsgTran); } catch (Exception error) { funSetLog(InfoAct.clsInfo.LogType.CIM, error.ToString()); return(null); } }
/// <summary> /// 설비에서 CIM으로 발생하는 Event에 대한 처리 /// </summary> /// <param name="parameters">Parameter Array</param> /// <remarks> /// parameters[0] : strCompBit /// parameters[1] : dstrACTVal /// parameters[2] : dintActFrom /// parameters[3] : dstrACTFromSub /// parameters[4] : intBitVal /// parameters[5] : Special Parameter /// </remarks> public void funProcessEQPEvent(string[] parameters) { string strCompBit = parameters[0]; string dstrWordAddress = ""; int dintSlotID = 0; StringBuilder dstrLog = new StringBuilder(); string[] dstrValue = null; string dstrGLSID = ""; //int dintTemp = 0; //string dstrModuleID = ""; //string dstrStepID = ""; //string dstrHOSTPPID = ""; string[] dstrDataValue = new string[4]; //MCC Log Data string dstrJudge = ""; bool dbolProcChanged = false; string strMCCData = ""; try { int intUnitID = Convert.ToInt32(parameters[2]); int intSubUnitID = Convert.ToInt32(parameters[3]); int intModuleNo = Convert.ToInt32(parameters[1]); switch (intModuleNo) { case 7: //FT01 dstrWordAddress = "W22D0"; break; case 9: //AL01 dstrWordAddress = "W2310"; break; case 10: //LM01 dstrWordAddress = "W2330"; break; case 11: //DM01 dstrWordAddress = "W2350"; break; case 12: //IS01 dstrWordAddress = "W2370"; break; case 8: //FT02 dstrWordAddress = "W22F0"; break; case 13: case 14: dstrWordAddress = "W21E0"; break; case 15: dstrWordAddress = "W24F0"; break; } if (intModuleNo == 13 || intModuleNo == 14) { m_pEqpAct.subWordReadSave(dstrWordAddress, 8, EnuEQP.PLCRWType.ASCII_Data); m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.ASCII_Data); m_pEqpAct.subWordReadSave("", 8, EnuEQP.PLCRWType.ASCII_Data); m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.Int_Data); //150122 고석현 } else { m_pEqpAct.subWordReadSave(dstrWordAddress, 8, EnuEQP.PLCRWType.ASCII_Data); //m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.ASCII_Data); m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.Int_Data);//150429 고석현 수정 SlotNo/FilmNo 숫자로 쓰여짐. } dstrValue = m_pEqpAct.funWordReadAction(true); m_pEqpAct.subSetConfirmBit(strCompBit); if ((intModuleNo != 13 && intModuleNo != 14 && intModuleNo != 15) && dstrValue[0].Length > 13) { dstrValue[0] = dstrValue[0].Substring(0, 13); } dstrWordAddress = "W1680"; string dstrFilmID = m_pEqpAct.funWordRead(dstrWordAddress, 50, EnuEQP.PLCRWType.ASCII_Data);//1605023 keun strLotID -> strFilmID로 수정. dstrGLSID = dstrValue[0].Trim(); dintSlotID = Convert.ToInt32(dstrValue[1].Trim()); if (intModuleNo == 13 || intModuleNo == 14 || intModuleNo == 15) { if (pInfo.GLSID(dstrGLSID) == null) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, "GlassID null(subACTDepature) -> GlassID: " + dstrFilmID.Trim() + ", SlotID:" + dintSlotID.ToString() + ", UnitID: " + intUnitID.ToString()); //1605023 keun strLotID -> strFilmID로 수정. } } //장비에 GLS Out시 읽은 Data를 로그를 남긴다. //dstrLog.Append("FilmID:" + dstrGLSID + ","); //dstrLog.Append("SlotID:" + dintSlotID + ","); //dstrLog.Append("Film Departure-> UnitID:" + intUnitID.ToString() + ","); //dstrLog.Append(intUnitID.ToString()); //pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, dstrLog.ToString()); //dstrGLSID = pInfo.LOTID(dstrLOTID).Slot(dintSlotID).H_PANELID; // 20130220 이상창.. 여기가 위치가맞나..? // 상태 변경 후에 보고하도록 변경해야하나..? #region "Process Step - 생략" //string dstrModuleID = pInfo.Unit(intUnitID).SubUnit(0).ModuleID; //InfoAct.clsSlot currentSlot = pInfo.LOTID(dstrLOTID).Slot(dintSlotID); //foreach (InfoAct.clsProcessStep tmpProcStep in this.pInfo.Unit(0).SubUnit(0).ProcessStepValues()) //{ // if (dstrModuleID.Equals(tmpProcStep.StartModuleID) || dstrModuleID.Equals(tmpProcStep.EndModuleID)) // { // if (tmpProcStep.ProcessEvent.ToUpper().Equals("END")) // { // pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 27, 0, currentSlot.LOTID, currentSlot.SlotID); // } // } // if (!dbolProcChanged && dstrModuleID.Equals(tmpProcStep.EndModuleID)) // { // if (pInfo.Unit(0).SubUnit(0).CurrGLS(dstrGLSID) != null) // { // currentSlot.StepNo_OLD = currentSlot.StepNo; // currentSlot.StepNo = tmpProcStep.StepNO; // } // pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedProcessStatusEvent, 23, 0, currentSlot.LOTID, currentSlot.SlotID); // dbolProcChanged = true; // } //} #endregion //현재 장비에서 GLS가 나갔음을 저장(S1F6(SFCD=3) 보고시 사용) pInfo.Unit(intUnitID).SubUnit(0).RemoveCurrGLS(dstrGLSID); //unit별로 현재 Glass ID 초기화 pInfo.Unit(intUnitID).SubUnit(0).HGLSID = ""; pInfo.Unit(intUnitID).SubUnit(0).FilmCount = 0; pInfo.Unit(intUnitID).SubUnit(0).FilmExist = false; pInfo.Unit(intUnitID).SubUnit(0).FilmID = ""; // 마지막 유닛이다.. if (intModuleNo == 13 || intModuleNo == 14) { pInfo.All.ST01GLSID = dstrGLSID; //ProcessData 확인 if (pInfo.RPC(dstrGLSID) != null) { this.pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S16F133RPCEnd, dstrGLSID); if (pInfo.APC(dstrGLSID) != null) { pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.ProcessDataDel, InfoAct.clsInfo.ProcessDataType.APC, "2", "2!" + dstrGLSID, false); this.pInfo.All.APCDBUpdateCheck = true; } } else if (pInfo.APC(dstrGLSID) != null) { this.pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S16F113APCEnd, dstrGLSID); } InfoAct.clsGLS CurrentGLS1 = pInfo.GLSID(dstrGLSID); if (!string.IsNullOrEmpty(dstrValue[2])) { if (pInfo.LOTID(dstrValue[2]) != null) { if (pInfo.LOTID(dstrValue[2]).Slot(Convert.ToInt32(dstrValue[3])) != null) { CurrentGLS1.FilmID = pInfo.LOTID(dstrValue[2]).Slot(Convert.ToInt32(dstrValue[3])).GlassID; } } } if (!string.IsNullOrEmpty(dstrValue[3])) { CurrentGLS1.USE_COUNT = dstrValue[3].PadLeft(3, '0'); //150122 고석현 } string dstrMCCWordAddress = "W1D34"; dstrMCCWordAddress = CommonAct.FunTypeConversion.funAddressAdd(dstrMCCWordAddress, 64 * (intModuleNo - 12)); string strGlassData = ""; strGlassData += m_pEqpAct.funWordWriteString(1, "0", EnuEQP.PLCRWType.Int_Data); m_pEqpAct.funWordWrite(dstrMCCWordAddress, strGlassData, EnuEQP.PLCRWType.Hex_Data); dstrLog.Clear(); dstrLog.Append(dstrGLSID + ","); dstrLog.Append(dintSlotID + ","); string strTemp = ""; switch (intModuleNo) { case 13: if (string.IsNullOrEmpty(dstrValue[2]) == false) { strTemp = dstrValue[2]; } dstrLog.Append(string.Format("ST01 Glass OUT / {0} / {1} / {2} ", CurrentGLS1.FilmID, CurrentGLS1.USE_COUNT, strTemp)); break; case 14: if (string.IsNullOrEmpty(dstrValue[2]) == false) { strTemp = dstrValue[2]; } dstrLog.Append(string.Format("ST02 Glass OUT / {0} / {1} / {2} ", CurrentGLS1.FilmID, CurrentGLS1.USE_COUNT, strTemp)); break; case 15: dstrLog.Append("GL01 Glass OUT"); break; } pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, dstrLog.ToString()); //Glass Process End //pInfo.LOTID(dstrLOTID).Slot(dintSlotID).EndTime = DateTime.Now.ToString("yyyyMMddHHmmss"); //pInfo.LOTID(dstrLOTID).OutCount += 1; //pInfo.GLSID(dstrGLSID).EndTime = DateTime.Now.ToString("yyyyMMddHHmmss"); //System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch(); //sw.Start(); subGLSAPDRead(dstrGLSID, dintSlotID); //sw.Stop(); //pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, "GLSAPD READ Elapsed : " + sw.ElapsedMilliseconds + " ms"); // LOT END //if (pInfo.LOTID(dstrLOTID).Slot(dintSlotID).JOBEnd) //{ // pInfo.LOTID(dstrLOTID).EndTime = DateTime.Now.ToString("yyyyMMddHHmmss"); // subLOTAPDRead(dstrLOTID, dintSlotID); //} if (pInfo.Unit(0).SubUnit(0).CurrGLS(dstrGLSID) != null) { pInfo.Unit(0).SubUnit(0).RemoveCurrGLS(dstrGLSID); pInfo.Unit(0).SubUnit(0).GLSExist = false; } if (pInfo.Unit(intUnitID).SubUnit(0).CurrGLS(dstrGLSID) != null) { pInfo.Unit(intUnitID).SubUnit(0).RemoveCurrGLS(dstrGLSID); pInfo.Unit(intUnitID).SubUnit(0).GLSExist = false; } if (pInfo.Unit(intUnitID).SubUnit(intSubUnitID).CurrGLS(dstrGLSID) != null) { pInfo.Unit(intUnitID).SubUnit(intSubUnitID).RemoveCurrGLS(dstrGLSID); pInfo.Unit(intUnitID).SubUnit(intSubUnitID).GLSExist = false; } if (intUnitID == 1 && intSubUnitID == 2) { //this.pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.FilmJobCommand, 1004, 2); //Lot Start 지시 } //CEID 1025 추가 - 150122 고석현 pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11MaterialProcessStatusEvent, 1025, dstrGLSID, intUnitID, intSubUnitID); //Layer2 보고(CEID=16, PANEL PROVESS START for MUDULE) pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 27, intUnitID, intSubUnitID, dstrGLSID, dintSlotID); InfoAct.clsGLS CurrentGLS = pInfo.GLSID(dstrGLSID); pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 17, intUnitID, intSubUnitID, dstrGLSID, dintSlotID); pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 17, intUnitID, 0, dstrGLSID, dintSlotID); //[2015/04/23]MCC Event Log(Add by HS) strMCCData = "EVENT;"; strMCCData += "CEID_17" + ","; strMCCData += pInfo.Unit(intUnitID).SubUnit(intSubUnitID).ModuleID + ","; strMCCData += CurrentGLS.STEPID + ","; strMCCData += CurrentGLS.H_PANELID + ","; strMCCData += CurrentGLS.LOTID + ","; strMCCData += pInfo.All.CurrentHOSTPPID + "=" + pInfo.All.CurrentEQPPPID + ";"; pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.MCCDataSend, strMCCData); } else if (intModuleNo == 15) { dstrLog.Clear(); dstrLog.Append(dstrGLSID + ","); dstrLog.Append(dintSlotID + ","); switch (intModuleNo) { case 15: dstrLog.Append("GL01 Glass OUT"); break; } pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, dstrLog.ToString()); if (pInfo.Unit(intUnitID).SubUnit(intSubUnitID).CurrGLS(dstrGLSID) != null) { pInfo.Unit(intUnitID).SubUnit(intSubUnitID).RemoveCurrGLS(dstrGLSID); pInfo.Unit(intUnitID).SubUnit(intSubUnitID).GLSExist = false; } pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 17, intUnitID, intSubUnitID, dstrGLSID, dintSlotID); } else { InfoAct.clsSlot CurrentSlot = pInfo.LOTID(dstrGLSID).Slot(dintSlotID); string strGlassID = ""; if (intModuleNo == 12) { try { string strFilmID = pInfo.Unit(3).SubUnit(6).FilmID; int dintFilmNo = pInfo.Unit(3).SubUnit(6).FilmCount; int dintJudge = Convert.ToInt32(m_pEqpAct.funWordRead("W2012", 1, EnuEQP.PLCRWType.Int_Data)); if (m_pEqpAct.funBitRead("B160E", 1) == "1") { strGlassID = pInfo.Unit(3).SubUnit(7).HGLSID; } else { strGlassID = pInfo.Unit(3).SubUnit(8).HGLSID; } if (string.IsNullOrEmpty(strGlassID)) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, "Judge GlssID Null, B160E Read Value :" + m_pEqpAct.funBitRead("B160E", 2)); } else { pInfo.GLSID(strGlassID).JUDGEMENT = (dintJudge == 1) ? "OK" : "NG"; ////pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 15, intUnitID, 0, strGlassID, dintSlotID); ////pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 15, intUnitID, intSubUnitID, strGlassID, dintSlotID); //pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11MaterialProcEvent, 1015, intModuleNo, dstrGLSID, dintSlotID, intUnitID, intSubUnitID); } if (pInfo.LOTID(strFilmID) != null && pInfo.LOTID(strFilmID).Slot(dintFilmNo) != null) { pInfo.LOTID(strFilmID).Slot(dintFilmNo).JUDGEMENT = (dintJudge == 1) ? "OK" : "NG"; } //[2015/06/30] Juge 추가(Add by HS) if (dintJudge == 1)//OK { pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11MaterialProcEvent, 1015, intModuleNo, dstrGLSID, dintSlotID, intUnitID, intSubUnitID, "OK"); } else { pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11MaterialProcEvent, 1015, intModuleNo, dstrGLSID, dintSlotID, intUnitID, intSubUnitID, "NG"); } //[2015/05/15]MCC Event Log(Add by HS) strMCCData = "EVENT;"; strMCCData += "CEID_15" + ","; strMCCData += pInfo.Unit(intUnitID).SubUnit(intSubUnitID).ModuleID + ","; strMCCData += CurrentSlot.STEPID + ","; strMCCData += CurrentSlot.H_PANELID + ","; strMCCData += CurrentSlot.LOTID + ","; strMCCData += pInfo.All.CurrentHOSTPPID + "=" + pInfo.All.CurrentEQPPPID + ";"; pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.MCCDataSend, strMCCData); } catch (Exception ex1) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex1.ToString()); } } if (intModuleNo == 11) { pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedJobProcess, 1007, 6, 2, 2, dstrGLSID, dintSlotID); } pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11MaterialProcEvent, 1017, intModuleNo, dstrGLSID, dintSlotID, intUnitID, intSubUnitID); //[2015/05/15]MCC Event Log(Add by HS) strMCCData = "EVENT;"; strMCCData += "CEID_1017" + ","; strMCCData += pInfo.Unit(intUnitID).SubUnit(intSubUnitID).ModuleID + ","; strMCCData += CurrentSlot.STEPID + ","; strMCCData += CurrentSlot.H_PANELID + ","; strMCCData += CurrentSlot.LOTID + ","; strMCCData += pInfo.All.CurrentHOSTPPID + "=" + pInfo.All.CurrentEQPPPID + ";"; pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.MCCDataSend, strMCCData); if (intModuleNo == 10) { pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11MaterialProcEvent, 1017, intModuleNo, dstrGLSID, dintSlotID, intUnitID, 0); } } } catch (Exception ex) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString()); } }
/// <summary> /// 설비에서 CIM으로 발생하는 Event에 대한 처리 /// </summary> /// <param name="parameters">Parameter Array</param> /// <remarks> /// parameters[0] : strCompBit /// parameters[1] : dstrACTVal /// parameters[2] : dintActFrom /// parameters[3] : dstrACTFromSub /// parameters[4] : intBitVal /// parameters[5] : Special Parameter /// </remarks> public void funProcessEQPEvent(string[] parameters) { string strCompBit = parameters[0]; int intUnitID = Convert.ToInt32(parameters[2]); int intSubUnitID = Convert.ToInt32(parameters[3]); int intModuleNo = Convert.ToInt32(parameters[1]); StringBuilder dstrLog = new StringBuilder(); string[] dstrValue = null; string dstrHGLSID = ""; string dstrLOTID = ""; int dintSlotID = 0; string dstrGlassSize1 = ""; string dstrGlassSize2 = ""; InfoAct.clsSlot dslot = new InfoAct.clsSlot(0); string[] dstrDataValue = new string[4]; //MCC Log Data int dintIndex = 0; int dintPortID = 0; //LD/UD 작업 Port int dintJobStart = 0; int dintJobEnd = 0; bool dbolXPCStart = false; bool dbolProcChanged = false; InfoAct.clsGLS CurrentGLS; string strMCCData = ""; //[2015/05/18](Add by HS) string dstrWordAddress = ""; int nIndex = 0; try { #region Unit1 if (intModuleNo == 13 || intModuleNo == 14 || intModuleNo == 15) //ST01 { try { pInfo.All.RPCPPID = ""; if (intModuleNo != 15) { m_pEqpAct.subWordReadSave("W2040", 8, EnuEQP.PLCRWType.ASCII_Data); //H-Glass(=panel)-ID } else { m_pEqpAct.subWordReadSave("W2380", 8, EnuEQP.PLCRWType.ASCII_Data); //H-Glass(=panel)-ID } m_pEqpAct.subWordReadSave("", 8, EnuEQP.PLCRWType.ASCII_Data); //E-Glass(=panel)-ID m_pEqpAct.subWordReadSave("", 8, EnuEQP.PLCRWType.ASCII_Data); //Lot-ID m_pEqpAct.subWordReadSave("", 8, EnuEQP.PLCRWType.ASCII_Data); //Batch-ID m_pEqpAct.subWordReadSave("", 8, EnuEQP.PLCRWType.ASCII_Data); //Job-ID m_pEqpAct.subWordReadSave("", 2, EnuEQP.PLCRWType.ASCII_Data); //Port-ID m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.ASCII_Data); //Slot-NO m_pEqpAct.subWordReadSave("", 2, EnuEQP.PLCRWType.ASCII_Data); //Prod-Type m_pEqpAct.subWordReadSave("", 2, EnuEQP.PLCRWType.ASCII_Data); //Prod-Kind m_pEqpAct.subWordReadSave("", 8, EnuEQP.PLCRWType.ASCII_Data); //ProductID m_pEqpAct.subWordReadSave("", 8, EnuEQP.PLCRWType.ASCII_Data); //Runspec-ID m_pEqpAct.subWordReadSave("", 4, EnuEQP.PLCRWType.ASCII_Data); //Layer-ID m_pEqpAct.subWordReadSave("", 4, EnuEQP.PLCRWType.ASCII_Data); //Step-ID m_pEqpAct.subWordReadSave("", 10, EnuEQP.PLCRWType.ASCII_Data); //HOST PPID m_pEqpAct.subWordReadSave("", 10, EnuEQP.PLCRWType.ASCII_Data); //Flow-ID m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.Int_Data); //Glass(=panel)-Size(하위) ---->U2 2임.(하위 + Space(1) + 상위) m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.Int_Data); //Glass(=panel)-Size(상위) ---->U2 2임.(하위 + Space(1) + 상위) m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.Int_Data); //Glass-thickness(thickness) m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.Int_Data); //Glass-State(빈값) m_pEqpAct.subWordReadSave("", 2, EnuEQP.PLCRWType.ASCII_Data); //Glass-Order m_pEqpAct.subWordReadSave("", 8, EnuEQP.PLCRWType.ASCII_Data); //Comment m_pEqpAct.subWordReadSave("", 2, EnuEQP.PLCRWType.ASCII_Data); //Use-Count m_pEqpAct.subWordReadSave("", 2, EnuEQP.PLCRWType.ASCII_Data); //Judgement m_pEqpAct.subWordReadSave("", 2, EnuEQP.PLCRWType.ASCII_Data); //Reason-Code m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.ASCII_Data); //Inspection-Flag m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.ASCII_Data); //Enc-Flag m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.ASCII_Data); //Prerun-Flag m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.ASCII_Data); //Turn-Dir m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.ASCII_Data); //Flip-State m_pEqpAct.subWordReadSave("", 2, EnuEQP.PLCRWType.ASCII_Data); //Work-State m_pEqpAct.subWordReadSave("", 8, EnuEQP.PLCRWType.ASCII_Data); //Multi-Use m_pEqpAct.subWordReadSave("", 8, EnuEQP.PLCRWType.ASCII_Data); //Pair Glass-ID m_pEqpAct.subWordReadSave("", 10, EnuEQP.PLCRWType.ASCII_Data); //Pair PPID m_pEqpAct.subWordReadSave("", 20, EnuEQP.PLCRWType.ASCII_Data); //Option Name1 m_pEqpAct.subWordReadSave("", 20, EnuEQP.PLCRWType.ASCII_Data); //Option Value1 m_pEqpAct.subWordReadSave("", 20, EnuEQP.PLCRWType.ASCII_Data); //Option Name2 m_pEqpAct.subWordReadSave("", 20, EnuEQP.PLCRWType.ASCII_Data); //Option Value2 m_pEqpAct.subWordReadSave("", 20, EnuEQP.PLCRWType.ASCII_Data); //Option Name3 m_pEqpAct.subWordReadSave("", 20, EnuEQP.PLCRWType.ASCII_Data); //Option Value3 m_pEqpAct.subWordReadSave("", 20, EnuEQP.PLCRWType.ASCII_Data); //Option Name4 m_pEqpAct.subWordReadSave("", 20, EnuEQP.PLCRWType.ASCII_Data); //Option Value4 m_pEqpAct.subWordReadSave("", 20, EnuEQP.PLCRWType.ASCII_Data); //Option Name5 m_pEqpAct.subWordReadSave("", 20, EnuEQP.PLCRWType.ASCII_Data); //Option Value5 //m_pEqpAct.subWordReadSave("", 11, EnuEQP.PLCRWType.Hex_Data); //Spare //m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.Int_Data); //상부 / 하부 작업 진행여부 확인 //m_pEqpAct.subWordReadSave("", 156, EnuEQP.PLCRWType.Hex_Data); //Spare //m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.Int_Data); //Job Start //m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.Int_Data); //Job End //장비에서 GLS Data정보를 한꺼번에 읽는다. dstrValue = m_pEqpAct.funWordReadAction(true); //읽은 GLS Data를 Parsing해서 변수에 저장 dslot.H_PANELID = dstrValue[0].Trim(); dslot.E_PANELID = dstrValue[1].Trim(); dslot.LOTID = dstrValue[2].Trim(); dslot.BATCHID = dstrValue[3].Trim(); dslot.JOBID = dstrValue[4].Trim(); dslot.PORTID = dstrValue[5].Trim(); dintPortID = Convert.ToInt32(FunStringH.funMakeLengthStringFirst(dslot.PORTID, 4).Substring(2, 2)); dslot.SlotID = Convert.ToInt32(dstrValue[6]); dslot.SLOTNO = dstrValue[6]; dslot.PRODUCT_TYPE = dstrValue[7].Trim(); dslot.PRODUCT_KIND = dstrValue[8].Trim(); dslot.PRODUCTID = dstrValue[9].Trim(); dslot.RUNSPECID = dstrValue[10].Trim(); dslot.LAYERID = dstrValue[11].Trim(); dslot.STEPID = dstrValue[12].Trim(); dslot.HOSTPPID = dstrValue[13].Trim(); dslot.FLOWID = dstrValue[14].Trim(); dstrGlassSize1 = dstrValue[15].Trim(); dstrGlassSize2 = dstrValue[16].Trim(); dslot.SIZE = dstrGlassSize1 + " " + dstrGlassSize2; dslot.THICKNESS = Convert.ToInt32(dstrValue[17]); //dstrValue[18]은 Reserved임. Glass State dslot.GLASS_ORDER = dstrValue[19].Trim(); dslot.COMMENT = dstrValue[20].Trim(); dslot.USE_COUNT = dstrValue[21].Trim(); dslot.JUDGEMENT = dstrValue[22].Trim(); dslot.REASON_CODE = dstrValue[23].Trim(); dslot.INS_FLAG = dstrValue[24].Trim(); dslot.ENC_FLAG = dstrValue[25].Trim(); dslot.PRERUN_FLAG = dstrValue[26].Trim(); dslot.TURN_DIR = dstrValue[27].Trim(); dslot.FLIP_STATE = dstrValue[28].Trim(); dslot.WORK_STATE = dstrValue[29].Trim(); dslot.MULTI_USE = dstrValue[30].Trim(); dslot.PAIR_GLASSID = dstrValue[31].Trim(); dslot.PAIR_PPID = dstrValue[32].Trim(); for (int dintLoop = 0; dintLoop <= dslot.OPTION_NAME.Length - 1; dintLoop++) { dslot.OPTION_NAME[dintLoop] = dstrValue[dintIndex + 33].Trim(); dslot.OPTION_VALUE[dintLoop] = dstrValue[dintIndex + 34].Trim(); //dslot.OPTION_NAME[dintLoop] = "0"; //dslot.OPTION_VALUE[dintLoop] = "0"; dintIndex = dintIndex + 2; } dintIndex = 0; //상부, 하부 확인 - ksh //A3 사용안함 //if (dstrValue[44] == "0") //{ // pInfo.All.GlassUpperJobFlag = true; //} //else //{ // pInfo.All.GlassUpperJobFlag = false; //} //dintJobStart = Convert.ToInt32(dstrValue[46]); //dintJobEnd = Convert.ToInt32(dstrValue[47]); //if (dintJobStart == 1) dslot.JOBStart = true; //else dslot.JOBStart = false; //if (dintJobEnd == 1) dslot.JOBEnd = true; //else dslot.JOBEnd = false; dstrLOTID = dslot.LOTID; dintSlotID = dslot.SlotID; dstrHGLSID = dslot.H_PANELID; if (intModuleNo == 13) { m_pEqpAct.funWordWrite("W1FC0", dslot.H_PANELID.PadRight(16, ' '), EnuEQP.PLCRWType.ASCII_Data); } else if (intModuleNo == 14) { m_pEqpAct.funWordWrite("W1FD0", dslot.H_PANELID.PadRight(16, ' '), EnuEQP.PLCRWType.ASCII_Data); } else { m_pEqpAct.funWordWrite("W1FE0", dslot.H_PANELID.PadRight(16, ' '), EnuEQP.PLCRWType.ASCII_Data); } } catch (Exception ex) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString()); } finally { //PLC Req에 대한 CIM의 Confirm Bit를 준다. m_pEqpAct.subSetConfirmBit(strCompBit); } //장비에 GLS In시 읽은 Data를 로그를 남긴다. dstrLog.Append("LOTID:" + dslot.LOTID + ","); dstrLog.Append("SlotID:" + dslot.SlotID + ","); dstrLog.Append("GLS Arrive -> UnitID:" + intUnitID.ToString() + ","); dstrLog.Append(intUnitID.ToString() + ","); dstrLog.Append("HGLSID:" + dslot.H_PANELID + ","); dstrLog.Append("EGLSID:" + dslot.E_PANELID + ","); dstrLog.Append("BatchID:" + dslot.BATCHID + ","); dstrLog.Append("JobID:" + dslot.JOBID + ","); dstrLog.Append("PortID:" + dslot.PORTID + ","); dstrLog.Append("ProdType:" + dslot.PRODUCT_TYPE + ","); dstrLog.Append("ProdKind:" + dslot.PRODUCT_KIND + ","); dstrLog.Append("ProdID:" + dslot.PRODUCTID + ","); dstrLog.Append("RunspecID:" + dslot.RUNSPECID + ","); dstrLog.Append("LayerID:" + dslot.LAYERID + ","); dstrLog.Append("StepID:" + dslot.STEPID + ","); dstrLog.Append("HOSTPPID:" + dslot.HOSTPPID + ","); dstrLog.Append("FlowID:" + dslot.FLOWID + ","); dstrLog.Append("GlassSize1:" + dstrGlassSize1 + ","); dstrLog.Append("GlassSize2:" + dstrGlassSize2 + ","); dstrLog.Append("Glassthickness:" + dslot.THICKNESS.ToString() + ","); dstrLog.Append("GlassOrder:" + dslot.GLASS_ORDER + ","); dstrLog.Append("Comment:" + dslot.COMMENT + ","); dstrLog.Append("UseCount:" + dslot.USE_COUNT + ","); dstrLog.Append("Judgement:" + dslot.JUDGEMENT + ","); dstrLog.Append("ReasonCode:" + dslot.REASON_CODE + ","); dstrLog.Append("InspectionFlag:" + dslot.INS_FLAG + ","); dstrLog.Append("EncFlag:" + dslot.ENC_FLAG + ","); dstrLog.Append("PrerunFlag:" + dslot.PRERUN_FLAG + ","); dstrLog.Append("TurnDir:" + dslot.TURN_DIR + ","); dstrLog.Append("FlipState:" + dslot.FLIP_STATE + ","); dstrLog.Append("WorkState:" + dslot.WORK_STATE + ","); dstrLog.Append("MultiUse:" + dslot.MULTI_USE + ","); dstrLog.Append("PairGlassID:" + dslot.PAIR_GLASSID + ","); dstrLog.Append("PairPPID:" + dslot.PAIR_PPID + ","); for (int dintLoop = 0; dintLoop <= dslot.OPTION_NAME.Length - 1; dintLoop++) { dstrLog.Append("OptionName" + Convert.ToString(dintLoop + 1) + ":" + dslot.OPTION_NAME[dintLoop] + ","); dstrLog.Append("OptionValue" + Convert.ToString(dintLoop + 1) + ":" + dslot.OPTION_VALUE[dintLoop] + ","); } dstrLog.Append("JobStart:" + dintJobStart.ToString() + ","); dstrLog.Append("JobEnd:" + dintJobEnd.ToString()); //pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, dstrLog.ToString()); dstrLog.Clear(); dstrLog.Append(dslot.GlassID + ","); dstrLog.Append(dslot.SLOTNO + ","); switch (intModuleNo) { case 13: dstrLog.Append("ST01 Glass IN"); break; case 14: dstrLog.Append("ST02 Glass IN"); break; case 15: dstrLog.Append("GL01 Glass IN"); break; } pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, dstrLog.ToString()); //LOT의 첫번째 GLS이면 LOT정보를 생성한다. //if (pInfo.LOTID(dslot.LOTID) == null) subCreateLOTInfo(dslot.LOTID, dintJobStart); if (pInfo.GLSID(dslot.H_PANELID) == null) { pInfo.AddGLS(dslot.H_PANELID); } pInfo.GLSID(dslot.H_PANELID).CopyFrom(dslot); CurrentGLS = pInfo.GLSID(dslot.H_PANELID); ////GLS Data를 구조체에 저장 //InfoAct.clsSlot currentSlot = pInfo.LOTID(dstrLOTID).Slot(dintSlotID); //currentSlot.CopyFrom(dslot); CurrentGLS.StartTime = DateTime.Now.ToString("yyyyMMddHHmmss"); CurrentGLS.GLASS_STATE = 3; //Processing //pInfo.LOTID(dstrLOTID).InCount += 1; //LOT의 GLS개수 증가 if (pInfo.Unit(0).SubUnit(0).AddCurrGLS(CurrentGLS.H_PANELID) == true) { InfoAct.clsGLS curGLS = pInfo.Unit(0).SubUnit(0).CurrGLS(CurrentGLS.H_PANELID); curGLS.H_PANELID = CurrentGLS.H_PANELID; curGLS.SlotID = CurrentGLS.SlotID; pInfo.Unit(0).SubUnit(0).GLSExist = true; } if (pInfo.Unit(intUnitID).SubUnit(0).AddCurrGLS(CurrentGLS.H_PANELID) == true) { InfoAct.clsGLS curGLS = pInfo.Unit(intUnitID).SubUnit(0).CurrGLS(CurrentGLS.H_PANELID); curGLS.H_PANELID = CurrentGLS.H_PANELID; curGLS.SlotID = CurrentGLS.SlotID; pInfo.Unit(intUnitID).SubUnit(0).GLSExist = true; } if (pInfo.Unit(intUnitID).SubUnit(intSubUnitID).AddCurrGLS(CurrentGLS.H_PANELID) == true) { InfoAct.clsGLS curGLS = pInfo.Unit(intUnitID).SubUnit(intSubUnitID).CurrGLS(CurrentGLS.H_PANELID); curGLS.H_PANELID = CurrentGLS.H_PANELID; curGLS.SlotID = CurrentGLS.SlotID; pInfo.Unit(intUnitID).SubUnit(intSubUnitID).GLSExist = true; } string dstrOLDHOSTPPID = ""; string dstrNEWHOSTPPID = ""; if (pInfo.EQP("Main").DummyPLC == false) { if (pInfo.Unit(0).SubUnit(0).HOSTPPID(CurrentGLS.HOSTPPID) == null) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, "Arrive HostPPID Null!! HostPPID : " + CurrentGLS.HOSTPPID); } dstrOLDHOSTPPID = pInfo.All.CurrentHOSTPPID; //이전 PPID 백업 dstrNEWHOSTPPID = CurrentGLS.HOSTPPID; pInfo.All.CurrentHOSTPPID = dstrNEWHOSTPPID; //변경된 HOSTPPID를 입력 pInfo.All.CurrentEQPPPID = pInfo.Unit(0).SubUnit(0).HOSTPPID(dstrNEWHOSTPPID).EQPPPID; } if (pInfo.All.EQPSpecifiedCtrlBYWHO == "1")// || pInfo.All.EQPSpecifiedCtrlBYWHO == "2") { //HOST나 OP에서 발생한것임 } else { pInfo.All.EQPSpecifiedCtrlBYWHO = "2"; //BY EQP } //wordwrite시점은 MCC로 정보를 보내기전으로... //MCC로 메세지 전송후 보내면 MCC에서 Data 읽을때 이전Data를 읽을 수 있음. string dstrMCCWordAddress = "W1D00"; dstrMCCWordAddress = CommonAct.FunTypeConversion.funAddressAdd(dstrMCCWordAddress, 64 * (intModuleNo - 13)); string strGlassData = ""; strGlassData += m_pEqpAct.funWordWriteString(4, CurrentGLS.STEPID.PadRight(4, ' '), EnuEQP.PLCRWType.ASCII_Data); strGlassData += m_pEqpAct.funWordWriteString(28, CurrentGLS.H_PANELID.PadRight(28, ' '), EnuEQP.PLCRWType.ASCII_Data); strGlassData += m_pEqpAct.funWordWriteString(8, CurrentGLS.LOTID.PadRight(8, ' '), EnuEQP.PLCRWType.ASCII_Data); strGlassData += m_pEqpAct.funWordWriteString(10, CurrentGLS.HOSTPPID.PadRight(10, ' '), EnuEQP.PLCRWType.ASCII_Data); strGlassData += m_pEqpAct.funWordWriteString(1, CurrentGLS.SLOTNO, EnuEQP.PLCRWType.Int_Data); strGlassData += m_pEqpAct.funWordWriteString(1, "0", EnuEQP.PLCRWType.Int_Data); strGlassData += m_pEqpAct.funWordWriteString(1, "1", EnuEQP.PLCRWType.Int_Data); m_pEqpAct.funWordWrite(dstrMCCWordAddress, strGlassData, EnuEQP.PLCRWType.Hex_Data); DateTime dt = DateTime.Now; strMCCData = ""; if (dstrOLDHOSTPPID != dstrNEWHOSTPPID) { //CEID=131보고 pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11EquipmentSpecifiedControlEvent, 131, dstrOLDHOSTPPID, dstrNEWHOSTPPID); //[2015/04/23]MCC Event Log(Add by HS) strMCCData = "EVENT;"; strMCCData += "CEID_131" + ","; strMCCData += pInfo.Unit(intUnitID).SubUnit(intSubUnitID).ModuleID + ","; strMCCData += CurrentGLS.STEPID + ","; strMCCData += CurrentGLS.H_PANELID + ","; strMCCData += CurrentGLS.LOTID + ","; strMCCData += pInfo.All.CurrentHOSTPPID + "=" + pInfo.All.CurrentEQPPPID + ","; strMCCData += dstrOLDHOSTPPID + ","; strMCCData += dstrNEWHOSTPPID + ";"; pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.MCCDataSend, strMCCData); } if (pInfo.EQP("Main").EQPID.Contains("A3GLM")) //하부 라미시나리오 { if (intModuleNo == 15) { pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 16, intUnitID, 0, dslot.H_PANELID, dslot.SlotID); pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 16, intUnitID, intSubUnitID, dslot.H_PANELID, dslot.SlotID); //pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 26, intUnitID, intSubUnitID, dslot.H_PANELID, dslot.SlotID); } else { pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 16, intUnitID, intSubUnitID, dslot.H_PANELID, dslot.SlotID); pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 26, intUnitID, intSubUnitID, dslot.H_PANELID, dslot.SlotID); //[2015/04/23]MCC Event Log(Add by HS) strMCCData = "EVENT;"; strMCCData += "CEID_16" + ","; strMCCData += pInfo.Unit(intUnitID).SubUnit(intSubUnitID).ModuleID + ","; strMCCData += CurrentGLS.STEPID + ","; strMCCData += CurrentGLS.H_PANELID + ","; strMCCData += CurrentGLS.LOTID + ","; strMCCData += pInfo.All.CurrentHOSTPPID + "=" + pInfo.All.CurrentEQPPPID + ";"; pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.MCCDataSend, strMCCData); } } else//상부 라미 시나리오 { //Layer1 보고(CEID=16, PANEL PROCESS START for MODULE) pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 16, intUnitID, 0, dslot.H_PANELID, dslot.SlotID); pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 16, intUnitID, intSubUnitID, dslot.H_PANELID, dslot.SlotID); pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 26, intUnitID, intSubUnitID, dslot.H_PANELID, dslot.SlotID); //[2015/04/23]MCC Event Log(Add by HS) strMCCData += "EVENT;"; strMCCData += "CEID_16" + ","; strMCCData += pInfo.Unit(intUnitID).SubUnit(intSubUnitID).ModuleID + ","; strMCCData += CurrentGLS.STEPID + ","; strMCCData += CurrentGLS.H_PANELID + ","; strMCCData += CurrentGLS.LOTID + ","; strMCCData += pInfo.All.CurrentHOSTPPID + "=" + pInfo.All.CurrentEQPPPID + ";"; pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.MCCDataSend, strMCCData); } // 20130220 이상창.. 여기가 위치가맞나..? // 상태 변경 후에 보고하도록 변경해야하나..? #region "Process Step" string dstrModuleID = pInfo.Unit(intUnitID).SubUnit(0).ModuleID; //foreach (InfoAct.clsProcessStep tmpProcStep in this.pInfo.Unit(0).SubUnit(0).ProcessStepValues()) //{ // if (dstrModuleID.Equals(tmpProcStep.StartModuleID) || dstrModuleID.Equals(tmpProcStep.EndModuleID)) // { // if (tmpProcStep.ProcessEvent.ToUpper().Equals("START")) // { // pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 26, 0, dslot.LOTID, dslot.SlotID); // } // } // if (!dbolProcChanged && dstrModuleID.Equals(tmpProcStep.StartModuleID)) // { // if (pInfo.Unit(0).SubUnit(0).CurrGLS(currentSlot.H_PANELID) != null) // { // currentSlot.StepNo_OLD = currentSlot.StepNo; // currentSlot.StepNo = tmpProcStep.StepNO; // } // pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedProcessStatusEvent, 23, 0, dslot.LOTID, dslot.SlotID); // //break; // dbolProcChanged = true; // } //} #endregion //2012.11.06 김영식... Normal/APC/RPC/PPC Start 여부 판정하여 CIM Event 처리 // 20121212 lsc if (this.pInfo.Unit(0).SubUnit(0).EOID(this.pInfo.funGetEOIDNameToIndex("RPC")).EOV == 1 && pInfo.RPC(dslot.H_PANELID) != null) { pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S16F131RPCStart, dstrHGLSID); pInfo.All.RPCDBUpdateCheck = true; CurrentGLS.IsRPCRunning = true; dbolXPCStart = true; pInfo.All.RPCPPID = pInfo.RPC(dstrHGLSID).RPC_PPID; if (pInfo.APC(dslot.H_PANELID) != null) { pInfo.APC(dslot.H_PANELID).State = "2"; pInfo.subProcessDataStatusSet(InfoAct.clsInfo.ProcessDataType.APC, dstrHGLSID); } } else if (this.pInfo.Unit(0).SubUnit(0).EOID(this.pInfo.funGetEOIDNameToIndex("APC")).EOV == 1 && pInfo.APC(dslot.H_PANELID) != null) { pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S16F111APCStart, dstrHGLSID); CurrentGLS.IsAPCRunning = true; dbolXPCStart = true; } if (dbolXPCStart == false) { //pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.NormalStart, dstrHGLSID); } //unit별로 현재 Glass ID 저장 pInfo.Unit(intUnitID).SubUnit(0).HGLSID = dslot.H_PANELID; pInfo.Unit(intUnitID).SubUnit(intSubUnitID).HGLSID = dslot.H_PANELID; pInfo.Unit(intUnitID).SubUnit(0).GLSExist = true; } #endregion #region Film구간 else { int dintDEPUnitID = 0; switch (intModuleNo) { case 7: //FT01 dstrWordAddress = "W22C0"; break; case 9: //AL01 dstrWordAddress = "W2300"; break; case 10: //LM01 dstrWordAddress = "W2320"; break; case 11: //DM01 dstrWordAddress = "W2340"; break; case 12: //IS01 dstrWordAddress = "W2360"; break; case 8: //FT02 dstrWordAddress = "W22E0"; break; } if (string.IsNullOrEmpty(dstrWordAddress)) { return; } m_pEqpAct.subWordReadSave(dstrWordAddress, 8, EnuEQP.PLCRWType.ASCII_Data); // LOTID m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.Int_Data); // SlotID string dstrproIDWordAddress = "W16B3"; string strPROID = m_pEqpAct.funWordRead(dstrproIDWordAddress, 8, EnuEQP.PLCRWType.ASCII_Data); //20160407 KEUN dstrWordAddress = "W1680"; string strFilmID = m_pEqpAct.funWordRead(dstrWordAddress, 50, EnuEQP.PLCRWType.ASCII_Data);//1605023 keun strLotID -> strFilmID로 수정. dstrValue = m_pEqpAct.funWordReadAction(true); m_pEqpAct.subSetConfirmBit(strCompBit); if (dstrValue[0].Length > 13) { dstrValue[0] = dstrValue[0].Substring(0, 13); } dstrLOTID = dstrValue[0].Trim(); dintSlotID = Convert.ToInt32(dstrValue[1].Trim()); dstrLog.Append("FilmID:" + strFilmID + ",");//1605023 keun strLotID -> strFilmID로 수정. dstrLog.Append("SlotID:" + dintSlotID + ","); dstrLog.Append("Film Arrive -> UnitID:" + intUnitID.ToString() + ","); dstrLog.Append(intUnitID.ToString()); //this.pInfo.subLog_Set(InfoAct.clsInfo.LogType.GLSInOut, dstrLog.ToString()); if (this.pInfo.LOTID(dstrLOTID) == null) { subCreateLOTInfo(dstrLOTID, 0); } if (pInfo.LOTID(dstrLOTID).Slot(dintSlotID) == null) { pInfo.LOTID(dstrLOTID).AddSlot(dintSlotID); pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, string.Format("Slot No Error!! AddSlot!! LotID : {0}, SlotNo : {1}", dstrLOTID, dintSlotID)); } if (string.IsNullOrEmpty(pInfo.LOTID(dstrLOTID).Slot(dintSlotID).GlassID)) { pInfo.LOTID(dstrLOTID).Slot(dintSlotID).GlassID = strFilmID.Trim(); pInfo.LOTID(dstrLOTID).Slot(dintSlotID).USE_COUNT = dintSlotID.ToString().PadLeft(3, '0'); //pInfo.LOTID(dstrLOTID).Slot(dintSlotID).PRODUCTID = dstrLOTID; pInfo.LOTID(dstrLOTID).Slot(dintSlotID).PRODUCTID = strPROID; //160407 KEUN } //dstrHGLSID = this.pInfo.LOTID(dstrLOTID).Slot(dintSlotID).H_PANELID; pInfo.Unit(intUnitID).SubUnit(0).FilmID = strFilmID; //1605023 keun strLotID -> strFilmID로 수정. pInfo.Unit(intUnitID).SubUnit(0).FilmCount = dintSlotID; pInfo.LOTID(dstrLOTID).Slot(dintSlotID).FilmExistUnitID = intUnitID; pInfo.Unit(intUnitID).SubUnit(0).FilmExist = true; pInfo.Unit(intUnitID).SubUnit(intSubUnitID).FilmID = strFilmID; //1605023 keun strLotID -> strFilmID로 수정. pInfo.Unit(intUnitID).SubUnit(intSubUnitID).FilmCount = dintSlotID; pInfo.LOTID(dstrLOTID).Slot(dintSlotID).FilmExistUnitID = intUnitID; pInfo.Unit(intUnitID).SubUnit(intSubUnitID).FilmExist = true; //wordwrite시점은 MCC로 정보를 보내기전으로... //MCC로 메세지 전송후 보내면 MCC에서 Data 읽을때 이전Data를 읽을 수 있음. string dstrMCCWordAddress = "W1B80"; dstrMCCWordAddress = CommonAct.FunTypeConversion.funAddressAdd(dstrMCCWordAddress, 64 * (intModuleNo - 7)); string strGlassData = ""; strGlassData += m_pEqpAct.funWordWriteString(4, "0000", EnuEQP.PLCRWType.ASCII_Data);//임시 strGlassData += m_pEqpAct.funWordWriteString(28, pInfo.LOTID(dstrLOTID).Slot(dintSlotID).GlassID.PadRight(28, ' '), EnuEQP.PLCRWType.ASCII_Data); strGlassData += m_pEqpAct.funWordWriteString(8, dstrLOTID.PadRight(8, ' '), EnuEQP.PLCRWType.ASCII_Data); strGlassData += m_pEqpAct.funWordWriteString(10, pInfo.All.CurrentHOSTPPID.PadRight(10, ' '), EnuEQP.PLCRWType.ASCII_Data); strGlassData += m_pEqpAct.funWordWriteString(1, dintSlotID.ToString(), EnuEQP.PLCRWType.Int_Data); strGlassData += m_pEqpAct.funWordWriteString(1, "0", EnuEQP.PLCRWType.Int_Data); strGlassData += m_pEqpAct.funWordWriteString(1, "1", EnuEQP.PLCRWType.Int_Data); m_pEqpAct.funWordWrite(dstrMCCWordAddress, strGlassData, EnuEQP.PLCRWType.Hex_Data); if (intModuleNo == 7) { //this.pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.FilmJobCommand, 1006, dintPortID); //Lot Start 지시 pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedJobProcess, 1006, 2, 1, 2, dstrLOTID, dintSlotID); pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11MaterialProcEvent, 1016, intModuleNo, dstrLOTID, dintSlotID, intUnitID, 0); } pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11MaterialProcEvent, 1016, intModuleNo, dstrLOTID, dintSlotID, intUnitID, intSubUnitID); //[2015/05/15]MCC Event Log(Add by HS) InfoAct.clsSlot CurrentSlot = pInfo.LOTID(dstrLOTID).Slot(dintSlotID); strMCCData = "EVENT;"; strMCCData += "CEID_1016" + ","; strMCCData += pInfo.Unit(intUnitID).SubUnit(intSubUnitID).ModuleID + ","; strMCCData += CurrentSlot.STEPID + ","; strMCCData += CurrentSlot.H_PANELID + ","; strMCCData += CurrentSlot.LOTID + ","; strMCCData += pInfo.All.CurrentHOSTPPID + "=" + pInfo.All.CurrentEQPPPID + ";"; pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.MCCDataSend, strMCCData); // 20130220 이상창.. 여기가 위치가맞나..? // 상태 변경 후에 보고하도록 변경해야하나..? #region "Process Step - 생략" //string dstrModuleID = pInfo.Unit(intUnitID).SubUnit(0).ModuleID; //foreach (InfoAct.clsProcessStep tmpProcStep in this.pInfo.Unit(0).SubUnit(0).ProcessStepValues()) //{ // if(dstrModuleID.Equals(tmpProcStep.StartModuleID) || dstrModuleID.Equals(tmpProcStep.EndModuleID)) // { // if (tmpProcStep.ProcessEvent.ToUpper().Equals("START")) // { // pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 26, 0, currentSlot.LOTID, currentSlot.SlotID); // } // } // if (!dbolProcChanged && dstrModuleID.Equals(tmpProcStep.StartModuleID)) // { // if (pInfo.Unit(0).SubUnit(0).CurrGLS(currentSlot.H_PANELID) != null) // { // currentSlot.StepNo_OLD = currentSlot.StepNo; // currentSlot.StepNo = tmpProcStep.StepNO; // } // pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedProcessStatusEvent, 23, 0, currentSlot.LOTID, currentSlot.SlotID); // //break; // dbolProcChanged = true; // } //} #endregion } #endregion } catch (Exception ex) { pInfo.All.RPCPPID = ""; pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString()); } }
/// <summary> /// Primary Message를 Biuld하여 Transaction을 Return한다. /// </summary> /// <param name="strParameters">Parameter 문자열</param> public Transaction funPrimarySend(string strParameters) { string[] arrayEvent; string dstrLotID = ""; int dintPortID = 0; int dintIndex = 0; string dstrSLOTMAP = ""; string dstrGLSID = ""; try { arrayEvent = strParameters.Split(','); pMsgTran = pSecsDrv.MakeTransaction(this.StrPrimaryMsgName); dstrLotID = arrayEvent[1].Trim(); InfoAct.clsLOT CurrentLot = pInfo.LOTID(dstrLotID); pMsgTran.Primary().Item("PTID").Putvalue("P0" + CurrentLot.InPortID); pMsgTran.Primary().Item("LOTID").Putvalue(dstrLotID); pMsgTran.Primary().Item("CSTID").Putvalue(CurrentLot.CSTID); pMsgTran.Primary().Item("LOTJUDGE").Putvalue(CurrentLot.LOTJudge); pMsgTran.Primary().Item("LSORTTYPE").Putvalue(CurrentLot.LSORTTYPE); pMsgTran.Primary().Item("OPERID").Putvalue(CurrentLot.OPERID); pMsgTran.Primary().Item("PRODID").Putvalue(CurrentLot.PRODID); StringBuilder sb; dintPortID = pInfo.LOTID(dstrLotID).InPortID; #region 수정 for (int dintSlotNo = 0; dintSlotNo < pInfo.Port(dintPortID).SlotCount; dintSlotNo++) { if (pInfo.Port(dintPortID).Slot(dintSlotNo + 1).SLOTINFO != "E") { dintIndex++; } } pMsgTran.Primary().Item("QTY").Putvalue(dintIndex); pMsgTran.Primary().Item("L2").Putvalue(25); dintIndex = 0; for (int dintSlotNo = 0; dintSlotNo < pInfo.Port(dintPortID).SlotCount; dintSlotNo++) { InfoAct.clsLOT CurrentLOT = pInfo.LOTID(dstrLotID); dstrGLSID = pInfo.Port(dintPortID).Slot(dintSlotNo + 1).GLSID; if (string.IsNullOrEmpty(dstrGLSID) == false && CurrentLOT.GLSID(dstrGLSID) != null && pInfo.Port(dintPortID).Slot(dintSlotNo + 1).SLOTINFO != "E") { InfoAct.clsGLS CurrentGLS = CurrentLOT.GLSID(dstrGLSID); if (CurrentGLS.ScrapFlag) { pMsgTran.Primary().Item("SLOTNO" + dintIndex).Putvalue((dintSlotNo + 1).ToString()); pMsgTran.Primary().Item("GLSID" + dintIndex).Putvalue(""); pMsgTran.Primary().Item("PPID" + dintIndex).Putvalue(""); pMsgTran.Primary().Item("GLSJUDGE" + dintIndex).Putvalue(""); pMsgTran.Primary().Item("GSORTTYPE" + dintIndex).Putvalue(0); pMsgTran.Primary().Item("SMPLFLAG" + dintIndex).Putvalue(0); pMsgTran.Primary().Item("RWKCNT" + dintIndex).Putvalue(0); pMsgTran.Primary().Item("L4" + dintIndex).Putvalue(0); dstrSLOTMAP += "X"; } else { pMsgTran.Primary().Item("SLOTNO" + dintIndex).Putvalue(CurrentGLS.SlotID); pMsgTran.Primary().Item("GLSID" + dintIndex).Putvalue(CurrentGLS.GLSID); pMsgTran.Primary().Item("PPID" + dintIndex).Putvalue(CurrentGLS.HostPPID); pMsgTran.Primary().Item("GLSJUDGE" + dintIndex).Putvalue(CurrentGLS.GLSJudge); pMsgTran.Primary().Item("GSORTTYPE" + dintIndex).Putvalue(CurrentGLS.GSORTTYPE); pMsgTran.Primary().Item("SMPLFLAG" + dintIndex).Putvalue(CurrentGLS.SMPLFLAG); pMsgTran.Primary().Item("RWKCNT" + dintIndex).Putvalue(CurrentGLS.RWKCNT); pMsgTran.Primary().Item("L4" + dintIndex).Putvalue(0); if (pInfo.Port(dintPortID).Slot(dintSlotNo + 1).SLOTINFO == "P")// || pInfo.Port(dintPortID).Slot(dintSlotNo + 1).SLOTINFO == "F" || pInfo.Port(dintPortID).Slot(dintSlotNo + 1).SLOTINFO == "S") { dstrSLOTMAP += "O"; } else { dstrSLOTMAP += "X"; } } } else { pMsgTran.Primary().Item("SLOTNO" + dintIndex).Putvalue((dintSlotNo + 1).ToString()); pMsgTran.Primary().Item("GLSID" + dintIndex).Putvalue(""); pMsgTran.Primary().Item("PPID" + dintIndex).Putvalue(""); pMsgTran.Primary().Item("GLSJUDGE" + dintIndex).Putvalue(""); pMsgTran.Primary().Item("GSORTTYPE" + dintIndex).Putvalue(0); pMsgTran.Primary().Item("SMPLFLAG" + dintIndex).Putvalue(0); pMsgTran.Primary().Item("RWKCNT" + dintIndex).Putvalue(0); pMsgTran.Primary().Item("L4" + dintIndex).Putvalue(0); dstrSLOTMAP += "X"; } dintIndex++; } pMsgTran.Primary().Item("SLOTSEL").Putvalue(dstrSLOTMAP); #endregion #region 이전 소스 //if (pInfo.Port(pInfo.LOTID(dstrLotID).InPortID).AbortFlag) //{ // int GLSRunCnt = 0; // foreach (string str in pInfo.LOTID(dstrLotID).GLS()) // { // InfoAct.clsGLS CurrentGLS = pInfo.LOTID(dstrLotID).GLSID(str); // if (CurrentGLS.RunState == "E") // { // GLSRunCnt++; // } // } // pMsgTran.Primary().Item("QTY").Putvalue(GLSRunCnt); // pMsgTran.Primary().Item("L2").Putvalue(GLSRunCnt); // sb = new StringBuilder("X".PadRight(25, 'X')); // foreach (string strGLSID in CurrentLot.GLS()) // { // InfoAct.clsGLS CurrentGLS = CurrentLot.GLSID(strGLSID); // if (CurrentGLS.RunState == "E") // { // sb[CurrentGLS.SlotID - 1] = 'O'; // pMsgTran.Primary().Item("SLOTNO" + dintIndex).Putvalue(CurrentGLS.SlotID); // pMsgTran.Primary().Item("GLSID" + dintIndex).Putvalue(CurrentGLS.GLSID); // pMsgTran.Primary().Item("PPID" + dintIndex).Putvalue(CurrentGLS.HostPPID); // pMsgTran.Primary().Item("GLSJUDGE" + dintIndex).Putvalue(CurrentGLS.GLSJudge); // pMsgTran.Primary().Item("GSORTTYPE" + dintIndex).Putvalue(CurrentGLS.GSORTTYPE); // pMsgTran.Primary().Item("SMPLFLAG" + dintIndex).Putvalue(CurrentGLS.SMPLFLAG); // pMsgTran.Primary().Item("RWKCNT" + dintIndex).Putvalue(CurrentGLS.RWKCNT); // pMsgTran.Primary().Item("L4" + dintIndex).Putvalue(0); // pMsgTran.Primary().Item("PNLJUDGE" + dintIndex + 0).Putvalue(""); // pMsgTran.Primary().Item("PNLGRADE" + dintIndex + 0).Putvalue(""); // dintIndex++; // } // } //} //else //{ // pMsgTran.Primary().Item("L2").Putvalue(CurrentLot.GLSCount); // sb = new StringBuilder("X".PadRight(25, 'X')); // foreach (string strGLSID in CurrentLot.GLS()) // { // InfoAct.clsGLS CurrentGLS = CurrentLot.GLSID(strGLSID); // sb[CurrentGLS.SlotID - 1] = 'O'; // pMsgTran.Primary().Item("SLOTNO" + dintIndex).Putvalue(CurrentGLS.SlotID); // pMsgTran.Primary().Item("GLSID" + dintIndex).Putvalue(CurrentGLS.GLSID); // pMsgTran.Primary().Item("PPID" + dintIndex).Putvalue(CurrentGLS.HostPPID); // pMsgTran.Primary().Item("GLSJUDGE" + dintIndex).Putvalue(CurrentGLS.GLSJudge); // pMsgTran.Primary().Item("GSORTTYPE" + dintIndex).Putvalue(CurrentGLS.GSORTTYPE); // pMsgTran.Primary().Item("SMPLFLAG" + dintIndex).Putvalue(CurrentGLS.SMPLFLAG); // pMsgTran.Primary().Item("RWKCNT" + dintIndex).Putvalue(CurrentGLS.RWKCNT); // pMsgTran.Primary().Item("L4" + dintIndex).Putvalue(0); // pMsgTran.Primary().Item("PNLJUDGE" + dintIndex + 0).Putvalue(""); // pMsgTran.Primary().Item("PNLGRADE" + dintIndex + 0).Putvalue(""); // dintIndex++; // } // pMsgTran.Primary().Item("QTY").Putvalue(dintIndex); //} //pMsgTran.Primary().Item("SLOTSEL").Putvalue(sb.ToString()); #endregion return(pMsgTran); } catch (Exception error) { funSetLog(InfoAct.clsInfo.LogType.CIM, error.ToString()); return(null); } }
/// <summary> /// Primary Message를 Biuld하여 Transaction을 Return한다. /// </summary> /// <param name="strParameters">Parameter 문자열</param> public Transaction funPrimarySend(string strParameters) { string[] arrayEvent; bool dbolHeavyAlarm = false; int dintAlarmID = 0; string strMCCData = ""; try { arrayEvent = strParameters.Split(','); int dintCEID = Convert.ToInt32(arrayEvent[1]); //CEID int dintUnitID = Convert.ToInt32(arrayEvent[2]); //UnitID int dintSubUnitID = Convert.ToInt32(arrayEvent[3]); pMsgTran = pSecsDrv.MakeTransaction(this.StrPrimaryMsgName); InfoAct.clsSubUnit subUnit = pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID); pMsgTran.Primary().Item("DATAID").Putvalue(0); pMsgTran.Primary().Item("CEID").Putvalue(dintCEID); pMsgTran.Primary().Item("RPTID").Putvalue(1); pMsgTran.Primary().Item("MODULEID").Putvalue(subUnit.ModuleID); pMsgTran.Primary().Item("MCMD").Putvalue(pInfo.All.ControlState); pMsgTran.Primary().Item("MODULE_STATE").Putvalue(subUnit.EQPState); pMsgTran.Primary().Item("PROC_STATE").Putvalue(subUnit.EQPProcessState); //각 CEID별로값을 설정한다. if (dintCEID == 51) { pMsgTran.Primary().Item("BYWHO").Putvalue(subUnit.EQPProcessStateChangeBYWHO); pMsgTran.Primary().Item("OLD_STATE").Putvalue(subUnit.EQPProcessStateOLD); pMsgTran.Primary().Item("NEW_STATE").Putvalue(subUnit.EQPProcessState); } else if (dintCEID == 53) { pMsgTran.Primary().Item("BYWHO").Putvalue(subUnit.EQPStateChangeBYWHO); pMsgTran.Primary().Item("OLD_STATE").Putvalue(subUnit.EQPStateOLD); pMsgTran.Primary().Item("NEW_STATE").Putvalue(subUnit.EQPState); } else if (dintCEID == 71 || dintCEID == 72 || dintCEID == 73) { pMsgTran.Primary().Item("BYWHO").Putvalue(pInfo.All.ControlstateChangeBYWHO); pMsgTran.Primary().Item("OLD_STATE").Putvalue(pInfo.All.ControlStateOLD); pMsgTran.Primary().Item("NEW_STATE").Putvalue(pInfo.All.ControlState); this.pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.ControlState, dintCEID - 70); } pMsgTran.Primary().Item("OPERID").Putvalue(this.pInfo.All.UserID); pMsgTran.Primary().Item("RPTID1").Putvalue(4); //Fixed Value pMsgTran.Primary().Item("RPTID2").Putvalue(8); //Fixed Value switch (dintCEID) { case 51: ///////////////발생 체크//////////////////////////// //이전 상태가 정상상태(Pause가 아닌상태)이고 현재 상태가 Pause이면 현재 발생한 Alarm정보를 입력한다. if (this.pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).EQPProcessStateOLD != "4" && this.pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).EQPProcessState == "4") { if (dintUnitID == 0 || dintUnitID == 3) //160510 KEUN 조건식 변경 (dintUnitID == 0) { //현재 Unit에서 Heavy Alarm이 발생해있는지 여부 foreach (int dintAlarm in this.pInfo.Unit(0).SubUnit(0).CurrAlarm()) { if (this.pInfo.Unit(0).SubUnit(0).CurrAlarm(dintAlarm).AlarmType == "H") { dbolHeavyAlarm = true; break; } } if (dbolHeavyAlarm == true && this.pInfo.All.OccurHeavyAlarmID != 0) { InfoAct.clsAlarm currentAlarm = pInfo.Unit(0).SubUnit(0).Alarm(pInfo.All.OccurHeavyAlarmID); pMsgTran.Primary().Item("ALCD").Putvalue(currentAlarm.AlarmCode); pMsgTran.Primary().Item("ALID").Putvalue(pInfo.All.OccurHeavyAlarmID); pMsgTran.Primary().Item("ALTX").Putvalue(currentAlarm.AlarmDesc); pMsgTran.Primary().Item("MODULEID1").Putvalue(currentAlarm.ModuleID); dintAlarmID = pInfo.All.OccurHeavyAlarmID; } else { pMsgTran.Primary().Item("ALCD").Putvalue(0); pMsgTran.Primary().Item("ALID").Putvalue(0); pMsgTran.Primary().Item("ALTX").Putvalue(""); pMsgTran.Primary().Item("MODULEID1").Putvalue(""); } } else { if (pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).EQPState == "2") { int intAlarmID = this.pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).AlarmID; if (intAlarmID == 0) { intAlarmID = this.pInfo.Unit(dintUnitID).SubUnit(0).AlarmID; } if (intAlarmID != 0) { if (pInfo.Unit(0).SubUnit(0).CurrAlarm(intAlarmID) != null) { InfoAct.clsAlarm currentAlarm = pInfo.Unit(0).SubUnit(0).Alarm(intAlarmID); pMsgTran.Primary().Item("ALCD").Putvalue(currentAlarm.AlarmCode); pMsgTran.Primary().Item("ALID").Putvalue(pInfo.All.OccurHeavyAlarmID); pMsgTran.Primary().Item("ALTX").Putvalue(currentAlarm.AlarmDesc); pMsgTran.Primary().Item("MODULEID1").Putvalue(currentAlarm.ModuleID); dintAlarmID = pInfo.All.OccurHeavyAlarmID; } else { pMsgTran.Primary().Item("ALCD").Putvalue(0); pMsgTran.Primary().Item("ALID").Putvalue(0); pMsgTran.Primary().Item("ALTX").Putvalue(""); pMsgTran.Primary().Item("MODULEID1").Putvalue(""); } } else { pMsgTran.Primary().Item("ALCD").Putvalue(0); pMsgTran.Primary().Item("ALID").Putvalue(0); pMsgTran.Primary().Item("ALTX").Putvalue(""); pMsgTran.Primary().Item("MODULEID1").Putvalue(""); } } else { pMsgTran.Primary().Item("ALCD").Putvalue(0); pMsgTran.Primary().Item("ALID").Putvalue(0); pMsgTran.Primary().Item("ALTX").Putvalue(""); pMsgTran.Primary().Item("MODULEID1").Putvalue(""); } } } ///////////////해제 체크//////////////////////////// //이전 상태가 Pause이고 현재 상태가 정상상태(Pause가 아닌상태), Fault가 아니면 현재 Clear된 Alarm정보를 입력한다. else if (this.pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).EQPState == "2" && this.pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).EQPProcessStateOLD == "4" && this.pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).EQPProcessState != "4") { pMsgTran.Primary().Item("ALCD").Putvalue(0); pMsgTran.Primary().Item("ALID").Putvalue(0); pMsgTran.Primary().Item("ALTX").Putvalue(""); pMsgTran.Primary().Item("MODULEID1").Putvalue(""); } //[2015/04/26] Event Log(Modify by HS) if (dintSubUnitID != 0) { strMCCData = "EVENT;"; strMCCData += "CEID_51" + ","; strMCCData += pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).ModuleID + ","; if (pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).GLSExist) { InfoAct.clsGLS CurrentGLS = pInfo.GLSID(pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).HGLSID); if (CurrentGLS == null) { strMCCData += ",,,"; } else { strMCCData += CurrentGLS.STEPID + ","; strMCCData += CurrentGLS.H_PANELID + ","; strMCCData += CurrentGLS.LOTID + ","; } } else { strMCCData += ",,,"; } strMCCData += pInfo.All.CurrentHOSTPPID + "=" + pInfo.All.CurrentEQPPPID + ","; PROCESSSTATE PROC_OLD = (PROCESSSTATE)(Convert.ToInt32(pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).EQPProcessStateOLD)); PROCESSSTATE PROC = (PROCESSSTATE)(Convert.ToInt32(pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).EQPProcessState)); strMCCData += PROC_OLD.ToString() + ","; strMCCData += PROC.ToString() + ";"; pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.MCCDataSend, strMCCData); } break; case 53: ///////////////발생 체크//////////////////////////// //이전 상태가 정상상태(Normal 혹은 PM)이고 현재 상태가 Fault이면 현재 발생한 Alarm정보를 입력한다. if (this.pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).EQPStateOLD != "2" && this.pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).EQPState == "2") { if (dintUnitID == 0 || dintUnitID == 3) //160510 KEUN 조건식 변경 (dintUnitID == 0) { //현재 Unit에서 Heavy Alarm이 발생해있는지 여부 foreach (int dintAlarm in this.pInfo.Unit(0).SubUnit(0).CurrAlarm()) { if (this.pInfo.Unit(0).SubUnit(0).CurrAlarm(dintAlarm).AlarmType == "H") { dbolHeavyAlarm = true; break; } } if (dbolHeavyAlarm == true && this.pInfo.All.OccurHeavyAlarmID != 0) { InfoAct.clsAlarm currentAlarm = pInfo.Unit(0).SubUnit(0).Alarm(pInfo.All.OccurHeavyAlarmID); pMsgTran.Primary().Item("ALCD").Putvalue(currentAlarm.AlarmCode); pMsgTran.Primary().Item("ALID").Putvalue(pInfo.All.OccurHeavyAlarmID); pMsgTran.Primary().Item("ALTX").Putvalue(currentAlarm.AlarmDesc); pMsgTran.Primary().Item("MODULEID1").Putvalue(currentAlarm.ModuleID); dintAlarmID = pInfo.All.OccurHeavyAlarmID; } else { pMsgTran.Primary().Item("ALCD").Putvalue(0); pMsgTran.Primary().Item("ALID").Putvalue(0); pMsgTran.Primary().Item("ALTX").Putvalue(""); pMsgTran.Primary().Item("MODULEID1").Putvalue(""); } } else { int intAlarmID = this.pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).AlarmID; if (intAlarmID == 0) { intAlarmID = this.pInfo.Unit(dintUnitID).SubUnit(0).AlarmID; } if (intAlarmID != 0) { InfoAct.clsAlarm currentAlarm = pInfo.Unit(0).SubUnit(0).Alarm(intAlarmID); pMsgTran.Primary().Item("ALCD").Putvalue(currentAlarm.AlarmCode); pMsgTran.Primary().Item("ALID").Putvalue(pInfo.All.OccurHeavyAlarmID); pMsgTran.Primary().Item("ALTX").Putvalue(currentAlarm.AlarmDesc); pMsgTran.Primary().Item("MODULEID1").Putvalue(currentAlarm.ModuleID); dintAlarmID = pInfo.All.OccurHeavyAlarmID; } else { pMsgTran.Primary().Item("ALCD").Putvalue(0); pMsgTran.Primary().Item("ALID").Putvalue(0); pMsgTran.Primary().Item("ALTX").Putvalue(""); pMsgTran.Primary().Item("MODULEID1").Putvalue(""); } } } ///////////////해제 체크//////////////////////////// //이전 상태가 Fault이고 현대 상태가 정상상태(Normal 혹은 PM)이면 현재 Clear된 Alarm정보를 입력한다. else if (this.pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).EQPStateOLD == "2" && this.pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).EQPState != "2") { //Alarm Reset 후 51, 53 보고시 Alarm Reset 정보를 보내지 않아도 됨. pMsgTran.Primary().Item("ALCD").Putvalue(0); pMsgTran.Primary().Item("ALID").Putvalue(0); pMsgTran.Primary().Item("ALTX").Putvalue(""); pMsgTran.Primary().Item("MODULEID1").Putvalue(""); } //[2015/04/26] Event Log(Modify by HS) if (dintSubUnitID != 0) { strMCCData = "EVENT;"; strMCCData += "CEID_53" + ","; strMCCData += pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).ModuleID + ","; if (pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).GLSExist) { InfoAct.clsGLS CurrentGLS = pInfo.GLSID(pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).HGLSID); //[2015/05/20](Add by HS) if (CurrentGLS == null) { strMCCData += ",,,"; } else { strMCCData += CurrentGLS.STEPID + ","; strMCCData += CurrentGLS.H_PANELID + ","; strMCCData += CurrentGLS.LOTID + ","; } } else { strMCCData += ",,,"; } strMCCData += pInfo.All.CurrentHOSTPPID + "=" + pInfo.All.CurrentEQPPPID + ","; EQPSTATE EQP_OLD = (EQPSTATE)(Convert.ToInt32(pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).EQPStateOLD)); EQPSTATE EQP = (EQPSTATE)(Convert.ToInt32(pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).EQPState)); strMCCData += EQP_OLD + ","; strMCCData += EQP + ","; if (dintAlarmID != 0) { strMCCData += dintAlarmID.ToString() + ","; strMCCData += pInfo.Unit(0).SubUnit(0).Alarm(dintAlarmID).AlarmDesc + ";"; } else { strMCCData += dintAlarmID.ToString() + ","; strMCCData += ";"; } pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.MCCDataSend, strMCCData); } break; default: pMsgTran.Primary().Item("ALCD").Putvalue(0); pMsgTran.Primary().Item("ALID").Putvalue(0); pMsgTran.Primary().Item("ALTX").Putvalue(""); pMsgTran.Primary().Item("MODULEID1").Putvalue(""); if (dintCEID == 73) { pInfo.Unit(0).SubUnit(0).RemoveTRID(); } break; } return(pMsgTran); } catch (Exception error) { funSetLog(InfoAct.clsInfo.LogType.CIM, error.ToString()); return(null); } }
/// <summary> /// Primary Message를 Biuld하여 Transaction을 Return한다. /// </summary> /// <param name="strParameters">Parameter 문자열</param> public Transaction funPrimarySend(string strParameters) { string[] arrayEvent; string dstrLOTID = ""; string dstrGLSID = ""; int dintUnitID = 0; int dintSubunitID = 0; try { arrayEvent = strParameters.Split(','); int dintCEID = 331; //CEID try { if (pInfo.CEID(dintCEID).Report == false) { return(null); } } catch (Exception) { } if (pInfo.All.DataID >= 9999) { pInfo.All.DataID = -1; } pInfo.All.DataID++; dstrLOTID = arrayEvent[1].Trim(); dstrGLSID = arrayEvent[2].Trim(); dintUnitID = Convert.ToInt32(arrayEvent[3]); dintSubunitID = Convert.ToInt32(arrayEvent[4]); pMsgTran = pSecsDrv.MakeTransaction(this.StrPrimaryMsgName); pMsgTran.Primary().Item("DATAID").Putvalue(pInfo.All.DataID); pMsgTran.Primary().Item("CEID").Putvalue(dintCEID); pMsgTran.Primary().Item("RPTID").Putvalue(100); //FIX pMsgTran.Primary().Item("CRST").Putvalue(pInfo.All.ControlState); pMsgTran.Primary().Item("EQST").Putvalue(pInfo.Unit(0).SubUnit(0).EQPState); pMsgTran.Primary().Item("RPTID_SUB").Putvalue(321); InfoAct.clsGLS CurrentGLS = pInfo.LOTID(dstrLOTID).GLSID(dstrGLSID); pMsgTran.Primary().Item("UNITID").Putvalue(pInfo.Unit(dintUnitID).SubUnit(0).ReportUnitID); pMsgTran.Primary().Item("LOTID").Putvalue(CurrentGLS.LOTID); pMsgTran.Primary().Item("PTID").Putvalue(CurrentGLS.IPID); pMsgTran.Primary().Item("CSTID").Putvalue(CurrentGLS.ICID); pMsgTran.Primary().Item("SLOTID").Putvalue(CurrentGLS.SlotID); pMsgTran.Primary().Item("GLSID").Putvalue(CurrentGLS.GLSID); pMsgTran.Primary().Item("GLSJUDGE").Putvalue(CurrentGLS.GLSJudge); pMsgTran.Primary().Item("TEXT").Putvalue(CurrentGLS.ScrapComment); funSendReply(pMsgTran); return(pMsgTran); } catch (Exception error) { funSetLog(InfoAct.clsInfo.LogType.CIM, error.ToString()); pInfo.All.DataID--; pInfo.All.DataID--; return(null); } }
/// <summary> /// 설비에서 CIM으로 발생하는 Event에 대한 처리 /// </summary> /// <param name="parameters">Parameter Array</param> /// <remarks> /// parameters[0] : strCompBit /// parameters[1] : dstrACTVal /// parameters[2] : dintActFrom /// parameters[3] : dstrACTFromSub /// parameters[4] : intBitVal /// parameters[5] : Special Parameter /// </remarks> public void funProcessEQPEvent(string[] parameters) { string strCompBit = parameters[0]; string dstrWordAddress = ""; string dstrLOTID = ""; int dintSlotID = 0; string dstrGLSID = ""; string[] dstrValue; string dstrLogMsg = ""; int dintUnitID = 0; int dintSubUnitID = 0; int dintModuleNo = 0; string strMCCData = ""; try { dstrWordAddress = "W2020"; //Scrap되었는 LOTID, SlotID 정보를 읽어온다. m_pEqpAct.subWordReadSave(dstrWordAddress, 8, EnuEQP.PLCRWType.ASCII_Data); //LOTID m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.Int_Data); //SlotID m_pEqpAct.subWordReadSave("", 1, EnuEQP.PLCRWType.Int_Data); //UnitID dstrValue = m_pEqpAct.funWordReadAction(true); //Word영역을 Block으로 읽어서 결과값을 DataType에 맞게 배열로 넘겨준다. //PLC Req에 대한 CIM의 Confirm Bit를 준다. m_pEqpAct.subSetConfirmBit(strCompBit); dstrLOTID = dstrValue[0]; dintSlotID = Convert.ToInt32(dstrValue[1]); dintModuleNo = Convert.ToInt32(dstrValue[2]); switch (dintModuleNo) { case 7: dintUnitID = 3; dintSubUnitID = 1; break; case 8: dintUnitID = 3; dintSubUnitID = 2; break; case 9: dintUnitID = 3; dintSubUnitID = 3; break; case 10: dintUnitID = 3; dintSubUnitID = 4; break; case 11: dintUnitID = 3; dintSubUnitID = 5; break; case 12: dintUnitID = 3; dintSubUnitID = 6; break; case 13: dintUnitID = 3; dintSubUnitID = 7; break; case 14: dintUnitID = 3; dintSubUnitID = 8; break; } //[2015/05/08] GL01 조건 추가(Add by HS) if (dintModuleNo == 13 || dintModuleNo == 14 || dintModuleNo == 15) { pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).RemoveCurrGLS(dstrLOTID); pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).GLSExist = false; //pInfo.Unit(0).SubUnit(0).RemoveCurrGLS(dstrLOTID); //pInfo.Unit(0).SubUnit(0).GLSExist = false; pInfo.Unit(dintUnitID).SubUnit(0).RemoveCurrGLS(dstrLOTID); if (pInfo.Unit(3).SubUnit(7).GLSExist == false && pInfo.Unit(3).SubUnit(8).GLSExist == false) { pInfo.Unit(dintUnitID).SubUnit(0).GLSExist = false; } if (pInfo.GLSID(dstrLOTID) != null) { pInfo.GLSID(dstrLOTID).Scrap = true; //S6F11(CEID=14, Scrap 보고) pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11RelatedPanelProcessEvent, 18, dintUnitID, dintSubUnitID, dstrLOTID, dintSlotID); //[2015/05/15]MCC Event Log(Add by HS) InfoAct.clsGLS CurrentGLS = pInfo.GLSID(dstrLOTID); strMCCData = "EVENT;"; strMCCData += "CEID_18" + ","; strMCCData += pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).ModuleID + ","; strMCCData += CurrentGLS.STEPID + ","; strMCCData += CurrentGLS.H_PANELID + ","; strMCCData += CurrentGLS.LOTID + ","; strMCCData += pInfo.All.CurrentHOSTPPID + "=" + pInfo.All.CurrentEQPPPID + ";"; pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.MCCDataSend, strMCCData); } } else { //Scrap 로그 출력 if (pInfo.LOTID(dstrLOTID) == null) { dstrLogMsg = "LOTID:" + dstrLOTID + "(NULL)" + "\r\n" + "SlotID:" + dintSlotID.ToString() + "\r\n" + "GLSID:" + dstrGLSID + "\r\n" + "ModuleID:" + pInfo.Unit(dintUnitID).SubUnit(0).ModuleID; } else { pInfo.LOTID(dstrLOTID).Slot(dintSlotID).Scrap = true; //해당 Slot이 Scrap되었음을 저장 } pInfo.Unit(dintUnitID).SubUnit(0).FilmExist = false; //S6F11(CEID=14, Scrap 보고) //pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11MaterialProcEvent, 1018, dintModuleNo, dstrLOTID, dintSlotID, dintUnitID, dintSubUnitID); //[2015/05/08]Scrap처리를 호스트에서 하지못하여 CEID 1015로 판단하기에 추가(Add by HS) //[2015/06/30] Juge 구분 추가(Add by HS) pInfo.subSendSF_Set(InfoAct.clsInfo.SFName.S6F11MaterialProcEvent, 1015, dintModuleNo, dstrLOTID, dintSlotID, dintUnitID, dintSubUnitID, "SCRAP"); //[2015/05/15]MCC Event Log(Add by HS) InfoAct.clsSlot CurrentSlot = pInfo.LOTID(dstrGLSID).Slot(dintSlotID); strMCCData = "EVENT;"; strMCCData += "CEID_1015" + ","; strMCCData += pInfo.Unit(dintUnitID).SubUnit(dintSubUnitID).ModuleID + ","; strMCCData += CurrentSlot.STEPID + ","; strMCCData += CurrentSlot.H_PANELID + ","; strMCCData += CurrentSlot.LOTID + ","; strMCCData += pInfo.All.CurrentHOSTPPID + "=" + pInfo.All.CurrentEQPPPID + ";"; pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.MCCDataSend, strMCCData); } } catch (Exception ex) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString() + ", dstrLOTID:" + dstrLOTID + ", dintSlotID: " + dintSlotID.ToString()); } }