/// <summary> /// Primary Message를 Biuld하여 Transaction을 Return한다. /// </summary> /// <param name="strParameters">Parameter 문자열</param> public Transaction funPrimarySend(string strParameters) { string[] arrayEvent; try { arrayEvent = strParameters.Split(','); pMsgTran = pSecsDrv.MakeTransaction(this.StrPrimaryMsgName); int dintCEID = Convert.ToInt32(arrayEvent[1]); //CEID if (dintCEID != 23) { return(null); } int dintUnitID = Convert.ToInt32(arrayEvent[2]); //UnitID string dstrLOTID = arrayEvent[3]; //LOTID int dintSlotID = Convert.ToInt32(arrayEvent[4]); //SlotID InfoAct.clsSlot currentSlot = pInfo.LOTID(dstrLOTID).Slot(dintSlotID); pMsgTran.Primary().Item("DATAID").Putvalue(0); //Fixed Value pMsgTran.Primary().Item("CEID").Putvalue(dintCEID); 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("STEPNO").Putvalue(currentSlot.StepNo); pMsgTran.Primary().Item("PREV_STEPNO").Putvalue(currentSlot.StepNo_OLD); pMsgTran.Primary().Item("L2_3").Putvalue(0); // Fixed Value For CEID=23; 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; 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); } }
public void subshowTreeView() { if (MessageBox.Show("CIM Data 정보를 불러오는 중입니다!!\r\n설비 가동 중에 사용하시면 Data보고누락 및 문제가 발생할 수 있습니다.\r\n그래도 사용하시겠습니까?", "CIM Data Loading", MessageBoxButtons.YesNo) == System.Windows.Forms.DialogResult.Yes) { int A = 0; int B = 0; int C = 0; int D = 0; int E = 0; int F = 0; int G = 0; //string dstrTemp = ""; //string[] darrEvent; try { TreeView1.Nodes.Clear(); //전체 EQP 공통 //0. All Info TreeView1.Nodes.Add("00. All"); if (this.PInfo.All != null) { TreeView1.Nodes[A].Nodes.Add("SoftVersion: " + this.PInfo.All.SoftVersion); TreeView1.Nodes[A].Nodes.Add("MDLN: " + this.PInfo.All.MDLN); TreeView1.Nodes[A].Nodes.Add("HostConnect: " + this.PInfo.All.HostConnect); TreeView1.Nodes[A].Nodes.Add("SecomDriver: " + this.PInfo.All.SecomDriver); TreeView1.Nodes[A].Nodes.Add("CommPort: " + this.PInfo.All.CommPort); TreeView1.Nodes[A].Nodes.Add("CommSetting: " + this.PInfo.All.CommSetting); TreeView1.Nodes[A].Nodes.Add("DeviceID: " + this.PInfo.All.DeviceID); TreeView1.Nodes[A].Nodes.Add("LocalPort: " + this.PInfo.All.LocalPort); TreeView1.Nodes[A].Nodes.Add("RetryCount: " + this.PInfo.All.RetryCount); TreeView1.Nodes[A].Nodes.Add("T3: " + this.PInfo.All.T3); TreeView1.Nodes[A].Nodes.Add("T5: " + this.PInfo.All.T5); TreeView1.Nodes[A].Nodes.Add("T6: " + this.PInfo.All.T6); TreeView1.Nodes[A].Nodes.Add("T7: " + this.PInfo.All.T7); TreeView1.Nodes[A].Nodes.Add("T8: " + this.PInfo.All.T8); TreeView1.Nodes[A].Nodes.Add("T9: " + this.PInfo.All.T9); TreeView1.Nodes[A].Nodes.Add("CurrentHOSTPPID: " + this.PInfo.All.CurrentHOSTPPID); TreeView1.Nodes[A].Nodes.Add("CurrentEQPPPID: " + this.PInfo.All.CurrentEQPPPID); TreeView1.Nodes[A].Nodes.Add("CurrentRegisteredHOSTPPIDCount: " + this.PInfo.All.CurrentRegisteredHOSTPPIDCount); TreeView1.Nodes[A].Nodes.Add("CurrentRegisteredEQPPPIDCount: " + this.PInfo.All.CurrentRegisteredEQPPPIDCount); TreeView1.Nodes[A].Nodes.Add("HOSTPPIDCommandCount: " + this.PInfo.All.HOSTPPIDCommandCount); TreeView1.Nodes[A].Nodes.Add("EQPPPIDCommandCount: " + this.PInfo.All.EQPPPIDCommandCount); TreeView1.Nodes[A].Nodes.Add("SetUpPPIDPLCWriteCount: " + this.PInfo.All.SetUpPPIDPLCWriteCount); TreeView1.Nodes[A].Nodes.Add("ProgramEnd: " + this.PInfo.All.ProgramEnd); TreeView1.Nodes[A].Nodes.Add("UserID: " + this.PInfo.All.UserID); TreeView1.Nodes[A].Nodes.Add("OperatorCallFormVisible: " + this.PInfo.All.OperatorCallFormVisible); TreeView1.Nodes[A].Nodes.Add("AutoMode: " + this.PInfo.All.AutoMode); TreeView1.Nodes[A].Nodes.Add("PMCode: " + this.PInfo.All.PMCode); TreeView1.Nodes[A].Nodes.Add("AlarmExist: " + this.PInfo.All.AlarmExist); TreeView1.Nodes[A].Nodes.Add("UserLogInDuringTime: " + this.PInfo.All.UserLogInDuringTime); TreeView1.Nodes[A].Nodes.Add("PLCActionEnd: " + this.PInfo.All.PLCActionEnd); TreeView1.Nodes[A].Nodes.Add("isReceivedFromHOST: " + this.PInfo.All.isReceivedFromHOST); TreeView1.Nodes[A].Nodes.Add("isReceivedFromCIM: " + this.PInfo.All.isReceivedFromCIM); TreeView1.Nodes[A].Nodes.Add("SystemINIFilePath: " + this.PInfo.All.SystemINIFilePath); TreeView1.Nodes[A].Nodes.Add("ONLINEModeChange: " + this.PInfo.All.ONLINEModeChange); TreeView1.Nodes[A].Nodes.Add("ControlState: " + this.PInfo.All.ControlState); TreeView1.Nodes[A].Nodes.Add("ControlStateOLD: " + this.PInfo.All.ControlStateOLD); TreeView1.Nodes[A].Nodes.Add("WantControlState: " + this.PInfo.All.WantControlState); TreeView1.Nodes[A].Nodes.Add("OccurHeavyAlarmID(Heavy): " + this.PInfo.All.OccurHeavyAlarmID); TreeView1.Nodes[A].Nodes.Add("ClearHeavyAlarmID(Heavy): " + this.PInfo.All.ClearHeavyAlarmID); TreeView1.Nodes[A].Nodes.Add("ControlstateChangeBYWHO: " + this.PInfo.All.ControlstateChangeBYWHO); TreeView1.Nodes[A].Nodes.Add("EQPSpecifiedCtrlBYWHO: " + this.PInfo.All.EQPSpecifiedCtrlBYWHO); TreeView1.Nodes[A].Nodes.Add("ECIDChangeBYWHO: " + this.PInfo.All.ECIDChangeBYWHO); TreeView1.Nodes[A].Nodes.Add("EOIDChangeBYWHO: " + this.PInfo.All.EOIDChangeBYWHO); TreeView1.Nodes[A].Nodes.Add("ModeChangeFormVisible: " + this.PInfo.All.ModeChangeFormVisible); TreeView1.Nodes[A].Nodes.Add("SVIDPLCReadLength: " + this.PInfo.All.SVIDPLCReadLength); TreeView1.Nodes[A].Nodes.Add("GLSAPDPLCReadLength: " + this.PInfo.All.GLSAPDPLCReadLength); TreeView1.Nodes[A].Nodes.Add("HOSTReportEOIDCount: " + this.PInfo.All.HOSTReportEOIDCount); TreeView1.Nodes[A].Nodes.Add("SEMControllerConnect: " + this.PInfo.All.SEMControllerConnect); TreeView1.Nodes[A].Nodes.Add("SEMStartReplyCheck: " + this.PInfo.All.SEMStartReplyCheck); TreeView1.Nodes[A].Nodes.Add("SEMAlarmTime: " + this.PInfo.All.SEMAlarmTime); TreeView1.Nodes[A].Nodes.Add("SVIDPLCNotReadLength: " + this.PInfo.All.SVIDPLCNotReadLength); } A = A + 1; //1. Eqp Info TreeView1.Nodes.Add("01. EQP"); if (this.PInfo.EQP("Main") != null) { TreeView1.Nodes[A].Nodes.Add("UnitCount: " + this.PInfo.EQP("Main").UnitCount); TreeView1.Nodes[A].Nodes.Add("PLCConnect: " + this.PInfo.EQP("Main").PLCConnect); TreeView1.Nodes[A].Nodes.Add("PLCStartConnect: " + this.PInfo.EQP("Main").PLCStartConnect); TreeView1.Nodes[A].Nodes.Add("PLCIP: " + this.PInfo.EQP("Main").PLCIP); TreeView1.Nodes[A].Nodes.Add("PLCPort: " + this.PInfo.EQP("Main").PLCPort); TreeView1.Nodes[A].Nodes.Add("DummyPLC: " + this.PInfo.EQP("Main").DummyPLC); TreeView1.Nodes[A].Nodes.Add("WordStart: " + this.PInfo.EQP("Main").WordStart); TreeView1.Nodes[A].Nodes.Add("WordEnd: " + this.PInfo.EQP("Main").WordEnd); TreeView1.Nodes[A].Nodes.Add("BitScanCount: " + this.PInfo.EQP("Main").BitScanCount); TreeView1.Nodes[A].Nodes.Add("Type: " + this.PInfo.EQP("Main").Type); TreeView1.Nodes[A].Nodes.Add("EQPID: " + this.PInfo.EQP("Main").EQPID); TreeView1.Nodes[A].Nodes.Add("EQPType: " + this.PInfo.EQP("Main").EQPType); TreeView1.Nodes[A].Nodes.Add("EQPName: " + this.PInfo.EQP("Main").EQPName); TreeView1.Nodes[A].Nodes.Add("RecipeCheck: " + this.PInfo.EQP("Main").RecipeCheck); } A = A + 1; //2. Unit Info TreeView1.Nodes.Add("02. Unit"); for (int dintUnitID = 0; dintUnitID <= this.PInfo.EQP("Main").UnitCount; dintUnitID++) { B = B + 1; TreeView1.Nodes[A].Nodes.Add("UnitID: " + dintUnitID.ToString() + "(" + this.PInfo.Unit(dintUnitID).SubUnit(0).ModuleID + ")"); for (int dintSubUnit = 0; dintSubUnit <= this.PInfo.Unit(dintUnitID).SubUnitCount; dintSubUnit++) { //SubUnit 개수만큼 등록 TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("SubUnit:" + dintSubUnit.ToString()); C = TreeView1.Nodes[A].Nodes[B - 1].GetNodeCount(false) - 1; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("UnitID: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).UnitID); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("ModuleID: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).ModuleID); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("GLSExist: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).GLSExist); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("EQPState: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).EQPState); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("EQPStateOLD: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).EQPStateOLD); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("EQPProcessState: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).EQPProcessState); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("EQPProcessStateOLD: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).EQPProcessStateOLD); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("EQPStateChangeBYWHO: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).EQPStateChangeBYWHO); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("EQPStateLastCommand: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).EQPStateLastCommand); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("EQPProcessStateChangeBYWHO: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).EQPProcessStateChangeBYWHO); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("EQPProcessStateLastCommand: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).EQPProcessStateLastCommand); if (dintUnitID == 0) { //HOSTPPID Info TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("HOSTPPID"); D = TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].GetNodeCount(false) - 1; foreach (string dstrName in this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).HOSTPPID()) { E = E + 1; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes.Add(dstrName); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("HostPPID: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).HOSTPPID(dstrName).HostPPID); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("PPIDVer: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).HOSTPPID(dstrName).PPIDVer); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("DateTime: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).HOSTPPID(dstrName).DateTime); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("EQPPPID: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).HOSTPPID(dstrName).EQPPPID); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Comment: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).HOSTPPID(dstrName).Comment); } E = 0; //초기화 //EQPPPID Info TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("EQPPPID"); D = TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].GetNodeCount(false) - 1; foreach (string dstrName in this.PInfo.Unit(0).SubUnit(0).EQPPPID()) { E = E + 1; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes.Add(dstrName); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("PPIDVer: " + this.PInfo.Unit(0).SubUnit(0).EQPPPID(dstrName).PPIDVer); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("DateTime: " + this.PInfo.Unit(0).SubUnit(0).EQPPPID(dstrName).DateTime); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Comment: " + this.PInfo.Unit(0).SubUnit(0).EQPPPID(dstrName).Comment); //EQPPPID별 PPIDBody TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("PPIDBody"); F = TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].GetNodeCount(false) - 1; for (int dintIndex = 1; dintIndex <= this.PInfo.Unit(0).SubUnit(0).EQPPPID(dstrName).PPIDBodyCount; dintIndex++) { G = G + 1; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes[F].Nodes.Add(dintIndex.ToString()); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes[F].Nodes[G - 1].Nodes.Add("Name: " + this.PInfo.Unit(0).SubUnit(0).EQPPPID(dstrName).PPIDBody(dintIndex).Name); //실제저장한 값 TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes[F].Nodes[G - 1].Nodes.Add("Value: " + this.PInfo.Unit(0).SubUnit(0).EQPPPID(dstrName).PPIDBody(dintIndex).Value); //실제저장할 값 } G = 0; //초기화 } E = 0; //초기화 //PPIDBody Info TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("PPIDBody(기준정보)"); D = TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].GetNodeCount(false) - 1; for (int dintIndex = 1; dintIndex <= this.PInfo.Unit(0).SubUnit(0).PPIDBodyCount; dintIndex++) { E = E + 1; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes.Add(dintIndex.ToString()); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Name: " + this.PInfo.Unit(0).SubUnit(0).PPIDBody(dintIndex).Name); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Length: " + this.PInfo.Unit(0).SubUnit(0).PPIDBody(dintIndex).Length); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Min: " + this.PInfo.Unit(0).SubUnit(0).PPIDBody(dintIndex).Min); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Max: " + this.PInfo.Unit(0).SubUnit(0).PPIDBody(dintIndex).Max); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Format: " + this.PInfo.Unit(0).SubUnit(0).PPIDBody(dintIndex).Format); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Unit: " + this.PInfo.Unit(0).SubUnit(0).PPIDBody(dintIndex).Unit); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Range: " + this.PInfo.Unit(0).SubUnit(0).PPIDBody(dintIndex).Range); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("DESC: " + this.PInfo.Unit(0).SubUnit(0).PPIDBody(dintIndex).DESC); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Value: " + this.PInfo.Unit(0).SubUnit(0).PPIDBody(dintIndex).Value); //TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("UnitID: " + this.PInfo.Unit(0).SubUnit(0).PPIDBody(dintIndex).UnitID); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("ModuleID: " + this.PInfo.Unit(0).SubUnit(0).PPIDBody(dintIndex).ModuleID); } E = 0; //초기화 //GLSAPD Info TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("GLSAPD(기준정보)"); D = TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].GetNodeCount(false) - 1; foreach (int intIndex in this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).GLSAPD()) { E = E + 1; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes.Add(this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).GLSAPD(intIndex).Name); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Index: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).GLSAPD(intIndex).Index); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Name: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).GLSAPD(intIndex).Name); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Length: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).GLSAPD(intIndex).Length); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Format: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).GLSAPD(intIndex).Format); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("HaveMinusValue: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).GLSAPD(intIndex).HaveMinusValue); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Value: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).GLSAPD(intIndex).Value); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("ModuleID: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).GLSAPD(intIndex).ModuleID); //TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("UnitID: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).GLSAPD(intIndex).UnitID); } E = 0; //초기화 //Alarm Info TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("Alarm(기준정보)"); D = TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].GetNodeCount(false) - 1; foreach (int dintAlarmID in this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).Alarm()) { E = E + 1; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes.Add(dintAlarmID.ToString()); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("ModuleID: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).Alarm(dintAlarmID).ModuleID); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("AlarmCode: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).Alarm(dintAlarmID).AlarmCode); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("AlarmType: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).Alarm(dintAlarmID).AlarmType); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("AlarmDesc: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).Alarm(dintAlarmID).AlarmDesc); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("AlarmOCCTime: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).Alarm(dintAlarmID).AlarmOCCTime); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("AlarmEventType: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).Alarm(dintAlarmID).AlarmEventType); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("AlarmReport: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).Alarm(dintAlarmID).AlarmReport); } E = 0; //초기화 //User Info TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("User"); D = TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].GetNodeCount(false) - 1; foreach (string dstrUserID in this.PInfo.Unit(0).SubUnit(0).User()) { E = E + 1; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes.Add(dstrUserID); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("dstrUserID: " + dstrUserID); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Level: " + this.PInfo.Unit(0).SubUnit(0).User(dstrUserID).Level); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("PassWord: "******"Desc: " + this.PInfo.Unit(0).SubUnit(0).User(dstrUserID).Desc); } E = 0; //초기화 //UserLevel Info TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("UserLevel(기준정보)"); D = TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].GetNodeCount(false) - 1; foreach (int dintIndex in this.PInfo.Unit(0).SubUnit(0).UserLevel()) { E = E + 1; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes.Add(dintIndex.ToString()); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("UserLevel: " + dintIndex.ToString()); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Desc: " + this.PInfo.Unit(0).SubUnit(0).UserLevel(dintIndex).Desc); } E = 0; //초기화 //EOID Info TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("EOID"); D = TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].GetNodeCount(false) - 1; for (int dintIndex = 1; dintIndex <= this.PInfo.Unit(0).SubUnit(0).EOIDCount; dintIndex++) { E = E + 1; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes.Add(dintIndex.ToString()); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("EOID: " + this.PInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOID); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("EOMD: " + this.PInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOMD); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("EOV: " + this.PInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOV); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("EOVMin: " + this.PInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOVMin); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("EOVMax: " + this.PInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOVMax); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("EOVMin: " + this.PInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOVMin); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("EOVMax: " + this.PInfo.Unit(0).SubUnit(0).EOID(dintIndex).EOVMax); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("DESC: " + this.PInfo.Unit(0).SubUnit(0).EOID(dintIndex).DESC); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("PLCWrite: " + this.PInfo.Unit(0).SubUnit(0).EOID(dintIndex).PLCWrite); } E = 0; //초기화 //SVID Info TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("SVID"); D = TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].GetNodeCount(false) - 1; foreach (int dintSVID in PInfo.Unit(0).SubUnit(0).SVID()) { InfoAct.clsSVID CurrentSVID = PInfo.Unit(0).SubUnit(0).SVID(dintSVID); E = E + 1; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes.Add(dintSVID.ToString()); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Name: " + CurrentSVID.Name); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Length: " + CurrentSVID.Length); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Format: " + CurrentSVID.Format); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Value: " + CurrentSVID.Value); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Type: " + CurrentSVID.Type); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Unit: " + CurrentSVID.Unit); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Range: " + CurrentSVID.Range); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("HaveMinusValue: " + CurrentSVID.HaveMinusValue); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("DESC: " + CurrentSVID.DESC); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("UnitID: " + CurrentSVID.UnitID); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("ModuleID: " + CurrentSVID.ModuleID); } E = 0; //초기화 //ECID Info TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("ECID"); D = TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].GetNodeCount(false) - 1; for (int dintIndex = 1; dintIndex <= this.PInfo.Unit(0).SubUnit(0).ECIDCount; dintIndex++) { E = E + 1; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes.Add(dintIndex.ToString()); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Name: " + this.PInfo.Unit(0).SubUnit(0).ECID(dintIndex).Name); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Min: " + this.PInfo.Unit(0).SubUnit(0).ECID(dintIndex).Min); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("ECSLL: " + this.PInfo.Unit(0).SubUnit(0).ECID(dintIndex).ECSLL); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("ECWLL: " + this.PInfo.Unit(0).SubUnit(0).ECID(dintIndex).ECWLL); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("ECDEF: " + this.PInfo.Unit(0).SubUnit(0).ECID(dintIndex).ECDEF); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("ECWUL: " + this.PInfo.Unit(0).SubUnit(0).ECID(dintIndex).ECWUL); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("ECSUL: " + this.PInfo.Unit(0).SubUnit(0).ECID(dintIndex).ECSUL); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Format: " + this.PInfo.Unit(0).SubUnit(0).ECID(dintIndex).Format); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Max: " + this.PInfo.Unit(0).SubUnit(0).ECID(dintIndex).Max); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("ModuleID: " + this.PInfo.Unit(0).SubUnit(0).ECID(dintIndex).ModuleID); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("Use: " + this.PInfo.Unit(0).SubUnit(0).ECID(dintIndex).Use); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("UnitID: " + this.PInfo.Unit(0).SubUnit(0).ECID(dintIndex).UnitID); } E = 0; //초기화 //CurrAlarm Info TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("CurrAlarm"); D = TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].GetNodeCount(false) - 1; foreach (int dintAlarmID in this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).CurrAlarm()) { E = E + 1; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes.Add(dintAlarmID.ToString()); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("ModuleID: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).CurrAlarm(dintAlarmID).ModuleID); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("AlarmCode: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).CurrAlarm(dintAlarmID).AlarmCode.ToString()); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("AlarmType: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).CurrAlarm(dintAlarmID).AlarmType); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("AlarmDesc: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).CurrAlarm(dintAlarmID).AlarmDesc); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("AlarmOCCTime: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).CurrAlarm(dintAlarmID).AlarmOCCTime); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("AlarmEventType: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).CurrAlarm(dintAlarmID).AlarmEventType); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("AlarmReport: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).CurrAlarm(dintAlarmID).AlarmReport); } E = 0; //초기화 //CurrGLS Info TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("CurrGLS"); D = TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].GetNodeCount(false) - 1; foreach (string dstrName in this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).CurrGLS()) { E = E + 1; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes.Add(dstrName); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("GLSID: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).CurrGLS(dstrName).H_PANELID); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("SlotID: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).CurrGLS(dstrName).SlotID); } E = 0; //초기화 } else { //CurrGLS Info TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add("CurrGLS"); D = TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].GetNodeCount(false) - 1; foreach (string dstrName in this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).CurrGLS()) { E = E + 1; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes.Add(dstrName); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("GLSID: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).CurrGLS(dstrName).H_PANELID); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D].Nodes[E - 1].Nodes.Add("SlotID: " + this.PInfo.Unit(dintUnitID).SubUnit(dintSubUnit).CurrGLS(dstrName).SlotID); } E = 0; //초기화 } } } A = A + 1; B = 0; C = 0; D = 0; E = 0; F = 0; //03. Trace TreeView1.Nodes.Add("03. Trace"); foreach (int dintTRID in this.PInfo.Unit(0).SubUnit(0).TRID()) { B = B + 1; TreeView1.Nodes[A].Nodes.Add(dintTRID.ToString()); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("REPGSZ: " + this.PInfo.Unit(0).SubUnit(0).TRID(dintTRID).REPGSZ); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("DSPER: " + this.PInfo.Unit(0).SubUnit(0).TRID(dintTRID).DSPER); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("TOTSMP: " + this.PInfo.Unit(0).SubUnit(0).TRID(dintTRID).TOTSMP); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("TimeAcc: " + this.PInfo.Unit(0).SubUnit(0).TRID(dintTRID).TimeAcc); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("GrpCnt: " + this.PInfo.Unit(0).SubUnit(0).TRID(dintTRID).GrpCnt); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("REPGSZCnt: " + this.PInfo.Unit(0).SubUnit(0).TRID(dintTRID).REPGSZCnt); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("SampleNo: " + this.PInfo.Unit(0).SubUnit(0).TRID(dintTRID).SampleNo); //TRID 별 Group TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("Group"); C = TreeView1.Nodes[A].Nodes[B - 1].GetNodeCount(false) - 1; for (int dintIndex = 1; dintIndex <= this.PInfo.Unit(0).SubUnit(0).TRID(dintTRID).GroupCount; dintIndex++) { D = D + 1; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add(dintIndex.ToString()); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D - 1].Nodes.Add("GroupID: " + this.PInfo.Unit(0).SubUnit(0).TRID(dintTRID).Group(dintIndex).GroupID); //실제저장한 값 TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D - 1].Nodes.Add("ReadTime: " + this.PInfo.Unit(0).SubUnit(0).TRID(dintTRID).Group(dintIndex).ReadTime); //실제저장할 값 //Group 별 SVID TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D - 1].Nodes.Add("SVID"); E = TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D - 1].GetNodeCount(false) - 1; for (int dintLoop = 1; dintLoop <= this.PInfo.Unit(0).SubUnit(0).TRID(dintTRID).Group(dintIndex).SVIDCount; dintLoop++) { F = F + 1; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D - 1].Nodes[E].Nodes.Add(this.PInfo.Unit(0).SubUnit(0).TRID(dintTRID).Group(dintIndex).SVID(dintLoop).SVID.ToString()); TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D - 1].Nodes[E].Nodes[F - 1].Nodes.Add("SVID: " + this.PInfo.Unit(0).SubUnit(0).TRID(dintTRID).Group(dintIndex).SVID(dintLoop).SVID); //실제저장한 값 TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D - 1].Nodes[E].Nodes[F - 1].Nodes.Add("Name: " + this.PInfo.Unit(0).SubUnit(0).TRID(dintTRID).Group(dintIndex).SVID(dintLoop).Name); //실제저장한 값 TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes[D - 1].Nodes[E].Nodes[F - 1].Nodes.Add("Value: " + this.PInfo.Unit(0).SubUnit(0).TRID(dintTRID).Group(dintIndex).SVID(dintLoop).Value); //실제저장할 값 } F = 0; //초기화 } D = 0; //초기화 } //초기화 A = A + 1; B = 0; C = 0; D = 0; E = 0; F = 0; ////4. APC Info TreeView1.Nodes.Add("04. APC"); foreach (string str in PInfo.APC()) { B = B + 1; InfoAct.clsAPC CurrentAPC = PInfo.APC(str); TreeView1.Nodes[A].Nodes.Add(CurrentAPC.GLSID); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("GLASSID: " + CurrentAPC.GLSID); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("JOBID: " + CurrentAPC.JOBID); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("EQPPPID:" + CurrentAPC.EQPPPID); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("SetTime: " + CurrentAPC.SetTime); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("STATE: " + CurrentAPC.State); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("Parameters"); C = TreeView1.Nodes[A].Nodes[B - 1].GetNodeCount(false) - 1; for (int dintLoop = 0; dintLoop < CurrentAPC.ParameterName.Length; dintLoop++) { D++; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add(CurrentAPC.ParameterName[dintLoop] + "=" + CurrentAPC.ParameterValue[dintLoop]); } } //초기화 A = A + 1; B = 0; C = 0; D = 0; E = 0; ////5. PPC Info TreeView1.Nodes.Add("05. PPC"); foreach (string str in PInfo.PPC()) { B = B + 1; InfoAct.clsPPC CurrentPPC = PInfo.PPC(str); TreeView1.Nodes[A].Nodes.Add(CurrentPPC.HGLSID); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("GLASSID: " + CurrentPPC.HGLSID); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("JOBID: " + CurrentPPC.JOBID); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("SetTime: " + CurrentPPC.SetTime); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("STATE: " + CurrentPPC.RunState); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("ORDER"); C = TreeView1.Nodes[A].Nodes[B - 1].GetNodeCount(false) - 1; for (int dintLoop = 0; dintLoop < CurrentPPC.P_MODULEID.Length; dintLoop++) { D++; TreeView1.Nodes[A].Nodes[B - 1].Nodes[C].Nodes.Add(CurrentPPC.P_MODULEID[dintLoop] + " = " + CurrentPPC.P_ORDER[dintLoop] + " = " + CurrentPPC.P_STATUS[dintLoop]); } } //초기화 A = A + 1; B = 0; C = 0; D = 0; E = 0; ////6. RPC Info TreeView1.Nodes.Add("06. RPC"); foreach (string str in PInfo.RPC()) { B = B + 1; InfoAct.clsRPC CurrentRPC = PInfo.RPC(str); TreeView1.Nodes[A].Nodes.Add(CurrentRPC.HGLSID); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("GLASSID: " + CurrentRPC.HGLSID); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("JOBID: " + CurrentRPC.JOBID); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("RPC_PPID: " + CurrentRPC.RPC_PPID); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("Origin_PPID: " + CurrentRPC.OriginPPID); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("SetTime: " + CurrentRPC.SetTime); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("STATE: " + CurrentRPC.RPC_STATE); } //초기화 A = A + 1; B = 0; C = 0; D = 0; E = 0; TreeView1.Nodes.Add("07. Film"); foreach (string str in PInfo.LOT()) { InfoAct.clsLOT CurrentLot = PInfo.LOTID(str); B = B + 1; TreeView1.Nodes[A].Nodes.Add(CurrentLot.LOTID); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("Film_CaseI D: " + CurrentLot.LOTID); //TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("PORTID: " + CurrentLot.PortID); InfoAct.clsSlot CurrentSlot = CurrentLot.Slot(1); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("Film_ID : " + CurrentSlot.GlassID); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("Film_Code : " + CurrentSlot.PRODUCTID); TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("Film_Count_HostCMD : " + (CurrentLot.SlotCount + 1)); //TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("Film_Count_Real : " + CurrentLot.FilmCount); //TreeView1.Nodes[A].Nodes[B - 1].Nodes.Add("UseCount: " + CurrentSlot.SlotID); } //초기화 A = A + 1; B = 0; C = 0; D = 0; E = 0; //SVID 테스트용 //this.PInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, "------------------------------------------------------------------------------" + "\r\n"); //for (int dintLoop = 1; dintLoop <= this.PInfo.Unit(0).SubUnit(0).SVIDCount; dintLoop++) //{ // dstrTemp = dstrTemp + FunStringH.funStringData(dintLoop.ToString() + "(" + this.PInfo.Unit(0).SubUnit(0).SVID(dintLoop).Name + ")" + ": ", 45) + this.PInfo.Unit(0).SubUnit(0).SVID(dintLoop).Value + "\r\n"; //} //this.PInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, dstrTemp); //this.PInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, "------------------------------------------------------------------------------" + "\r\n"); } catch (Exception ex) { MessageBox.Show(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]); 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; try { try { m_pEqpAct.subWordReadSave("W2040", 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("", 168, 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; dintJobStart = Convert.ToInt32(dstrValue[44]); dintJobEnd = Convert.ToInt32(dstrValue[45]); 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; pInfo.All.DataCheckGLSID = dstrHGLSID; pInfo.All.HostPPID = dstrValue[13].Trim(); } catch (Exception ex) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString()); } finally { //PLC Req에 대한 CIM의 Confirm Bit를 준다. m_pEqpAct.subSetConfirmBit(strCompBit); } } catch (Exception ex) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString() + ", dstrLOTID:" + dstrLOTID + ", dintSlotID: " + dintSlotID.ToString()); } }
/// <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; int dintUnitID = 0; int dintCount = 0; string dstrFilmID = ""; int dintSlotID = 0; int dintSubUnitID = 0; //[2015/07/07](Add by HS) string dstrJuge = string.Empty; try { arrayEvent = strParameters.Split(','); int dintCEID = Convert.ToInt32(arrayEvent[1]); //CEID dintUnitID = Convert.ToInt32(arrayEvent[5]); //UnitID dstrFilmID = arrayEvent[3]; dintSlotID = Convert.ToInt32(arrayEvent[4]); dintSubUnitID = Convert.ToInt32(arrayEvent[6]); //[2015/07/07](Add by HS) if (arrayEvent.Length > 7 && arrayEvent[7] != "" && arrayEvent[7] != null) { dstrJuge = arrayEvent[7]; } 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(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); if (dintCEID == 1018 || dintCEID == 1019) { pMsgTran.Primary().Item("BYWHO").Putvalue(2); } else { pMsgTran.Primary().Item("BYWHO").Putvalue(3); } pMsgTran.Primary().Item("OPERID").Putvalue(this.pInfo.All.UserID); pMsgTran.Primary().Item("RPTID2").Putvalue(13); //Fixed Value pMsgTran.Primary().Item("GLASSCOUNT").Putvalue(1); //임시 20101015 어우수 InfoAct.clsSlot currentSlot = pInfo.LOTID(dstrFilmID).Slot(dintSlotID); if (currentSlot != null) { pMsgTran.Primary().Item("MATERIAL_ID").Putvalue(currentSlot.H_PANELID); pMsgTran.Primary().Item("MATERIAL_SETID").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); if (dintCEID == 1015) { pMsgTran.Primary().Item("PROD_KIND").Putvalue("FILM"); } else { 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); //[2015/06/30]Scrap과 NG처리를 구분하기위하여(Add by HS) if (dintCEID == 1015) { if (dstrJuge == "OK") { } else if (dstrJuge == "NG") { currentSlot.COMMENT = "C_00007"; } else if (dstrJuge == "SCRAP") { currentSlot.COMMENT = "C_00008"; } } pMsgTran.Primary().Item("COMMENT").Putvalue(currentSlot.COMMENT); pMsgTran.Primary().Item("USE_COUNT").Putvalue(currentSlot.USE_COUNT.PadLeft(3, '0')); //[2015/05/08]Scrap처리를 호스트에서 하지못하여 CEID 1015로 판단하기에 추가(Add by HS) //[2015/06/30]Scrap과 NG처리를 구분하기위하여(Add by HS) if (dintCEID == 1015) { if (dstrJuge == "OK") //OK { currentSlot.JUDGEMENT = "OK"; } else { currentSlot.JUDGEMENT = "NG"; } } 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("STAGE_STATE").Putvalue(currentSlot.PAIR_GLASSID); pMsgTran.Primary().Item("LOCATION").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 { currentSlot = new InfoAct.clsSlot(1); pMsgTran.Primary().Item("MATERIAL_ID").Putvalue(currentSlot.H_PANELID); pMsgTran.Primary().Item("MATERIAL_SETID").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); if (dintCEID == 1015) { pMsgTran.Primary().Item("PROD_KIND").Putvalue("FILM"); } else { 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); //[2015/06/30]Scrap과 NG처리를 구분하기위하여(Add by HS) if (dintCEID == 1015) { if (dstrJuge == "OK") { } else if (dstrJuge == "NG") { currentSlot.COMMENT = "C_00007"; } else if (dstrJuge == "SCRAP") { currentSlot.COMMENT = "C_00008"; } } pMsgTran.Primary().Item("COMMENT").Putvalue(currentSlot.COMMENT); pMsgTran.Primary().Item("USE_COUNT").Putvalue(currentSlot.USE_COUNT); //[2015/05/08]Scrap처리를 호스트에서 하지못하여 CEID 1015로 판단하기에 추가(Add by HS) //[2015/06/30]Scrap과 NG처리를 구분하기위하여(Add by HS) if (dintCEID == 1015) { if (dstrJuge == "OK") //OK { currentSlot.JUDGEMENT = "OK"; } else { currentSlot.JUDGEMENT = "NG"; } } 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("STAGE_STATE").Putvalue(currentSlot.PAIR_GLASSID); pMsgTran.Primary().Item("LOCATION").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]); } 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(','); 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(82); //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); pMsgTran.Primary().Item("H_GLASSID" + 0).Putvalue(currentSlot.H_PANELID); pMsgTran.Primary().Item("E_GLASSID" + 0).Putvalue(currentSlot.E_PANELID); pMsgTran.Primary().Item("LOTID" + 0).Putvalue(currentSlot.LOTID); pMsgTran.Primary().Item("BATCHID" + 0).Putvalue(currentSlot.BATCHID); pMsgTran.Primary().Item("JOBID" + 0).Putvalue(currentSlot.JOBID); pMsgTran.Primary().Item("PORTID" + 0).Putvalue(currentSlot.PORTID); pMsgTran.Primary().Item("SLOTNO" + 0).Putvalue(currentSlot.SLOTNO); pMsgTran.Primary().Item("PRODUCT_TYPE" + 0).Putvalue(currentSlot.PRODUCT_TYPE); pMsgTran.Primary().Item("PRODUCT_KIND" + 0).Putvalue(currentSlot.PRODUCT_KIND); pMsgTran.Primary().Item("PRODUCTID" + 0).Putvalue(currentSlot.PRODUCTID); pMsgTran.Primary().Item("RUNSPECID" + 0).Putvalue(currentSlot.RUNSPECID); pMsgTran.Primary().Item("LAYERID" + 0).Putvalue(currentSlot.LAYERID); pMsgTran.Primary().Item("STEPID" + 0).Putvalue(currentSlot.STEPID); pMsgTran.Primary().Item("PPID" + 0).Putvalue(currentSlot.HOSTPPID); pMsgTran.Primary().Item("FLOWID" + 0).Putvalue(currentSlot.FLOWID); pMsgTran.Primary().Item("SIZE" + 0).Putvalue(currentSlot.SIZE); pMsgTran.Primary().Item("THICKNESS" + 0).Putvalue(currentSlot.THICKNESS); pMsgTran.Primary().Item("STATE" + 0).Putvalue(currentSlot.GLASS_STATE); pMsgTran.Primary().Item("ORDER" + 0).Putvalue(currentSlot.GLASS_ORDER); pMsgTran.Primary().Item("COMMENT" + 0).Putvalue(currentSlot.COMMENT); pMsgTran.Primary().Item("USE_COUNT" + 0).Putvalue(currentSlot.USE_COUNT); pMsgTran.Primary().Item("JUDGEMENT" + 0).Putvalue(currentSlot.JUDGEMENT); pMsgTran.Primary().Item("REASON_CODE" + 0).Putvalue(currentSlot.REASON_CODE); pMsgTran.Primary().Item("INS_FLAG" + 0).Putvalue(currentSlot.INS_FLAG); pMsgTran.Primary().Item("ENC_FLAG" + 0).Putvalue(currentSlot.ENC_FLAG); pMsgTran.Primary().Item("PRERUN_FLAG" + 0).Putvalue(currentSlot.PRERUN_FLAG); pMsgTran.Primary().Item("TURN_DIR" + 0).Putvalue(currentSlot.TURN_DIR); pMsgTran.Primary().Item("FLIP_STATE" + 0).Putvalue(currentSlot.FLIP_STATE); pMsgTran.Primary().Item("WORK_STATE" + 0).Putvalue(currentSlot.WORK_STATE); pMsgTran.Primary().Item("MULTI_USE" + 0).Putvalue(currentSlot.MULTI_USE); pMsgTran.Primary().Item("PAIR_GLASSID" + 0).Putvalue(currentSlot.PAIR_GLASSID); pMsgTran.Primary().Item("PAIR_PPID" + 0).Putvalue(currentSlot.PAIR_PPID); pMsgTran.Primary().Item("OPTION_NAME1" + 0).Putvalue(currentSlot.OPTION_NAME[0]); pMsgTran.Primary().Item("OPTION_VALUE1" + 0).Putvalue(currentSlot.OPTION_VALUE[0]); pMsgTran.Primary().Item("OPTION_NAME2" + 0).Putvalue(currentSlot.OPTION_NAME[1]); pMsgTran.Primary().Item("OPTION_VALUE2" + 0).Putvalue(currentSlot.OPTION_VALUE[1]); pMsgTran.Primary().Item("OPTION_NAME3" + 0).Putvalue(currentSlot.OPTION_NAME[2]); pMsgTran.Primary().Item("OPTION_VALUE3" + 0).Putvalue(currentSlot.OPTION_VALUE[2]); pMsgTran.Primary().Item("OPTION_NAME4" + 0).Putvalue(currentSlot.OPTION_NAME[3]); pMsgTran.Primary().Item("OPTION_VALUE4" + 0).Putvalue(currentSlot.OPTION_VALUE[3]); pMsgTran.Primary().Item("OPTION_NAME5" + 0).Putvalue(currentSlot.OPTION_NAME[4]); pMsgTran.Primary().Item("OPTION_VALUE5" + 0).Putvalue(currentSlot.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(0).SubUnit(0).ModuleID); pMsgTran.Primary().Item("RAWPATH").Putvalue("RAWPATH"); pMsgTran.Primary().Item("RAWPATH_Value").Putvalue(pInfo.All.RAWPATH); pMsgTran.Primary().Item("SUMPATH").Putvalue("SUMPATH"); pMsgTran.Primary().Item("SUMPATH_VALUE").Putvalue(pInfo.All.SUMPATH); pMsgTran.Primary().Item("IMGPATH").Putvalue("IMGPATH"); pMsgTran.Primary().Item("IMGPATH_VALUE").Putvalue(pInfo.All.IMGPATH); pMsgTran.Primary().Item("DISK").Putvalue("DISK"); pMsgTran.Primary().Item("DISK_VALUE").Putvalue(pInfo.All.DISK); 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(','); string dstrLOTID = arrayEvent[1].Trim(); //LOTID int dintSlotID = Convert.ToInt32(arrayEvent[2]); //SlotID string dstrHGLSID = arrayEvent[3].Trim(); pMsgTran = pSecsDrv.MakeTransaction(this.StrPrimaryMsgName); pMsgTran.Primary().Item("DATAID").Putvalue(0); //Fixed Value pMsgTran.Primary().Item("CEID").Putvalue(91); //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); pMsgTran.Primary().Item("H_GLASSID" + 0).Putvalue(currentSlot.H_PANELID); pMsgTran.Primary().Item("E_GLASSID" + 0).Putvalue(currentSlot.E_PANELID); pMsgTran.Primary().Item("LOTID" + 0).Putvalue(currentSlot.LOTID); pMsgTran.Primary().Item("BATCHID" + 0).Putvalue(currentSlot.BATCHID); pMsgTran.Primary().Item("JOBID" + 0).Putvalue(currentSlot.JOBID); pMsgTran.Primary().Item("PORTID" + 0).Putvalue(currentSlot.PORTID); pMsgTran.Primary().Item("SLOTNO" + 0).Putvalue(currentSlot.SLOTNO); pMsgTran.Primary().Item("PROD_TYPE" + 0).Putvalue(currentSlot.PRODUCT_TYPE); pMsgTran.Primary().Item("PROD_KIND" + 0).Putvalue(currentSlot.PRODUCT_KIND); pMsgTran.Primary().Item("PRODUCTID" + 0).Putvalue(currentSlot.PRODUCTID); pMsgTran.Primary().Item("RUNSPECID" + 0).Putvalue(currentSlot.RUNSPECID); pMsgTran.Primary().Item("LAYERID" + 0).Putvalue(currentSlot.LAYERID); pMsgTran.Primary().Item("STEPID" + 0).Putvalue(currentSlot.STEPID); pMsgTran.Primary().Item("PPID" + 0).Putvalue(currentSlot.HOSTPPID); pMsgTran.Primary().Item("FLOWID" + 0).Putvalue(currentSlot.FLOWID); pMsgTran.Primary().Item("SIZE" + 0).Putvalue(currentSlot.SIZE); pMsgTran.Primary().Item("THICKNESS" + 0).Putvalue(currentSlot.THICKNESS); pMsgTran.Primary().Item("STATE" + 0).Putvalue(currentSlot.GLASS_STATE); pMsgTran.Primary().Item("ORDER" + 0).Putvalue(currentSlot.GLASS_ORDER); pMsgTran.Primary().Item("COMMENT" + 0).Putvalue(currentSlot.COMMENT); //LOT 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(0).SubUnit(0).ModuleID); int dintLotApdCount = this.pInfo.Unit(0).SubUnit(0).LOTAPDCount; pMsgTran.Primary().Item("DATACOUNT" + 0).Putvalue(dintLotApdCount); for (int dintLoop = 1; dintLoop <= dintLotApdCount; dintLoop++) { InfoAct.clsLOTAPD lotApd = this.pInfo.LOTID(dstrLOTID).LOTAPD(dintLoop); pMsgTran.Primary().Item("DATA_ITEM" + 0 + (dintLoop - 1)).Putvalue(lotApd.Name); pMsgTran.Primary().Item("DATA_VALUE" + 0 + (dintLoop - 1)).Putvalue(lotApd.Value); } 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> /// 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]; 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 dintSlotID = 0; try { arrayEvent = strParameters.Split(','); int dintBYWHO = 0; int dintCEID = Convert.ToInt32(arrayEvent[1]); //CEID int dintPortID = Convert.ToInt32(arrayEvent[2]); int dintUnitID = Convert.ToInt32(arrayEvent[3]); int dintSubUnitID = Convert.ToInt32(arrayEvent[4]); if (dintCEID == 1006 || dintCEID == 1007 || dintCEID == 1001 || dintCEID == 1004) { //if (arrayEvent.Length == 6) //{ dstrLOTID = arrayEvent[5].ToString(); dintSlotID = Convert.ToInt32(arrayEvent[6].ToString()); //} } InfoAct.clsPort CurrentPort = pInfo.Port(dintPortID); 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("MODULE_STATE").Putvalue(pInfo.Unit(0).SubUnit(0).EQPState); pMsgTran.Primary().Item("MCMD").Putvalue(pInfo.All.ControlState); pMsgTran.Primary().Item("PROC_STATE").Putvalue(pInfo.Unit(0).SubUnit(0).EQPProcessState); //각 CEID별로 BYWHO값을 설정한다. switch (dintCEID) { case 111: dintBYWHO = 3; break; case 113: dintBYWHO = 3; break; case 114: dintBYWHO = 4; break; default: dintBYWHO = 3; break; } //InfoAct.clsSlot currentSlot = pInfo.LOTID(dstrLOTID).Slot(dintSlotID); pMsgTran.Primary().Item("BYWHO").Putvalue(dintBYWHO); pMsgTran.Primary().Item("OPERID").Putvalue(pInfo.All.UserID); //면취기는 자체 PORT가 없어 PORTID 이외의 정보를 가지고 있지 않으므로, 협의후 확정될때 까지 무시한다. 20101018 어우수 pMsgTran.Primary().Item("RPTID1").Putvalue(2); //Fixed Value pMsgTran.Primary().Item("PORTID").Putvalue(CurrentPort.HostReportPortID); pMsgTran.Primary().Item("PORT_STATE").Putvalue(CurrentPort.PortState); pMsgTran.Primary().Item("PORT_TYPE").Putvalue(CurrentPort.PortType); pMsgTran.Primary().Item("PORT_MODE").Putvalue("OK"); pMsgTran.Primary().Item("SORT_TYPE").Putvalue("0"); //면취기는 자체 PORT가 없어 CST 정보를 가지고 있지 않으므로, 협의후 확정될때까지 무시한다. 20101018 어우수 pMsgTran.Primary().Item("RPTID2").Putvalue(3); //Fixed Value pMsgTran.Primary().Item("CSTID").Putvalue(CurrentPort.CSTID); if (dintUnitID == 1) { pMsgTran.Primary().Item("CST_TYPE").Putvalue("12"); } else { pMsgTran.Primary().Item("CST_TYPE").Putvalue("13"); } pMsgTran.Primary().Item("MAP_STIF").Putvalue(CurrentPort.GLSHostMapping10); pMsgTran.Primary().Item("CUR_STIF").Putvalue(CurrentPort.GLSRealMapping10); pMsgTran.Primary().Item("BATCH_ORDER").Putvalue(CurrentPort.BATCH_ORDER); pMsgTran.Primary().Item("RPTID3").Putvalue(10); //Fixed Value pMsgTran.Primary().Item("GLASSCOUNT").Putvalue(1); //임시 20101018 어우수 if (dintCEID == 1006 || dintCEID == 1007) { //InfoAct.clsSlot currentSlot = new InfoAct.clsSlot(1); InfoAct.clsSlot currentSlot = pInfo.LOTID(dstrLOTID).Slot(dintSlotID); pMsgTran.Primary().Item("H_GLASSID" + 0).Putvalue(currentSlot.GlassID); pMsgTran.Primary().Item("E_GLASSID" + 0).Putvalue(currentSlot.E_PANELID); pMsgTran.Primary().Item("LOTID" + 0).Putvalue(currentSlot.LOTID); pMsgTran.Primary().Item("BATCHID" + 0).Putvalue(currentSlot.BATCHID); pMsgTran.Primary().Item("JOBID" + 0).Putvalue(currentSlot.JOBID); pMsgTran.Primary().Item("PORTID1" + 0).Putvalue(currentSlot.PORTID.Trim()); pMsgTran.Primary().Item("SLOTNO" + 0).Putvalue(currentSlot.SLOTNO); pMsgTran.Primary().Item("PROD_TYPE" + 0).Putvalue(currentSlot.PRODUCT_TYPE); pMsgTran.Primary().Item("PROD_KIND" + 0).Putvalue(currentSlot.PRODUCT_KIND); pMsgTran.Primary().Item("PRODUCTID" + 0).Putvalue(currentSlot.PRODUCTID); pMsgTran.Primary().Item("RUNSPECID" + 0).Putvalue(currentSlot.RUNSPECID); pMsgTran.Primary().Item("LAYERID" + 0).Putvalue(currentSlot.LAYERID); pMsgTran.Primary().Item("STEPID" + 0).Putvalue(currentSlot.STEPID); pMsgTran.Primary().Item("PPID" + 0).Putvalue(currentSlot.HOSTPPID); pMsgTran.Primary().Item("FLOWID" + 0).Putvalue(currentSlot.FLOWID); pMsgTran.Primary().Item("SIZE" + 0).Putvalue(currentSlot.SIZE); pMsgTran.Primary().Item("THICKNESS" + 0).Putvalue(currentSlot.THICKNESS); pMsgTran.Primary().Item("STATE" + 0).Putvalue(currentSlot.GLASS_STATE); pMsgTran.Primary().Item("ORDER" + 0).Putvalue(currentSlot.GLASS_ORDER); pMsgTran.Primary().Item("COMMENT" + 0).Putvalue(currentSlot.COMMENT); pMsgTran.Primary().Item("USE_COUNT" + 0).Putvalue(currentSlot.USE_COUNT); pMsgTran.Primary().Item("JUDGEMENT" + 0).Putvalue(currentSlot.JUDGEMENT); pMsgTran.Primary().Item("REASON_CODE" + 0).Putvalue(currentSlot.REASON_CODE); pMsgTran.Primary().Item("INS_FLAG" + 0).Putvalue(currentSlot.INS_FLAG); pMsgTran.Primary().Item("ENC_FALG" + 0).Putvalue(currentSlot.ENC_FLAG); pMsgTran.Primary().Item("PRERUN_FLAG" + 0).Putvalue(currentSlot.PRERUN_FLAG); pMsgTran.Primary().Item("TURN_DIR" + 0).Putvalue(currentSlot.TURN_DIR); pMsgTran.Primary().Item("FLIP_STATE" + 0).Putvalue(currentSlot.FLIP_STATE); pMsgTran.Primary().Item("WORK_STATE" + 0).Putvalue(currentSlot.WORK_STATE); pMsgTran.Primary().Item("MULTI_USE" + 0).Putvalue(currentSlot.MULTI_USE); pMsgTran.Primary().Item("PAIR_GLASSID" + 0).Putvalue(currentSlot.PAIR_GLASSID); pMsgTran.Primary().Item("PAIR_PPID" + 0).Putvalue(currentSlot.PAIR_PPID); pMsgTran.Primary().Item("OPTION_NAME1" + 0).Putvalue(currentSlot.OPTION_NAME[0]); pMsgTran.Primary().Item("OPTION_VALUE1" + 0).Putvalue(currentSlot.OPTION_VALUE[0]); pMsgTran.Primary().Item("OPTION_NAME2" + 0).Putvalue(currentSlot.OPTION_NAME[1]); pMsgTran.Primary().Item("OPTION_VALUE2" + 0).Putvalue(currentSlot.OPTION_VALUE[1]); pMsgTran.Primary().Item("OPTION_NAME3" + 0).Putvalue(currentSlot.OPTION_NAME[2]); pMsgTran.Primary().Item("OPTION_VALUE3" + 0).Putvalue(currentSlot.OPTION_VALUE[2]); pMsgTran.Primary().Item("OPTION_NAME4" + 0).Putvalue(currentSlot.OPTION_NAME[3]); pMsgTran.Primary().Item("OPTION_VALUE4" + 0).Putvalue(currentSlot.OPTION_VALUE[3]); pMsgTran.Primary().Item("OPTION_NAME5" + 0).Putvalue(currentSlot.OPTION_NAME[4]); pMsgTran.Primary().Item("OPTION_VALUE5" + 0).Putvalue(currentSlot.OPTION_VALUE[4]); pMsgTran.Primary().Item("SUBMATERIALCOUNT" + 0).Putvalue(0); } else if (dintCEID == 1001 || dintCEID == 1004) { InfoAct.clsSlot currentSlot = pInfo.LOTID(dstrLOTID).Slot(dintSlotID); if (currentSlot == null) { pInfo.LOTID(dstrLOTID).AddSlot(dintSlotID); currentSlot = pInfo.LOTID(dstrLOTID).Slot(dintSlotID); currentSlot.USE_COUNT = dintSlotID.ToString(); } pMsgTran.Primary().Item("H_GLASSID" + 0).Putvalue(currentSlot.GlassID); pMsgTran.Primary().Item("E_GLASSID" + 0).Putvalue(currentSlot.E_PANELID); pMsgTran.Primary().Item("LOTID" + 0).Putvalue(currentSlot.LOTID); pMsgTran.Primary().Item("BATCHID" + 0).Putvalue(currentSlot.BATCHID); pMsgTran.Primary().Item("JOBID" + 0).Putvalue(currentSlot.JOBID); pMsgTran.Primary().Item("PORTID1" + 0).Putvalue(currentSlot.PORTID.Trim()); pMsgTran.Primary().Item("SLOTNO" + 0).Putvalue(currentSlot.SLOTNO); pMsgTran.Primary().Item("PROD_TYPE" + 0).Putvalue(currentSlot.PRODUCT_TYPE); pMsgTran.Primary().Item("PROD_KIND" + 0).Putvalue(currentSlot.PRODUCT_KIND); pMsgTran.Primary().Item("PRODUCTID" + 0).Putvalue(currentSlot.PRODUCTID); pMsgTran.Primary().Item("RUNSPECID" + 0).Putvalue(currentSlot.RUNSPECID); pMsgTran.Primary().Item("LAYERID" + 0).Putvalue(currentSlot.LAYERID); pMsgTran.Primary().Item("STEPID" + 0).Putvalue(currentSlot.STEPID); pMsgTran.Primary().Item("PPID" + 0).Putvalue(currentSlot.HOSTPPID); pMsgTran.Primary().Item("FLOWID" + 0).Putvalue(currentSlot.FLOWID); pMsgTran.Primary().Item("SIZE" + 0).Putvalue(currentSlot.SIZE); pMsgTran.Primary().Item("THICKNESS" + 0).Putvalue(currentSlot.THICKNESS); pMsgTran.Primary().Item("STATE" + 0).Putvalue(currentSlot.GLASS_STATE); pMsgTran.Primary().Item("ORDER" + 0).Putvalue(currentSlot.GLASS_ORDER); pMsgTran.Primary().Item("COMMENT" + 0).Putvalue(currentSlot.COMMENT); pMsgTran.Primary().Item("USE_COUNT" + 0).Putvalue(currentSlot.USE_COUNT); pMsgTran.Primary().Item("JUDGEMENT" + 0).Putvalue(currentSlot.JUDGEMENT); pMsgTran.Primary().Item("REASON_CODE" + 0).Putvalue(currentSlot.REASON_CODE); pMsgTran.Primary().Item("INS_FLAG" + 0).Putvalue(currentSlot.INS_FLAG); pMsgTran.Primary().Item("ENC_FALG" + 0).Putvalue(currentSlot.ENC_FLAG); pMsgTran.Primary().Item("PRERUN_FLAG" + 0).Putvalue(currentSlot.PRERUN_FLAG); pMsgTran.Primary().Item("TURN_DIR" + 0).Putvalue(currentSlot.TURN_DIR); pMsgTran.Primary().Item("FLIP_STATE" + 0).Putvalue(currentSlot.FLIP_STATE); pMsgTran.Primary().Item("WORK_STATE" + 0).Putvalue(currentSlot.WORK_STATE); pMsgTran.Primary().Item("MULTI_USE" + 0).Putvalue(currentSlot.MULTI_USE); pMsgTran.Primary().Item("PAIR_GLASSID" + 0).Putvalue(currentSlot.PAIR_GLASSID); pMsgTran.Primary().Item("PAIR_PPID" + 0).Putvalue(currentSlot.PAIR_PPID); pMsgTran.Primary().Item("OPTION_NAME1" + 0).Putvalue(currentSlot.OPTION_NAME[0]); pMsgTran.Primary().Item("OPTION_VALUE1" + 0).Putvalue(currentSlot.OPTION_VALUE[0]); pMsgTran.Primary().Item("OPTION_NAME2" + 0).Putvalue(currentSlot.OPTION_NAME[1]); pMsgTran.Primary().Item("OPTION_VALUE2" + 0).Putvalue(currentSlot.OPTION_VALUE[1]); pMsgTran.Primary().Item("OPTION_NAME3" + 0).Putvalue(currentSlot.OPTION_NAME[2]); pMsgTran.Primary().Item("OPTION_VALUE3" + 0).Putvalue(currentSlot.OPTION_VALUE[2]); pMsgTran.Primary().Item("OPTION_NAME4" + 0).Putvalue(currentSlot.OPTION_NAME[3]); pMsgTran.Primary().Item("OPTION_VALUE4" + 0).Putvalue(currentSlot.OPTION_VALUE[3]); pMsgTran.Primary().Item("OPTION_NAME5" + 0).Putvalue(currentSlot.OPTION_NAME[4]); pMsgTran.Primary().Item("OPTION_VALUE5" + 0).Putvalue(currentSlot.OPTION_VALUE[4]); pMsgTran.Primary().Item("SUBMATERIALCOUNT" + 0).Putvalue(0); } else { InfoAct.clsSlot currentSlot = CurrentPort.Slot(1); pMsgTran.Primary().Item("H_GLASSID" + 0).Putvalue(currentSlot.GlassID); pMsgTran.Primary().Item("E_GLASSID" + 0).Putvalue(currentSlot.E_PANELID); pMsgTran.Primary().Item("LOTID" + 0).Putvalue(currentSlot.LOTID); pMsgTran.Primary().Item("BATCHID" + 0).Putvalue(currentSlot.BATCHID); pMsgTran.Primary().Item("JOBID" + 0).Putvalue(currentSlot.JOBID); pMsgTran.Primary().Item("PORTID1" + 0).Putvalue(currentSlot.PORTID.Trim()); pMsgTran.Primary().Item("SLOTNO" + 0).Putvalue(currentSlot.SLOTNO); pMsgTran.Primary().Item("PROD_TYPE" + 0).Putvalue(currentSlot.PRODUCT_TYPE); pMsgTran.Primary().Item("PROD_KIND" + 0).Putvalue(currentSlot.PRODUCT_KIND); pMsgTran.Primary().Item("PRODUCTID" + 0).Putvalue(currentSlot.PRODUCTID); pMsgTran.Primary().Item("RUNSPECID" + 0).Putvalue(currentSlot.RUNSPECID); pMsgTran.Primary().Item("LAYERID" + 0).Putvalue(currentSlot.LAYERID); pMsgTran.Primary().Item("STEPID" + 0).Putvalue(currentSlot.STEPID); pMsgTran.Primary().Item("PPID" + 0).Putvalue(currentSlot.HOSTPPID); pMsgTran.Primary().Item("FLOWID" + 0).Putvalue(currentSlot.FLOWID); pMsgTran.Primary().Item("SIZE" + 0).Putvalue(currentSlot.SIZE); pMsgTran.Primary().Item("THICKNESS" + 0).Putvalue(currentSlot.THICKNESS); pMsgTran.Primary().Item("STATE" + 0).Putvalue(currentSlot.GLASS_STATE); pMsgTran.Primary().Item("ORDER" + 0).Putvalue(currentSlot.GLASS_ORDER); pMsgTran.Primary().Item("COMMENT" + 0).Putvalue(currentSlot.COMMENT); pMsgTran.Primary().Item("USE_COUNT" + 0).Putvalue(currentSlot.USE_COUNT); pMsgTran.Primary().Item("JUDGEMENT" + 0).Putvalue(currentSlot.JUDGEMENT); pMsgTran.Primary().Item("REASON_CODE" + 0).Putvalue(currentSlot.REASON_CODE); pMsgTran.Primary().Item("INS_FLAG" + 0).Putvalue(currentSlot.INS_FLAG); pMsgTran.Primary().Item("ENC_FALG" + 0).Putvalue(currentSlot.ENC_FLAG); pMsgTran.Primary().Item("PRERUN_FLAG" + 0).Putvalue(currentSlot.PRERUN_FLAG); pMsgTran.Primary().Item("TURN_DIR" + 0).Putvalue(currentSlot.TURN_DIR); pMsgTran.Primary().Item("FLIP_STATE" + 0).Putvalue(currentSlot.FLIP_STATE); pMsgTran.Primary().Item("WORK_STATE" + 0).Putvalue(currentSlot.WORK_STATE); pMsgTran.Primary().Item("MULTI_USE" + 0).Putvalue(currentSlot.MULTI_USE); pMsgTran.Primary().Item("PAIR_GLASSID" + 0).Putvalue(currentSlot.PAIR_GLASSID); pMsgTran.Primary().Item("PAIR_PPID" + 0).Putvalue(currentSlot.PAIR_PPID); pMsgTran.Primary().Item("OPTION_NAME1" + 0).Putvalue(currentSlot.OPTION_NAME[0]); pMsgTran.Primary().Item("OPTION_VALUE1" + 0).Putvalue(currentSlot.OPTION_VALUE[0]); pMsgTran.Primary().Item("OPTION_NAME2" + 0).Putvalue(currentSlot.OPTION_NAME[1]); pMsgTran.Primary().Item("OPTION_VALUE2" + 0).Putvalue(currentSlot.OPTION_VALUE[1]); pMsgTran.Primary().Item("OPTION_NAME3" + 0).Putvalue(currentSlot.OPTION_NAME[2]); pMsgTran.Primary().Item("OPTION_VALUE3" + 0).Putvalue(currentSlot.OPTION_VALUE[2]); pMsgTran.Primary().Item("OPTION_NAME4" + 0).Putvalue(currentSlot.OPTION_NAME[3]); pMsgTran.Primary().Item("OPTION_VALUE4" + 0).Putvalue(currentSlot.OPTION_VALUE[3]); pMsgTran.Primary().Item("OPTION_NAME5" + 0).Putvalue(currentSlot.OPTION_NAME[4]); pMsgTran.Primary().Item("OPTION_VALUE5" + 0).Putvalue(currentSlot.OPTION_VALUE[4]); pMsgTran.Primary().Item("SUBMATERIALCOUNT" + 0).Putvalue(0); } 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 = ""; 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()); } }