public void BindDatas(string BehaelterID) { glb_DataBinding.AddList(this.Name, "LEDOben", "State", "DB50.T" + BehaelterID + "_CMDManuObenActivate"); glb_DataBinding.AddList(this.Name, "LEDUnten", "State", "DB50.T" + BehaelterID + "_CMDManuUntenActivate"); glb_DataBinding.AddList(this.Name, "LEDMode", "State", "DB50.T" + BehaelterID + "_ModeManuAuto"); glb_DataBinding.AddList(this.Name, "TXTState", "Text", "DB50.T" + BehaelterID + "_State"); glb_DataBinding.AddList(this.Name, "LifterState", "State", "DB50.T" + BehaelterID + "_State"); glb_DataBinding.AddList(this.Name, "ValveState", "Mode", "DB50.T" + BehaelterID + "_ModeManuAuto"); this.BTN_Oben.Symbol = "DB50.T" + BehaelterID + "_CMDManuObenActivate"; this.BTN_Unten.Symbol = "DB50.T" + BehaelterID + "_CMDManuUntenActivate"; this.BTN_Mode.Symbol = "DB50.T" + BehaelterID + "_ModeManuAuto"; }
public void BindDatas(string ValveID) { glb_DataBinding.AddList(this.Name, "LEDOpen", "State", "DB50.V" + ValveID + "_CMDManuOpen"); glb_DataBinding.AddList(this.Name, "LEDClose", "State", "DB50.V" + ValveID + "_CMDManuClose"); glb_DataBinding.AddList(this.Name, "LEDMode", "State", "DB50.V" + ValveID + "_ModeManuAuto"); glb_DataBinding.AddList(this.Name, "TXTState", "Text", "DB50.V" + ValveID + "_State"); glb_DataBinding.AddList(this.Name, "ValveState", "State", "DB50.V" + ValveID + "_State"); glb_DataBinding.AddList(this.Name, "ValveState", "Mode", "DB50.V" + ValveID + "_ModeManuAuto"); this.BTNOpen.Symbol = "DB50.V" + ValveID + "_CMDManuOpen"; this.BTN_Close.Symbol = "DB50.V" + ValveID + "_CMDManuClose"; this.BTN_Mode.Symbol = "DB50.V" + ValveID + "_ModeManuAuto"; }
private void CreateSymbols() { int pageNr = 0; string symbolName = ""; string groupName = ""; string comment = ""; string groupNameBefore = ""; int row = 0; GroupBox groupBoxBefore = null; GroupBox groupBox = null; foreach (PLCDatas data in m_glb_PLC.Daten) { if (data.DatabaseNumber == 54) { m_Releases.Add(data.Symbolname, data.Comment); } } List <string> sortList = m_Releases.Keys.ToList(); sortList.Sort(); groupNameBefore = ""; int topGroupBox = 0; int colomnGroupBox = 0; int tabPagegheight = 0; int rest = 0; foreach (string symbol in sortList) { symbolName = symbol; comment = m_Releases[symbolName]; string[] kom = comment.Split(':'); comment = kom[1]; groupName = kom[0]; if (groupNameBefore != groupName) { row = 0; if (groupBoxBefore == null) { topGroupBox = GlobalVar.Const_ControlSpacing; colomnGroupBox = 0; } else { tabPagegheight = this.m_TabControlDaten.Height - this.m_TabControlDaten.ItemSize.Height - 8; rest = tabPagegheight - groupBoxBefore.Top - groupBoxBefore.Height - GlobalVar.Const_GroupBoxOffsetRest; if (rest < 0) { topGroupBox = GlobalVar.Const_ControlSpacing; colomnGroupBox++; if (colomnGroupBox > 1) { colomnGroupBox = 0; groupBoxBefore = null; row = 0; this.CreatePage(); pageNr++; } } else { topGroupBox = groupBoxBefore.Top + groupBoxBefore.Height + GlobalVar.Const_ControlSpacing; } } groupBox = this.CreateGB(pageNr); groupBox.Top = topGroupBox; groupBox.Left = colomnGroupBox * (GlobalVar.Const_GroupBoxWidth + GlobalVar.Const_ControlSpacing) + GlobalVar.Const_ControlSpacing; groupBox.Width = GlobalVar.Const_GroupBoxWidth; groupBox.Text = groupName; groupNameBefore = groupName; groupBoxBefore = groupBox; } tabPagegheight = this.m_TabControlDaten.Height - this.m_TabControlDaten.ItemSize.Height - 8; rest = tabPagegheight - groupBox.Top - groupBox.Height - GlobalVar.Const_GroupBoxOffsetRest;; if (rest < 0) { colomnGroupBox++; if (colomnGroupBox > 1) { colomnGroupBox = 0; groupBoxBefore = null; row = 0; this.CreatePage(); pageNr++; } row = 0; topGroupBox = GlobalVar.Const_ControlSpacing; groupBox = this.CreateGB(pageNr); groupBox.Top = topGroupBox; groupBox.Left = colomnGroupBox * (GlobalVar.Const_GroupBoxWidth + GlobalVar.Const_ControlSpacing) + GlobalVar.Const_ControlSpacing; groupBox.Width = GlobalVar.Const_GroupBoxWidth; groupBox.Text = groupName; groupNameBefore = groupName; groupBoxBefore = groupBox; } int ledTop = row * (GlobalVar.Const_LedHeigt + GlobalVar.Const_LedSpacing) + GlobalVar.Const_GroupBoxOffset; LedRound led = this.CreateLED(groupBox); led.Type = LEDType.Release; led.Name = FuncGeneral.GetControlName(led); led.Top = ledTop; led.Left = GlobalVar.Const_ControlSpacing; m_glb_DataBinding.AddList(this.Name, led.Name.ToString(), "State", "DB54." + symbolName); row++; groupBox.Height = row * (GlobalVar.Const_LedHeigt + GlobalVar.Const_LedSpacing) + GlobalVar.Const_GroupBoxOffset + GlobalVar.Const_LedSpacing; Label lbl = this.CreateLBL(groupBox); lbl.Top = led.Top; lbl.Height = led.Height; lbl.Left = led.Left + led.Width + GlobalVar.Const_ControlSpacing; lbl.Width = GlobalVar.Const_GroupBoxWidth - lbl.Left - GlobalVar.Const_ControlSpacing; lbl.Text = comment; } }
private void BindConrols() { glb_DataBinding.AddList(this.Name, this.TXT_Watchdog.Name.ToString(), "Text", "DB52.PLC_WatchDog"); }
private void LoadComponentBindings() { //Wasserklreislauf //Pipes string[] pipes = new string[] { "F101", "F102", "F103", "F104", "F105", "F106", "F107", "F108", "F109", "F110", "F111", "F112", "F113", "F114", "F115", "F116", "F201", "F202", "F203", "F204", "F205", "F301", "F302", "F303", "F304", "F401", "F402", "F403", "F404", "F405", "F406", "F407", "F500", "F600", "F601", "F602", "F603", "F604", "F605", "F606", "F607", "F608", "F609", "F610", "F611", "F612", "F613", "F614", "F615", "F616", "F617", "F618", "F619", "F620", "F621", "F622", "F623" }; foreach (string pipe in pipes) { glb_DataBinding.AddList(this.Name, "Pipe" + pipe, "Flow", "DB50." + pipe + "_FlowOffOn"); } //Wasserklreislauf //Klappen string[] valves = new string[] { "V100", "V110", "V120", "V130", "V140", "V200", "V210", "V220", "V300", "V310", "V320", "V400", "V410", "V420", "V500", "V510", "V600", "V610", "V620", "V630", "V640", "V650", "V660", "V670", "V680", "V690", "V700", "V710" }; foreach (string valve in valves) { glb_DataBinding.AddList(this.Name, "Valve" + valve, "Mode", "DB50." + valve + "_ModeManuAuto"); glb_DataBinding.AddList(this.Name, "Valve" + valve, "State", "DB50." + valve + "_State"); } //Behalter glb_DataBinding.AddList(this.Name, this.LifterT1.Name.ToString(), "State", "DB50.T1_State"); //Schrittketteninfo glb_DataBinding.AddList(this.Name, this.TXT_Watchdog.Name.ToString(), "Text", "DB52.SK_SchrittNummer"); glb_DataBinding.AddList(this.Name, this.BTN_Error.Name.ToString(), "PictureNumber", "DB52.Sammelfehler"); glb_DataBinding.AddList(this.Name, this.LED_SK_Fehler.Name.ToString(), "State", "DB52.SK_Fehler"); glb_DataBinding.AddList(this.Name, this.LED_SK_Aktive.Name.ToString(), "State", "DB52.SK_Aktiv"); glb_DataBinding.AddList(this.Name, this.TXT_Watchdog.Name.ToString(), "Text", "DB52.PLC_WatchDog"); glb_DataBinding.AddList(this.Name, this.TXT_SK_Nummer.Name.ToString(), "Text", "DB52.SK_SchrittNummer"); glb_DataBinding.AddList(this.Name, this.TXT_SK_FunktionsNummer.Name.ToString(), "Text", "DB52.SK_FunkionsNummer"); glb_DataBinding.AddList(this.Name, this.TXT_SK_Restzeit.Name.ToString(), "Text", "DB52.SK_Restzeit"); //Leckagetest glb_DataBinding.AddList(this.Name, this.WT_FS121.Name.ToString(), "Value", "DB50.FS121_Value"); glb_DataBinding.AddList(this.Name, this.WT_FS121.Name.ToString(), "Error", "DB50.FS121_Error"); glb_DataBinding.AddList(this.Name, this.WT_FS131.Name.ToString(), "Value", "DB50.FS131_Value"); glb_DataBinding.AddList(this.Name, this.WT_FS131.Name.ToString(), "Error", "DB50.FS131_Error"); glb_DataBinding.AddList(this.Name, this.WT_FS141.Name.ToString(), "Value", "DB50.FS141_Value"); glb_DataBinding.AddList(this.Name, this.WT_FS141.Name.ToString(), "Error", "DB50.FS141_Error"); //Pumpe glb_DataBinding.AddList(this.Name, this.pump1.Name.ToString(), "State", "DB50.P1_State"); glb_DataBinding.AddList(this.Name, this.TXT_P1Speed.Name.ToString(), "Text", "DB50.P1_SetSpeed"); //Klappe glb_DataBinding.AddList(this.Name, this.ValveV510.Name.ToString(), "Rotation", "DB50.P1_SetBypass"); glb_DataBinding.AddList(this.Name, this.TXT_V510.Name.ToString(), "Text", "DB50.P1_SetBypass"); //Druck und Temperaturen glb_DataBinding.AddList(this.Name, this.TXT_B13.Name.ToString(), "Text", "DB50.WKL_B13_Druck"); glb_DataBinding.AddList(this.Name, this.TXT_B15.Name.ToString(), "Text", "DB50.WKL_B15_Druck"); glb_DataBinding.AddList(this.Name, this.TXT_B16.Name.ToString(), "Text", "DB50.WKL_B16_Druck"); glb_DataBinding.AddList(this.Name, this.TXT_B17.Name.ToString(), "Text", "DB50.WKL_B17_Druck"); glb_DataBinding.AddList(this.Name, this.TXT_B18.Name.ToString(), "Text", "DB50.WKL_B18_Druck"); glb_DataBinding.AddList(this.Name, this.TXT_B14.Name.ToString(), "Text", "DB50.WKL_B14_Temperatur"); }