private void subSemState() { try { if (PInfo.EQP("Main").UDPConnect != pbolSEM) { if (PInfo.EQP("Main").UDPConnect) { lblSEMState.Text = "Connected"; lblSEMState.BackColor = Color.Blue; lblSEMState.ForeColor = Color.White; } else { lblSEMState.Text = "DisConnected"; lblSEMState.BackColor = Color.Red; lblSEMState.ForeColor = Color.White; } pbolSEM = PInfo.EQP("Main").UDPConnect; } } catch (Exception ex) { PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString()); } }
private void tabfrmSetupEQPInfo_Load(object sender, EventArgs e) { try { this.lblLastModified.Text = FunINIMethod.funINIReadValue("ETCInfo", "EQPLastModified", "", this.pInfo.All.SystemINIFilePath); this.txtEQPID.Text = pInfo.EQP("Main").EQPID; this.txtMDLN.Text = pInfo.All.MDLN; this.txtSlotCount.Text = Convert.ToString(pInfo.EQP("Main").SlotCount); this.txtUnitCount.Text = Convert.ToString(pInfo.UnitCount); this.txtKeepDays.Text = pInfo.All.ProcDataKeepDays.ToString(); } catch (Exception ex) { pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString()); } }
private void subSaveButtonCheck() { try { if (PInfo.EQP("Main").UDPStart) //20141106 이원규 (SEM_UDP) { btnSave.Enabled = false; } else { btnSave.Enabled = true; } } catch (Exception ex) { PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString()); } }
private void subSaveButtonCheck() { try { if (PInfo.EQP("Main").RS232Connect) { btnSave.Enabled = false; } else { btnSave.Enabled = true; } } catch (Exception ex) { PInfo.subLog_Set(clsInfo.LogType.CIM, ex.ToString()); } }
//******************************************************************************* // Function Name : tmrControl_Tick() // Description : 프로그램 시작시 폼을 숨기고 프로그램 종료신호를 받아 모든 리소스를 해제후 종료한다. // Parameters : None // Return Value : None // Special Notes : //******************************************************************************* // 2006/11/02 어 경태 [L 00] //******************************************************************************* private void tmrControl_Tick(object sender, EventArgs e) { bool checkFlag = false; try { tmrControl.Enabled = false; if (pgbLoading.Value == 100) { pgbLoading.Value = 0; this.Hide(); } if (pInfo.EQP("Main").MainEQPConnect != ConnectFlag) { ConnectFlag = pInfo.EQP("Main").MainEQPConnect; if (ConnectFlag) { label1.BackColor = Color.Yellow; label1.Text = "Connected"; } else { label1.BackColor = Color.Red; label1.Text = "DisConnected"; } } checkFlag = true; if (pInfo.All.ProgramEnd == true) { this.tmrControl.Enabled = false; subClose(); checkFlag = false; System.Environment.Exit(0); } tmrControl.Enabled = checkFlag; } catch (Exception ex) { this.pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString()); } }
/// <summary> /// INI로부터 값을 읽어들여 각 PLC의 각 값을 설정하고 구조체에 저장후 PLC를 OPEN한다 /// </summary> /// <returns>성공 => True, 실패 => False</returns> public Boolean funOpenPLC() { Boolean bolOpenPort = false; try { this.pEQPAct = new EQPAct.clsEQPAct(); //EQPAct DLL 정의 for (int dintLoop = 1; dintLoop <= 10; dintLoop++) { pEQPAct.PstrBitScanStart[dintLoop] = pInfo.EQP("Main").BitScanStart[dintLoop]; pEQPAct.PstrBitScanEnd[dintLoop] = pInfo.EQP("Main").BitScanEnd[dintLoop]; pEQPAct.PbolBitScanEnabled[dintLoop] = pInfo.EQP("Main").BitScanEnabled[dintLoop]; } pEQPAct.PstrWAreaStart = pInfo.EQP("Main").WordStart; pEQPAct.PstrWAreaEnd = pInfo.EQP("Main").WordEnd; pEQPAct.PbolDummyPLC = pInfo.EQP("Main").DummyPLC; pEQPAct.PstrAddressPath = pAppPath + @"\system"; pEQPAct.PintScanTime = this.pInfo.EQP("Main").ScanTime; //어경태 20071119 pEQPAct.PintWorkingSizeMin = this.pInfo.EQP("Main").WorkingSizeMin; pEQPAct.PintWorkingSizeMax = this.pInfo.EQP("Main").WorkingSizeMax; pEQPAct.PstrTCPIPAddress = "192.168.1.88"; pEQPAct.PstrTCPIPPort = "2048"; //Open을 시도한다. bolOpenPort = this.pEQPAct.funOpenPLC(CommonAct.EnuEQP.CommunicationType.NET10); //리턴값이 True 이면 성공 if (bolOpenPort == true) { this.pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, "PLC Port Open Success"); this.pInfo.subPLCCommand_Set(InfoAct.clsInfo.PLCCommand.MapInitial); //this.pInfo.subPLCCommand_Set(clsInfo.PLCCommand.ECIDRead); } else { //Open이 되지 않아 에러가 발생한 경우 this.pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, "PLC Port Open Fail"); } } catch (Exception ex) { this.pInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString()); } return(bolOpenPort); }
public void subFormInitial() { try { if (PInfo.EQP("Main").PLCConnect) { string EQPState = PInfo.Unit(0).SubUnit(0).EQPState; if (EQPState != null && EQPState != "") { if (EQPState == "1") { this.btnNORMAL.Enabled = false; this.btnPM.Enabled = true; this.btnNORMAL.BackColor = Color.WhiteSmoke; this.btnNORMAL.ForeColor = Color.Black; } else if (EQPState == "3") { this.btnNORMAL.Enabled = true; this.btnPM.Enabled = false; this.btnPM.BackColor = Color.WhiteSmoke; this.btnPM.ForeColor = Color.Black; } } } else { btnNORMAL.Enabled = false; btnPM.Enabled = false; this.btnNORMAL.BackColor = Color.WhiteSmoke; this.btnNORMAL.ForeColor = Color.Black; this.btnPM.BackColor = Color.WhiteSmoke; this.btnPM.ForeColor = Color.Black; } } catch (Exception ex) { this.PInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString()); } }
public void subFormInitial() { try { if (PInfo.EQP("Main").PLCConnect) { if (PInfo.Unit(0).SubUnit(0).EQPProcessState != "4") { btnResume.Enabled = false; btnPause.Enabled = true; this.btnPause.BackColor = Color.WhiteSmoke; this.btnPause.ForeColor = Color.Black; } else { btnPause.Enabled = false; btnResume.Enabled = true; this.btnResume.BackColor = Color.WhiteSmoke; this.btnResume.ForeColor = Color.Black; } } else { btnPause.Enabled = false; btnResume.Enabled = false; this.btnPause.BackColor = Color.WhiteSmoke; this.btnPause.ForeColor = Color.Black; this.btnResume.BackColor = Color.WhiteSmoke; this.btnResume.ForeColor = Color.Black; } } catch (Exception ex) { this.PInfo.subLog_Set(InfoAct.clsInfo.LogType.CIM, ex.ToString()); } }