/// <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 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(101); pMsgTran.Primary().Item("CMST").Putvalue(pInfo.Unit(0).SubUnit(0).CMST); return(pMsgTran); } 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]); //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 dintTRID = Convert.ToInt32(arrayEvent[1]); pMsgTran = pSecsDrv.MakeTransaction(this.StrPrimaryMsgName); InfoAct.clsSubUnit subUnit = this.pInfo.Unit(0).SubUnit(0); pMsgTran.Primary().Item("MODULEID").Putvalue(pInfo.Unit(3).SubUnit(0).ModuleID); pMsgTran.Primary().Item("TRID").Putvalue(dintTRID); pMsgTran.Primary().Item("SMPLN").Putvalue(subUnit.TRID(dintTRID).SampleNo); if (subUnit.TRID(dintTRID).REPGSZ == 1) //Group Size가 1인경우 { pMsgTran.Primary().Item("REPGSZCOUNTER").Putvalue(1); pMsgTran.Primary().Item("SCTIME" + 0).Putvalue(subUnit.TRID(dintTRID).Group(1).ReadTime); int dintSVIDCount = subUnit.TRID(dintTRID).Group(1).SVIDCount; pMsgTran.Primary().Item("SVCOUNT" + 0).Putvalue(dintSVIDCount); for (int dintLoop = 1; dintLoop <= dintSVIDCount; dintLoop++) { InfoAct.clsSVID svID = this.pInfo.Unit(0).SubUnit(0).TRID(dintTRID).Group(1).SVID(dintLoop); pMsgTran.Primary().Item("SVID" + 0 + (dintLoop - 1)).Putvalue(svID.SVID); pMsgTran.Primary().Item("SVNAME" + 0 + (dintLoop - 1)).Putvalue(svID.Name); //pMsgTran.Primary().Item("SV" + 0 + (dintLoop - 1)).Putvalue(svID.Value); // 20130502 조영훈 위의 경우 벨류가 공백임 pMsgTran.Primary().Item("SV" + 0 + (dintLoop - 1)).Putvalue(this.pInfo.Unit(0).SubUnit(0).SVID(svID.SVID).Value); } } else if (subUnit.TRID(dintTRID).REPGSZ > 1) //Group Size가 1이상인 경우 { int dintGroupSize = subUnit.TRID(dintTRID).REPGSZ; pMsgTran.Primary().Item("REPGSZCOUNTER").Putvalue(dintGroupSize); for (int dintLoop = 1; dintLoop <= dintGroupSize; dintLoop++) { InfoAct.clsGroup reportGroup = this.pInfo.Unit(0).SubUnit(0).TRID(dintTRID).Group(dintLoop); pMsgTran.Primary().Item("SCTIME" + (dintLoop - 1)).Putvalue(reportGroup.ReadTime); pMsgTran.Primary().Item("SVCOUNT" + (dintLoop - 1)).Putvalue(reportGroup.SVIDCount); for (int dintLoop2 = 1; dintLoop2 <= reportGroup.SVIDCount; dintLoop2++) { pMsgTran.Primary().Item("SVID" + (dintLoop - 1) + (dintLoop2 - 1)).Putvalue(reportGroup.SVID(dintLoop2).SVID); //pMsgTran.Primary().Item("SVNAME" + (dintLoop - 1) + (dintLoop2 - 1)).Putvalue(reportGroup.SVID(dintLoop2).Name); //pMsgTran.Primary().Item("SV" + (dintLoop - 1) + (dintLoop2 - 1)).Putvalue(reportGroup.SVID(dintLoop2).Value); pMsgTran.Primary().Item("SVNAME" + (dintLoop - 1) + (dintLoop2 - 1)).Putvalue(this.pInfo.Unit(0).SubUnit(0).SVID(reportGroup.SVID(dintLoop2).SVID).Name); pMsgTran.Primary().Item("SV" + (dintLoop - 1) + (dintLoop2 - 1)).Putvalue(this.pInfo.Unit(0).SubUnit(0).SVID(reportGroup.SVID(dintLoop2).SVID).Value); } } } 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; 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를 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); } }