public udtCrio(Plc plc, int DB, int DBB, Real_Tag_Entitys rte, string name) { this.PLC = plc; this.DB = DB; this.DBB = DBB; this.name = name; this.rte = rte; if (this.rte.crio.Find(this.DB, this.DBB) == null) { try { crio vCrio = new crio { name = this.name, DB = this.DB, DBB = this.DBB, AutoMode = this.bAutoMode, Blocked = this.bBlocked, Error = this.bError, PowerOn = this.bPowerOn, TurnOn = this.bTurnOn }; this.rte.crio.Add(vCrio); this.rte.SaveChanges(); } catch (Exception ex) { MessageBox.Show(ex.InnerException.ToString()); } } }
public Real_type(Plc plc, int DB, int DBB, Real_Tag_Entitys rte, string name) { this.PLC = plc; this.DB = DB; this.DBB = DBB; this.name = name; this.rte = rte; if (this.rte.real.Find(this.DB, this.DBB) == null) { try { real real_tag = new real { name = this.name, DB = this.DB, DBB = this.DBB, }; this.rte.real.Add(real_tag); this.rte.SaveChanges(); } catch (Exception ex) { MessageBox.Show(ex.InnerException.ToString()); } } }
public udtValve(Plc plc, int DB, int DBB, Real_Tag_Entitys rte, string name) { this.PLC = plc; this.DB = DB; this.DBB = DBB; this.name = name; this.rte = rte; if (this.rte.valves.Find(this.DB, this.DBB) == null) { try { valves vValve = new valves { name = this.name, DB = this.DB, DBB = this.DBB, }; this.rte.valves.Add(vValve); this.rte.SaveChanges(); } catch (Exception ex) { MessageBox.Show(ex.InnerException.ToString()); } } }
public MainWindow() { this.Topmost = true; InitializeComponent(); real_Tag_Entitys = new Real_Tag_Entitys(); data = new List <users>(); LSS = new Log_Sub_System.Log_Sub_System(real_Tag_Entitys); foreach (users user in real_Tag_Entitys.users) { data.Add(user); } users_grid.ItemsSource = data; Dictionary <string, int> lRole = new Dictionary <string, int>(); lRole.Add("Оператор", 0); lRole.Add("Технолог", 1); lRole.Add("Инженер", 2); Role.ItemsSource = lRole; Heat_Assist.IsChecked = Tags.get_Heat_Assist(); plc = new Plc(CpuType.S71500, "192.168.1.122", 0, 1); on = new SolidColorBrush(Color.FromRgb(0, 255, 0)); off = new SolidColorBrush(Color.FromRgb(255, 0, 0)); neutral = new SolidColorBrush(Color.FromRgb(221, 221, 221)); dispatcherTimer = new DispatcherTimer(); rt = new RotateTransform(); }
public udtION(Plc plc, int DB, int DBB, Real_Tag_Entitys rte, string name) { this.PLC = plc; this.DB = DB; this.DBB = DBB; this.name = name; this.rte = rte; if (this.rte.ion_read.Find(this.DB, this.DBB) == null) { try { ion_read vion = new ion_read { name = this.name, DB = this.DB, DBB = this.DBB, }; this.rte.ion_read.Add(vion); this.rte.SaveChanges(); }catch (Exception ex) { MessageBox.Show(ex.InnerException.ToString()); } } }
public udtFVP(Plc plc, int DB, int DBB, Real_Tag_Entitys rte, string name) { this.PLC = plc; this.DB = DB; this.DBB = DBB; this.name = name; this.rte = rte; if (this.rte.fvp.Find(this.DB, this.DBB) == null) { try { fvp vFVP = new fvp { name = this.name, DB = this.DB, DBB = this.DBB, AutoMode = this.bAutoMode, Block = this.bBlock, ManualStart = this.bManualStart, PowerOn = this.bPowerOn, Remote = this.bRemote, Start = this.bStart, TurnOn = this.bTurnOn }; this.rte.fvp.Add(vFVP); this.rte.SaveChanges(); } catch (Exception ex) { MessageBox.Show(ex.InnerException.ToString()); } } }
public udtCommandBit(Plc plc, int DB, int DBB, int DBX, Real_Tag_Entitys rte, string name) { this.PLC = plc; this.DB = DB; this.DBB = DBB; this.DBX = DBX; this.name = name; this.rte = rte; if (this.rte.command_bit.Find(this.DB, this.DBB, this.DBX) == null) { try { command_bit vCommandBit = new command_bit { name = this.name, DB = this.DB, DBB = this.DBB, DBX = this.DBX }; this.rte.command_bit.Add(vCommandBit); this.rte.SaveChanges(); } catch (Exception ex) { MessageBox.Show(ex.InnerException.ToString()); } } }
public auth_form(Real_Tag_Entitys rte, MainWindow mainWindow) { InitializeComponent(); this.rte = rte; mw = mainWindow; //rte.Database.CreateIfNotExists(); }
public Installing_Tags(Plc plc, Real_Tag_Entitys real_Tag_Entitys) { #region Cam_pressure = new Real_type(plc, 14, 36, real_Tag_Entitys, "cam_pressure"); FV_presure = new Real_type(plc, 14, 22, real_Tag_Entitys, "FV_presure"); Crio_pressure = new Real_type(plc, 14, 8, real_Tag_Entitys, "Crio_presure"); Crio_temperature = new Real_type(plc, 18, 16, real_Tag_Entitys, "Crio_temperature"); K_RRG_1 = new Real_type(plc, 21, 92, real_Tag_Entitys, "K_RRG_1"); K_RRG_2 = new Real_type(plc, 21, 96, real_Tag_Entitys, "K_RRG_2"); K_RRG_3 = new Real_type(plc, 21, 100, real_Tag_Entitys, "K_RRG_3"); FB_RRG_1 = new Real_type(plc, 21, 30, real_Tag_Entitys, "FB_RRG_1"); FB_RRG_2 = new Real_type(plc, 21, 52, real_Tag_Entitys, "FB_RRG_2"); FB_RRG_3 = new Real_type(plc, 21, 70, real_Tag_Entitys, "FB_RRG_3"); SP_PID_RRG = new Real_type(plc, 39, 0, real_Tag_Entitys, "SP_PID_RRG"); ManVal_PID_RRG = new Real_type(plc, 39, 4, real_Tag_Entitys, "ManVal_PID_RRG"); Mode_RRG = new Real_type(plc, 39, 12, real_Tag_Entitys, "Mode_RRG"); Pne_press = new Real_type(plc, 23, 0, real_Tag_Entitys, "Pne_Press"); HeatAssist_Temp_Sp = new Real_type(plc, 46, 4, real_Tag_Entitys, "HeatAssist Temp Sp"); PreHeat_Temp_Sp = new Real_type(plc, 46, 0, real_Tag_Entitys, "PreHeat_Temp_Sp"); HeatAssist_Time_Sp = new Real_type(plc, 46, 12, real_Tag_Entitys, "HeatAssist_Time_Sp"); PreHeat_Time_Sp = new Real_type(plc, 46, 8, real_Tag_Entitys, "PreHeat_Time_Sp"); Cam_Temp = new Real_type(plc, 1, 534, real_Tag_Entitys, "Cam_Temp"); Driver_Speed = new Real_type(plc, 37, 4, real_Tag_Entitys, "Driver_Speed"); #endregion #region SHV = new udtValve(plc, 7, 28, real_Tag_Entitys, "SHV"); FVV_S = new udtValve(plc, 7, 4, real_Tag_Entitys, "FVV_S"); FVV_B = new udtValve(plc, 7, 10, real_Tag_Entitys, "FVV_B"); CPV = new udtValve(plc, 7, 16, real_Tag_Entitys, "CPV"); BAV_3 = new udtValve(plc, 7, 22, real_Tag_Entitys, "BAV_3"); #endregion #region CommandBit ShvAutoModeSwitchOn = new udtCommandBit(plc, 7, 24, 1, real_Tag_Entitys, "SHV_automode_witch_on"); ShvServiceModeSwitchOn = new udtCommandBit(plc, 7, 24, 0, real_Tag_Entitys, "SHV_servicemode_switch_on"); ShvOpen = new udtCommandBit(plc, 7, 24, 2, real_Tag_Entitys, "SHV_open"); Bav3AutoModeSwitchOn = new udtCommandBit(plc, 7, 18, 1, real_Tag_Entitys, "BAV_3_automode_witch_on"); Bav3ServiceModeSwitchOn = new udtCommandBit(plc, 7, 18, 0, real_Tag_Entitys, "BAV_3_servicemode_switch_on"); Bav3Open = new udtCommandBit(plc, 7, 18, 2, real_Tag_Entitys, "BAV_3_open"); FvvSAutoModeSwitchOn = new udtCommandBit(plc, 7, 0, 1, real_Tag_Entitys, "FVV_S_automode_witch_on"); FvvSServiceModeSwitchOn = new udtCommandBit(plc, 7, 0, 0, real_Tag_Entitys, "FVV_S_servicemode_switch_on"); FvvSOpen = new udtCommandBit(plc, 7, 0, 2, real_Tag_Entitys, "FVV_S_open"); FvvBAutoModeSwitchOn = new udtCommandBit(plc, 7, 6, 1, real_Tag_Entitys, "FVV_B_automode_witch_on"); FvvBServiceModeSwitchOn = new udtCommandBit(plc, 7, 6, 0, real_Tag_Entitys, "FVV_B_servicemode_switch_on"); FvvBOpen = new udtCommandBit(plc, 7, 6, 2, real_Tag_Entitys, "FVV_B_open"); CPVAutoModeSwitchOn = new udtCommandBit(plc, 7, 12, 1, real_Tag_Entitys, "CPV_automode_witch_on"); CPVServiceModeSwitchOn = new udtCommandBit(plc, 7, 12, 0, real_Tag_Entitys, "CPV_servicemode_switch_on"); CPVOpen = new udtCommandBit(plc, 7, 12, 2, real_Tag_Entitys, "CPV_open"); CrioAutoModeSwitchOn = new udtCommandBit(plc, 8, 0, 0, real_Tag_Entitys, "Crio_Auto_Mode_Switch_On"); CrioManStart = new udtCommandBit(plc, 8, 0, 1, real_Tag_Entitys, "Crio_Manual_Start"); FvpAutoModeSwitchOn = new udtCommandBit(plc, 22, 0, 1, real_Tag_Entitys, "FVP_Auto_Mode_Switch_On"); FvpRemoteSwitchOn = new udtCommandBit(plc, 22, 0, 0, real_Tag_Entitys, "FVP_Remote_Switch_on"); FvpManualStart = new udtCommandBit(plc, 22, 0, 3, real_Tag_Entitys, "FVP_Manual_Start"); CamHeatOpen = new udtCommandBit(plc, 24, 44, 3, real_Tag_Entitys, "Cam_Heat_Open"); IONManStart = new udtCommandBit(plc, 20, 30, 0, real_Tag_Entitys, "IonManStart"); IONManStop = new udtCommandBit(plc, 20, 30, 1, real_Tag_Entitys, "IonManStop"); IONAuto = new udtCommandBit(plc, 20, 30, 4, real_Tag_Entitys, "IonAutoMod"); IONReset = new udtCommandBit(plc, 20, 30, 5, real_Tag_Entitys, "IonReset"); ELIStart = new udtCommandBit(plc, 40, 0, 0, real_Tag_Entitys, "ELI Start"); ELIProcessComplete = new udtCommandBit(plc, 3, 104, 4, real_Tag_Entitys, "ELI_Process_Complete"); PreHeat_Start = new udtCommandBit(plc, 46, 28, 2, real_Tag_Entitys, "PreHeat_Start"); Heat_Assist = new udtCommandBit(plc, 46, 28, 3, real_Tag_Entitys, "Heat_Assist"); SSP_on = new udtCommandBit(plc, 4, 50, 0, real_Tag_Entitys, "SSP_on"); Shield_autoOn = new udtCommandBit(plc, 38, 0, 1, real_Tag_Entitys, "Shield_AutoOn"); Crio_Pump_Run = new udtCommandBit(plc, 24, 24, 2, real_Tag_Entitys, "Crio pump Run"); Cam_Prepare = new udtCommandBit(plc, 24, 40, 1, real_Tag_Entitys, "Camera prepare"); Cam_opened = new udtCommandBit(plc, 24, 44, 2, real_Tag_Entitys, "Cam_open"); Crio_Pump_Turn_off = new udtCommandBit(plc, 24, 48, 2, real_Tag_Entitys, "Crio_Pump_Turn_Off"); Day_End = new udtCommandBit(plc, 24, 50, 2, real_Tag_Entitys, "Day_End"); Shield_open = new udtCommandBit(plc, 38, 0, 2, real_Tag_Entitys, "Shield_Open"); Shield_close = new udtCommandBit(plc, 38, 0, 3, real_Tag_Entitys, "Shield_Close"); Driver_Run = new udtCommandBit(plc, 37, 8, 0, real_Tag_Entitys, "Driver_run"); Open_Door = new udtCommandBit(plc, 43, 0, 0, real_Tag_Entitys, "Open_Door"); Water_Crio = new udtCommandBit(plc, 43, 0, 1, real_Tag_Entitys, "Water_Crio"); HH_pne = new udtCommandBit(plc, 43, 0, 2, real_Tag_Entitys, "HH_pne"); LL_pne = new udtCommandBit(plc, 43, 0, 3, real_Tag_Entitys, "LL_pne"); Crio_Power_Failure = new udtCommandBit(plc, 43, 0, 4, real_Tag_Entitys, "Crio_Power_Failure"); Qartz_Power_Failure = new udtCommandBit(plc, 43, 0, 5, real_Tag_Entitys, "Qartz_Power_Failure"); ELI_Power_Failure = new udtCommandBit(plc, 43, 0, 6, real_Tag_Entitys, "ELI_Power_Failure"); WaterHeat_Power_Failure = new udtCommandBit(plc, 43, 0, 7, real_Tag_Entitys, "WaterHeat_Power_Failure"); FVP_Power_Failure = new udtCommandBit(plc, 43, 1, 0, real_Tag_Entitys, "FVP_Power_Failure"); Ion_Power_Failure = new udtCommandBit(plc, 43, 1, 1, real_Tag_Entitys, "Ion_Power_Failure"); Indexer_Power_Failure = new udtCommandBit(plc, 43, 1, 2, real_Tag_Entitys, "Indexer_Power_Failure"); SSP_Power_Failure = new udtCommandBit(plc, 43, 1, 3, real_Tag_Entitys, "SSP_Power_Failure"); Heater_Power_Failure = new udtCommandBit(plc, 43, 1, 4, real_Tag_Entitys, "Heater_Power_Failure"); ELI_Water_Failure = new udtCommandBit(plc, 43, 1, 5, real_Tag_Entitys, "ELI_Water_Failure"); CRIO_Hight_Temp = new udtCommandBit(plc, 43, 1, 6, real_Tag_Entitys, "CRIO_Hight_Temp"); #endregion Crio = new udtCrio(plc, 8, 4, real_Tag_Entitys, "Crio"); FVP = new udtFVP(plc, 22, 0, real_Tag_Entitys, "FVP"); Tech_Cam = new udtProcess(plc, 24, 0, real_Tag_Entitys, "Tech_Cam"); Ion_SP = new udtIONWrite(plc, 20, 32, real_Tag_Entitys, "ION_Write"); Ion = new udtION(plc, 20, 56, real_Tag_Entitys, "ION"); }
public Log_Sub_System(Real_Tag_Entitys real_Tag_Entitys) { kvantDB = real_Tag_Entitys; }