using DataBlockHelper.DBHelpers; using Mesnac.Action.Base; using Mesnac.Controls.Base; using Mesnac.Controls.ChemicalWeighing; using Mesnac.Controls.Default; using Mesnac.Controls.Feeding; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Text; using System.Threading; using System.Windows.Forms; using IAction = Mesnac.Action.Base.IAction; using Timer = System.Windows.Forms.Timer; using DataTable = System.Data.DataTable; using Mesnac.Action.ChemicalWeighing.LjMaterial; using System.Data; using Mesnac.Action.ChemicalWeighing.MainDetailControl.Entity; using Mesnac.Action.ChemicalWeighing.RgvPlc; using System.Reflection; using DataBlockHelper; using System.Drawing; using Mesnac.Action.ChemicalWeighing.MinAn; using Mesnac.Action.ChemicalWeighing.FreeDb; using Mesnac.Action.ChemicalWeighing.InterfaceDocking; using Mesnac.Action.ChemicalWeighing.Report; using Mesnac.Action.ChemicalWeighing.InterfaceDocking.DockingEntity; using Mesnac.Core.Service; using Mesnac.Basic; using Mesnac.Action.ChemicalWeighing.Util; namespace Mesnac.Action.ChemicalWeighing.MainDetailControl { public class MainDetailControlAction : ChemicalWeighingAction, IAction { #region 属性 private DB2102Helper DB2102 = new DB2102Helper(); private DB2103Helper DB2103 = new DB2103Helper(); private DB2107Helper DB2107 = new DB2107Helper(); private DB2119Helper DB2119 = new DB2119Helper(); private ConcurrentDictionary conCurrentCache = new ConcurrentDictionary(); private Timer timer; private string AlarmString = ""; int LineKindFlag = 0; int no = 0; Dictionary WetStatus = new Dictionary(); //读取报表 ushort ReadFlag = 0; //DataTable ParametersWithPCTable = new DataTable(); //所有Alarm点位 DataTable AllAlarmTable = new DataTable(); //DataTable LogAlarmTable = new DataTable(); //DataTable NowAlarmTable = new DataTable(); byte[] b2; byte[] b3; //2102 2103 2107的byte数组 byte[] b7; byte[] reachState; byte[] mixState; #endregion #region 控件变量 //前端控件导入 private List Controls; private List McControllist; //临时数据存放 private PlcReadTempEntity PlcReadTemp = new PlcReadTempEntity(); //报警列表控件 //private MCLabel MCWatchDog; private HslMoveText AlarmMoveText; //控件实体类 HslLanternAlarmEntity HslAlarmE = new HslLanternAlarmEntity(); HslLanternSimpleEntity HslLanternSimpleE = new HslLanternSimpleEntity(); MCLabelEntity LabelE = new MCLabelEntity(); SwitchLightEntity LightE = new SwitchLightEntity(); RSCREWBIGEntity RSCREE = new RSCREWBIGEntity(); LSCREWBIGEntity LSCREE = new LSCREWBIGEntity(); JzfEntity JzfE = new JzfEntity(); FanEntity FanE = new FanEntity(); ControlCabinetEntity ControlCabinetE = new ControlCabinetEntity(); LjSwithEntity SwithE = new LjSwithEntity(); ThreeWayValveEntity ThreeValveE = new ThreeWayValveEntity(); // DeviceDetailEntity DetailE = new DeviceDetailEntity(); HslLedDisplayEntity LedDisplayE = new HslLedDisplayEntity(); #endregion #region Run方法 public void Run(RuntimeParameter runtime) { base.RunIni(runtime); //必须要调用 McControllist = GetAllDbMCControlsByOption(DbOptionTypes.InitData);//获取所有待初始化控件 //this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "AlarmForm").FirstOrDefault(); //获取物料数据控件 Controls = GetAllControls(); //DetailE.WatchDog = Controls.FirstOrDefault(x => x.Name == "WatchDog") as StateButton; //DetailE.EMStop = Controls.FirstOrDefault(x => x.Name == "EMStop") as SystemStateShow; // MCWatchDog = Controls.FirstOrDefault(x => x.Name == "MCWatchDog") as MCLabel; AlarmMoveText = Controls.FirstOrDefault(x => x.Name == "AlarmMoveText") as HslMoveText; SetAllControls(); //ParametersWithPCTable.Columns.Add("id", typeof(string)); //ParametersWithPCTable.Columns.Add("mode", typeof(bool)); //ParametersWithPCTable.Columns.Add("status", typeof(bool)); //ParametersWithPCTable.Columns.Add("batch", typeof(int)); //ParametersWithPCTable.Columns.Add("step", typeof(int)); //ParametersWithPCTable.Columns.Add("stepName", typeof(int)); //ParametersWithPCTable.Columns.Add("totalTime", typeof(int)); //ParametersWithPCTable.Columns.Add("stepTime", typeof(int)); //ParametersWithPCTable.Columns.Add("speed", typeof(float)); //ParametersWithPCTable.Columns.Add("currnet", typeof(float)); //ParametersWithPCTable.Columns.Add("pressure", typeof(float)); //LogAlarmTable.Columns.Add("Equip_Name", typeof(string)); //LogAlarmTable.Columns.Add("Alarm_ID", typeof(int)); //LogAlarmTable.Columns.Add("Alarm_Cn_Info", typeof(string)); //LogAlarmTable.Columns.Add("Alarm_Other_Info", typeof(string)); //LogAlarmTable.Columns.Add("Alarm_Occur_Time", typeof(string)); //LogAlarmTable.Columns.Add("Alarm_Claer_Time", typeof(string)); //LogAlarmTable.Columns.Add("Alarm_Status", typeof(int)); //LogAlarmTable.Columns.Add("Alarm_GUID", typeof(string)); //NowAlarmTable.Columns.Add("报警设备", typeof(string)); //NowAlarmTable.Columns.Add("报警内容", typeof(string)); //NowAlarmTable.Columns.Add("报警时间", typeof(string)); AllAlarmTable = DBHelp.GetTable(@"SELECT Alarm_ID, Alarm_Block, Alarm_Word, Alarm_Bit, Alarm_Cn_Info, Alarm_Other_Info FROM Pmt_Alarm"); var dict = new HttpResponse().GetLGInfo(); ControlsHelper.SetMCLabel(LabelE.LineKind1, dict[1]); ControlsHelper.SetMCLabel(LabelE.LineKind2, dict[2]); ControlsHelper.SetMCLabel(LabelE.LineKind3, dict[3]); ControlsHelper.SetMCLabel(LabelE.LineKind4, dict[4]); ControlsHelper.SetMCLabel(LabelE.LineKind5, dict[5]); ControlsHelper.SetMCLabel(LabelE.LineKind6, dict[6]); ControlsHelper.SetMCLabel(LabelE.LineKind7, dict[7]); ControlsHelper.SetMCLabel(LabelE.LineKind8, dict[8]); timer = new Timer(); timer.Interval = 1000; timer.Enabled = true; timer.Tick += GetPlcValue;//添加事件 } #region 控件导入 /// /// 控件实体类导入前端控件 /// private void SetAllControls() { ControlsHelper.ControlImport(HslAlarmE, Controls); ControlsHelper.ControlImport(HslLanternSimpleE, Controls); ControlsHelper.ControlImport(LabelE, Controls); ControlsHelper.ControlImport(LightE, Controls); ControlsHelper.ControlImport(RSCREE, Controls); ControlsHelper.ControlImport(LSCREE, Controls); ControlsHelper.ControlImport(JzfE, Controls); ControlsHelper.ControlImport(FanE, Controls); ControlsHelper.ControlImport(ControlCabinetE, Controls); ControlsHelper.ControlImport(SwithE, Controls); ControlsHelper.ControlImport(ThreeValveE, Controls); ControlsHelper.ControlImport(LedDisplayE, Controls); Type ledDisplayType = LedDisplayE.GetType(); PropertyInfo[] properties = ledDisplayType.GetProperties(); foreach (PropertyInfo sourceProperty in properties) { string name = sourceProperty.Name; PropertyInfo property = ledDisplayType.GetProperty(name); HslLedDisplay ledDisplay = (HslLedDisplay)property.GetValue(LedDisplayE); //bottle.Value = n * i++; ledDisplay.BackColor = Color.FromArgb(32, 72, 98); ledDisplay.DisplayBackColor = Color.FromArgb(32, 72, 98); ledDisplay.DisplayNumber = 5; ledDisplay.ForeColor = Color.White; ledDisplay.LedNumberSize = 2; ledDisplay.LeftRightOffect = 2; ledDisplay.DisplayText = "00:00"; property.SetValue(LedDisplayE, ledDisplay); } this.AlarmMoveText.Font = new Font("宋体", 15f, FontStyle.Regular, GraphicsUnit.Point, 134); this.AlarmMoveText.ForeColor = Color.White; this.AlarmMoveText.MoveSpeed = 4f; this.AlarmMoveText.Text = AlarmString; } #endregion #endregion #region 线程新建,计时器调用 /// /// 新建PLC读取线程 /// /// private void NewThread(object obj) { try { if (conCurrentCache.Count == 0) { Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); conCurrentCache.TryAdd("plc", DateTime.Now); DB2102 = new DB2102Helper(); DB2103 = new DB2103Helper(); DB2107 = new DB2107Helper(); DB2119 = new DB2119Helper(); NewThreadDb2102(); NewThreadDb2103(); NewThreadDb2107(); RGVRecordShow(); //SetHslLanternAlarm(hslAlarmEntity.HslLanternAlarm3, list[2].Error); //SetHslLanternAlarm(hslAlarmEntity.HslLanternAlarm4, list[3].Error); //SetHslLanternAlarm(hslAlarmEntity.HslLanternAlarm5, list[4].Error); //SetHslLanternAlarm(hslAlarmEntity.HslLanternAlarm6, list[5].Error); //SetHslLanternAlarm(hslAlarmEntity.HslLanternAlarm7, list[6].Error); //SetHslLanternAlarm(hslAlarmEntity.HslLanternAlarm8, list[7].Error); conCurrentCache.Clear(); stopwatch.Stop(); var send = stopwatch.ElapsedMilliseconds; } } catch (Exception ex) { conCurrentCache.Clear(); } } /// /// Plc读数线程池,定时器退出删除 /// private void GetPlcValue(object sender, EventArgs e) { if (GetAllDbMCControlsByOption(DbOptionTypes.QueryAndModify).Count == 0) { timer.Stop(); timer.Dispose(); } no += 1; if (no > 5) { no = 0; Timer1_Tick(); } LineKindFlag += 1; if (LineKindFlag >= 300) { LineKindFlag = 0; var dict = new HttpResponse().GetLGInfo(); ControlsHelper.SetMCLabel(LabelE.LineKind1, dict[1]); ControlsHelper.SetMCLabel(LabelE.LineKind2, dict[2]); ControlsHelper.SetMCLabel(LabelE.LineKind3, dict[3]); ControlsHelper.SetMCLabel(LabelE.LineKind4, dict[4]); ControlsHelper.SetMCLabel(LabelE.LineKind5, dict[5]); ControlsHelper.SetMCLabel(LabelE.LineKind6, dict[6]); ControlsHelper.SetMCLabel(LabelE.LineKind7, dict[7]); ControlsHelper.SetMCLabel(LabelE.LineKind8, dict[8]); } ReadFlag += 1; if (ReadFlag >= 20) { ReadFlag = 0; if (UserJudge.IsNormalUser()) { ReportReadDb.ReadFeededDry(); } } var reachSingle = RgvPlcUtil.GetRGVAllError(); var mixSingle = Db3000Helper.ReadDb(); RGVRecord(reachSingle, mixSingle); //目前只有主线程可以 //小车到位信号 ControlsHelper.SetHslLanternAlarm(HslAlarmE.HslLanternAlarm1, reachSingle[0]); ControlsHelper.SetHslLanternAlarm(HslAlarmE.HslLanternAlarm2, reachSingle[1]); ControlsHelper.SetHslLanternAlarm(HslAlarmE.HslLanternAlarm3, reachSingle[2]); ControlsHelper.SetHslLanternAlarm(HslAlarmE.HslLanternAlarm4, reachSingle[3]); ControlsHelper.SetHslLanternAlarm(HslAlarmE.HslLanternAlarm5, reachSingle[4]); ControlsHelper.SetHslLanternAlarm(HslAlarmE.HslLanternAlarm6, reachSingle[5]); ControlsHelper.SetHslLanternAlarm(HslAlarmE.HslLanternAlarm7, reachSingle[6]); ControlsHelper.SetHslLanternAlarm(HslAlarmE.HslLanternAlarm8, reachSingle[7]); //搅拌准备好信号 ControlsHelper.SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple1, mixSingle[0]); ControlsHelper.SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple2, mixSingle[1]); ControlsHelper.SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple3, mixSingle[2]); ControlsHelper.SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple4, mixSingle[3]); ControlsHelper.SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple5, mixSingle[4]); ControlsHelper.SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple6, mixSingle[5]); ControlsHelper.SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple7, mixSingle[6]); ControlsHelper.SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple8, mixSingle[7]); //湿混机 加完料 DB2114Helper dB2114 = new DB2114Helper(); var dry = dB2114.Dry; ControlsHelper.SetHsl(HslLanternSimpleE.FeededDryM1, dry.M1); ControlsHelper.SetHsl(HslLanternSimpleE.FeededDryM2, dry.M2); ControlsHelper.SetHsl(HslLanternSimpleE.FeededDryM3, dry.M3); ControlsHelper.SetHsl(HslLanternSimpleE.FeededDryM4, dry.M4); ControlsHelper.SetHsl(HslLanternSimpleE.FeededDryM5, dry.M5); ControlsHelper.SetHsl(HslLanternSimpleE.FeededDryM6, dry.M6); ControlsHelper.SetHsl(HslLanternSimpleE.FeededDryM7, dry.M7); ControlsHelper.SetHsl(HslLanternSimpleE.FeededDryM8, dry.M8); dry = dB2114.Gel; ControlsHelper.SetHsl(HslLanternSimpleE.FeededGelM1, dry.M1); ControlsHelper.SetHsl(HslLanternSimpleE.FeededGelM2, dry.M2); ControlsHelper.SetHsl(HslLanternSimpleE.FeededGelM3, dry.M3); ControlsHelper.SetHsl(HslLanternSimpleE.FeededGelM4, dry.M4); ControlsHelper.SetHsl(HslLanternSimpleE.FeededGelM5, dry.M5); ControlsHelper.SetHsl(HslLanternSimpleE.FeededGelM6, dry.M6); ControlsHelper.SetHsl(HslLanternSimpleE.FeededGelM7, dry.M7); ControlsHelper.SetHsl(HslLanternSimpleE.FeededGelM8, dry.M8); var ch = dB2114.CW; //FeededCWG1 ControlsHelper.SetHsl(HslLanternSimpleE.FeededCWG1, ch.G1); ControlsHelper.SetHsl(HslLanternSimpleE.FeededCWG2, ch.G2); ControlsHelper.SetHsl(HslLanternSimpleE.FeededCWG3, ch.G3); ControlsHelper.SetHsl(HslLanternSimpleE.FeededCWG4, ch.G4); ControlsHelper.SetHsl(HslLanternSimpleE.FeededCWG5, ch.G5); ControlsHelper.SetHsl(HslLanternSimpleE.FeededCWG6, ch.G6); ControlsHelper.SetHsl(HslLanternSimpleE.FeededCWG7, ch.G7); ControlsHelper.SetHsl(HslLanternSimpleE.FeededCWG8, ch.G8); //SetHslLanternFeedHw ch = dB2114.HW; ControlsHelper.SetHsl(HslLanternSimpleE.FeededHWG1, ch.G1); ControlsHelper.SetHsl(HslLanternSimpleE.FeededHWG2, ch.G2); ControlsHelper.SetHsl(HslLanternSimpleE.FeededHWG3, ch.G3); ControlsHelper.SetHsl(HslLanternSimpleE.FeededHWG4, ch.G4); ControlsHelper.SetHsl(HslLanternSimpleE.FeededHWG5, ch.G5); ControlsHelper.SetHsl(HslLanternSimpleE.FeededHWG6, ch.G6); ControlsHelper.SetHsl(HslLanternSimpleE.FeededHWG7, ch.G7); ControlsHelper.SetHsl(HslLanternSimpleE.FeededHWG8, ch.G8); ch = dB2114.PD; ControlsHelper.SetHsl(HslLanternSimpleE.FeededPDG1, ch.G1); ControlsHelper.SetHsl(HslLanternSimpleE.FeededPDG2, ch.G2); ControlsHelper.SetHsl(HslLanternSimpleE.FeededPDG3, ch.G3); ControlsHelper.SetHsl(HslLanternSimpleE.FeededPDG4, ch.G4); ControlsHelper.SetHsl(HslLanternSimpleE.FeededPDG5, ch.G5); ControlsHelper.SetHsl(HslLanternSimpleE.FeededPDG6, ch.G6); ControlsHelper.SetHsl(HslLanternSimpleE.FeededPDG7, ch.G7); ControlsHelper.SetHsl(HslLanternSimpleE.FeededPDG8, ch.G8); ControlsHelper.SetHslLanternSimple(HslLanternSimpleE.HslLanternSimpleM1, MinAnPlc.ReqD1); ControlsHelper.SetHslLanternSimple(HslLanternSimpleE.HslLanternSimpleM2, MinAnPlc.ReqD2); ControlsHelper.SetHslLanternSimple(HslLanternSimpleE.HslLanternSimpleM3, MinAnPlc.ReqD3); ControlsHelper.SetHslLanternSimple(HslLanternSimpleE.HslLanternSimpleM4, MinAnPlc.ReqD4); ControlsHelper.SetHslLanternSimpleRequest(HslLanternSimpleE.HslLanternSimpleReq1, MinAnPlc.Heir1); ControlsHelper.SetHslLanternSimpleRequest(HslLanternSimpleE.HslLanternSimpleReq2, MinAnPlc.Heir2); ControlsHelper.SetHslLanternSimpleRequest(HslLanternSimpleE.HslLanternSimpleReq3, MinAnPlc.Heir3); ControlsHelper.SetHslLanternSimpleRequest(HslLanternSimpleE.HslLanternSimpleReq4, MinAnPlc.Heir4); ThreadPool.QueueUserWorkItem(new WaitCallback(NewThread)); AlarmControl(); //现有报警刷新 } #endregion #region 对接RGV计时记录 private void RGVRecord(List RGVEs, List Mixes) { if (RGVEs.Count == 0 || Mixes.Count == 0) { return; } for (int i = 0; i < 8; i++) { int deviceNo = i + 1; //判断有没有done = false的设备记录,如果为空就新建一条记录 var record = FreeSqlUnit.Instance.Select().Where(x => x.DeviceNo == deviceNo && !x.Done).ToList().FirstOrDefault(); if (record == null) { var entity = new Lj_RGVTimeRecord() { DeviceNo = deviceNo, MixIsReady = false, RGVIsReach = false, Done = false }; record = entity; FreeSqlUnit.Instance.Insert(entity).ExecuteAffrows(); } //逻辑判断插入数据库 //混炼完成但数据库无记录 if (Mixes[i] && !record.MixIsReady) { FreeSqlUnit.Instance.Update() .Set(x => x.MixIsReady, true) .Set(x => x.MixReadyStartTime, DateTime.Now) .Where(x => x.DeviceNo == deviceNo && !x.Done).ExecuteAffrows(); } //rgv到达但数据库无记录 if (RGVEs[i].RequestFeed && !record.RGVIsReach) { TimeSpan temp = DateTime.Now - record.MixReadyStartTime; FreeSqlUnit.Instance.Update() .Set(x => x.RGVIsReach, true) .Set(x => x.RGVReachTime, DateTime.Now) .Set(x => x.MixWaitTime, (int)temp.TotalSeconds) .Where(x => x.DeviceNo == deviceNo && !x.Done).ExecuteAffrows(); } //混炼完成灯灭数据库有记录 if (!Mixes[i] && record.MixIsReady) { FreeSqlUnit.Instance.Update() .Set(x => x.MixReadyEndTime, DateTime.Now) .Where(x => x.DeviceNo == deviceNo && !x.Done).ExecuteAffrows(); } //rgv到达灯灭数据库有记录 if (!RGVEs[i].RequestFeed && record.RGVIsReach) { TimeSpan temp = DateTime.Now - record.RGVReachTime; FreeSqlUnit.Instance.Update() .Set(x => x.RGVLeaveTime, DateTime.Now) .Set(x => x.RgvWaitTime, (int)temp.TotalSeconds) .Set(x => x.Done, true) .Where(x => x.DeviceNo == deviceNo && !x.Done).ExecuteAffrows(); } //if (!Mixes[i] && !record.RGVIsReach && record.MixIsReady) //{ // MessageBox.Show("湿混机搅拌完毕指示灯无故熄灭\nRGV小车未到达 接料未结束"); // FreeSqlUnit.Instance.Update() // .Set(x => x.MixIsReady, false) // .Where(x => x.DeviceNo == deviceNo && !x.Done).ExecuteAffrows(); //} } } private void RGVRecordShow() { for (int i = 0; i < 8; i++) { int deviceNo = i + 1; //判断有没有done = false的设备记录,如果为空就新建一条记录 var record = FreeSqlUnit.Instance.Select().Where(x => x.DeviceNo == deviceNo && !x.Done).ToList().FirstOrDefault(); if (record != null) { if (record.MixIsReady && !record.RGVIsReach) { switch (deviceNo) { case 1: LedDisplayE.WetWaitDisPlay1.DisplayText = MixWaitTimeLed(record); LedDisplayE.WetWaitDisPlay1.ForeColor = MixTimeBackColor(record); LedDisplayE.RGVWaitDisPlay1.DisplayText = "00:00"; break; case 2: LedDisplayE.WetWaitDisPlay2.DisplayText = MixWaitTimeLed(record); LedDisplayE.WetWaitDisPlay2.ForeColor = MixTimeBackColor(record); LedDisplayE.RGVWaitDisPlay2.DisplayText = "00:00"; break; case 3: LedDisplayE.WetWaitDisPlay3.DisplayText = MixWaitTimeLed(record); LedDisplayE.WetWaitDisPlay3.ForeColor = MixTimeBackColor(record); LedDisplayE.RGVWaitDisPlay3.DisplayText = "00:00"; break; case 4: LedDisplayE.WetWaitDisPlay4.DisplayText = MixWaitTimeLed(record); LedDisplayE.WetWaitDisPlay4.ForeColor = MixTimeBackColor(record); LedDisplayE.RGVWaitDisPlay4.DisplayText = "00:00"; break; case 5: LedDisplayE.WetWaitDisPlay5.DisplayText = MixWaitTimeLed(record); LedDisplayE.WetWaitDisPlay5.ForeColor = MixTimeBackColor(record); LedDisplayE.RGVWaitDisPlay5.DisplayText = "00:00"; break; case 6: LedDisplayE.WetWaitDisPlay6.DisplayText = MixWaitTimeLed(record); LedDisplayE.WetWaitDisPlay6.ForeColor = MixTimeBackColor(record); LedDisplayE.RGVWaitDisPlay6.DisplayText = "00:00"; break; case 7: LedDisplayE.WetWaitDisPlay7.DisplayText = MixWaitTimeLed(record); LedDisplayE.WetWaitDisPlay7.ForeColor = MixTimeBackColor(record); LedDisplayE.RGVWaitDisPlay7.DisplayText = "00:00"; break; case 8: LedDisplayE.WetWaitDisPlay8.DisplayText = MixWaitTimeLed(record); LedDisplayE.WetWaitDisPlay8.ForeColor = MixTimeBackColor(record); LedDisplayE.RGVWaitDisPlay8.DisplayText = "00:00"; break; default: break; } } else if (record.MixIsReady && record.RGVIsReach) { switch (deviceNo) { case 1: LedDisplayE.RGVWaitDisPlay1.DisplayText = RGVWaitTimeLed(record); LedDisplayE.RGVWaitDisPlay1.ForeColor = RGVTimeBackColor(record); break; case 2: LedDisplayE.RGVWaitDisPlay2.DisplayText = RGVWaitTimeLed(record); LedDisplayE.RGVWaitDisPlay2.ForeColor = RGVTimeBackColor(record); break; case 3: LedDisplayE.RGVWaitDisPlay3.DisplayText = RGVWaitTimeLed(record); LedDisplayE.RGVWaitDisPlay3.ForeColor = RGVTimeBackColor(record); break; case 4: LedDisplayE.RGVWaitDisPlay4.DisplayText = RGVWaitTimeLed(record); LedDisplayE.RGVWaitDisPlay4.ForeColor = RGVTimeBackColor(record); break; case 5: LedDisplayE.RGVWaitDisPlay5.DisplayText = RGVWaitTimeLed(record); LedDisplayE.RGVWaitDisPlay5.ForeColor = RGVTimeBackColor(record); break; case 6: LedDisplayE.RGVWaitDisPlay6.DisplayText = RGVWaitTimeLed(record); LedDisplayE.RGVWaitDisPlay6.ForeColor = RGVTimeBackColor(record); break; case 7: LedDisplayE.RGVWaitDisPlay7.DisplayText = RGVWaitTimeLed(record); LedDisplayE.RGVWaitDisPlay7.ForeColor = RGVTimeBackColor(record); break; case 8: LedDisplayE.RGVWaitDisPlay8.DisplayText = RGVWaitTimeLed(record); LedDisplayE.RGVWaitDisPlay8.ForeColor = RGVTimeBackColor(record); break; default: break; } } } } } private string RGVWaitTimeLed(Lj_RGVTimeRecord record) { int t = Convert.ToInt32((DateTime.Now - record.RGVReachTime).TotalSeconds); return SecondToTime(t); } private string MixWaitTimeLed(Lj_RGVTimeRecord record) { int t = Convert.ToInt32((DateTime.Now - record.MixReadyStartTime).TotalSeconds); return SecondToTime(t); } private Color RGVTimeBackColor(Lj_RGVTimeRecord record) { int t = Convert.ToInt32((DateTime.Now - record.RGVReachTime).TotalSeconds); return SelectColor(t); } private Color MixTimeBackColor(Lj_RGVTimeRecord record) { int t = Convert.ToInt32((DateTime.Now - record.MixReadyStartTime).TotalSeconds); return SelectColor(t); } private Color SelectColor(int t) { int m = t / 60; if (m >= 10 && m < 20) { return Color.Yellow; } else if (m >= 20) { return Color.Red; } else { return Color.White; } } private string SecondToTime(int t) { int m = t / 60; int s = t % 60; if (m == 0) { return "00:" + s.ToString("00"); } return m.ToString("00") + ":" + s.ToString("00"); } #endregion #region 报警管理 private void AlarmControl() { b2 = DB2102.bytes; b3 = DB2103.bytes; b7 = DB2107.bytes; StringBuilder sb = new StringBuilder(); //string nowtime = DateTime.Now.ToString(); //报警点位遍历 foreach (DataRow rows in AllAlarmTable.Rows) { if ((int)rows["Alarm_Block"] == 2102 && b2[(int)rows["Alarm_Word"]].GetBit((int)rows["Alarm_bit"]) == true) { sb.Append(rows["Alarm_Other_Info"].ToString()); sb.Append(" "); sb.Append(rows["Alarm_Cn_Info"].ToString()); sb.Append(@" \ "); } else if ((int)rows["Alarm_Block"] == 2107 && b7[(int)rows["Alarm_Word"]].GetBit((int)rows["Alarm_bit"]) == true) { sb.Append(rows["Alarm_Other_Info"].ToString()); sb.Append(" "); sb.Append(rows["Alarm_Cn_Info"].ToString()); sb.Append(@" \ "); } else if ((int)rows["Alarm_Block"] == 2103 && b3[(int)rows["Alarm_Word"]].GetBit((int)rows["Alarm_bit"]) == true) { sb.Append(rows["Alarm_Other_Info"].ToString()); sb.Append(" "); sb.Append(rows["Alarm_Cn_Info"].ToString()); sb.Append(@" \ "); } } string str = sb.ToString(); if (string.IsNullOrWhiteSpace(str)) { ControlsHelper.SetSwitchLight(LightE.AlarmIndicate, true, false); } else { ControlsHelper.SetSwitchLight(LightE.AlarmIndicate, false, true); } LightE.AlarmIndicate.BackColor = Color.Transparent; str = str.Replace("\r\n", string.Empty); if (str != AlarmString) { AlarmString = str; AlarmMoveText.Text = str; } } #endregion #region 图像数据读取、控件赋值 /// /// DB2102数据读取、控件赋值 /// private void NewThreadDb2102() { PlcReadTemp.BU1ASF01_Set = DB2102.BU1ASF01.Set; PlcReadTemp.BU1BSF01_Set = DB2102.BU1BSF01.Set; PlcReadTemp.BU1CSF01_Set = DB2102.BU1CSF01.Set; PlcReadTemp.BU1DSF01_Set = DB2102.BU1DSF01.Set; PlcReadTemp.BU1ESF01_Set = DB2102.BU1ESF01.Set; PlcReadTemp.BU1FSF01_Set = DB2102.BU1FSF01.Set; PlcReadTemp.BU1GSF01_Set = DB2102.BU1GSF01.Set; PlcReadTemp.BU1HSF01_Set = DB2102.BU1HSF01.Set; PlcReadTemp.BU1ISF01_Set = DB2102.BU1ISF01.Set; PlcReadTemp.BU1JSF01_Set = DB2102.BU1JSF01.Set; PlcReadTemp.BU1KSF01_Set = DB2102.BU1KSF01.Set; PlcReadTemp.BU1LSF01_Set = DB2102.BU1LSF01.Set; PlcReadTemp.BU1MSF01_Set = DB2102.BU1MSF01.Set; PlcReadTemp.BU1NSF01_Set = DB2102.BU1NSF01.Set; PlcReadTemp.BU1OSF01_Set = DB2102.BU1OSF01.Set; PlcReadTemp.BU1BLT01_Set = DB2102.BU1BLT01.Set; PlcReadTemp.BU1BLT02_Set = DB2102.BU1BLT02.Set; PlcReadTemp.BU1BLT03_Set = DB2102.BU1BLT03.Set; PlcReadTemp.BU1BLT04_Set = DB2102.BU1BLT04.Set; PlcReadTemp.BU1BLT05_Set = DB2102.BU1BLT05.Set; PlcReadTemp.BU1BLT06_Set = DB2102.BU1BLT06.Set; PlcReadTemp.BU1BLT07_Set = DB2102.BU1BLT07.Set; PlcReadTemp.BU2BLT01_Set = DB2102.BU2BLT01.Set; PlcReadTemp.BU2BLT02_Set = DB2102.BU2BLT02.Set; PlcReadTemp.BU2BLT03_Set = DB2102.BU2BLT03.Set; PlcReadTemp.BU2BLT04_Set = DB2102.BU2BLT04.Set; PlcReadTemp.BU2BLT05_Set = DB2102.BU2BLT05.Set; PlcReadTemp.BU3BLT01_Set = DB2102.BU3BLT01.Set; PlcReadTemp.BU3BLT02_Set = DB2102.BU3BLT02.Set; PlcReadTemp.BU3BLT03_Set = DB2102.BU3BLT03.Set; PlcReadTemp.BU3BLT04_Set = DB2102.BU3BLT04.Set; PlcReadTemp.BU3BLT05_Set = DB2102.BU3BLT05.Set; PlcReadTemp.BU3BLT06_Set = DB2102.BU3BLT06.Set; PlcReadTemp.BU3BLT07_Set = DB2102.BU3BLT07.Set; PlcReadTemp.BU4BLT01_Set = DB2102.BU4BLT01.Set; PlcReadTemp.BU4BLT02_Set = DB2102.BU4BLT02.Set; PlcReadTemp.BU4BLT03_Set = DB2102.BU4BLT03.Set; PlcReadTemp.BU4BLT04_Set = DB2102.BU4BLT04.Set; PlcReadTemp.BU4BLT05_Set = DB2102.BU4BLT05.Set; PlcReadTemp.BU4BLT06_Set = DB2102.BU4BLT06.Set; PlcReadTemp.BU4BLT07_Set = DB2102.BU4BLT07.Set; PlcReadTemp.BU5BLT01_Set = DB2102.BU5BLT01.Set; PlcReadTemp.BU5BLT02_Set = DB2102.BU5BLT02.Set; PlcReadTemp.BU5BLT03_Set = DB2102.BU5BLT03.Set; PlcReadTemp.BU5BLT04_Set = DB2102.BU5BLT04.Set; PlcReadTemp.BU1ADB01_Set = DB2102.BU1ADB01.Set; PlcReadTemp.BU1BDB01_Set = DB2102.BU1BDB01.Set; PlcReadTemp.BU1CDB01_Set = DB2102.BU1CDB01.Set; PlcReadTemp.BU1DDB01_Set = DB2102.BU1DDB01.Set; PlcReadTemp.BU1EDB01_Set = DB2102.BU1EDB01.Set; PlcReadTemp.BU1FDB01_Set = DB2102.BU1FDB01.Set; PlcReadTemp.BU1GDB01_Set = DB2102.BU1GDB01.Set; PlcReadTemp.BU1HDB01_Set = DB2102.BU1HDB01.Set; PlcReadTemp.BU1IDB01_Set = DB2102.BU1IDB01.Set; PlcReadTemp.BU1JDB01_Set = DB2102.BU1JDB01.Set; PlcReadTemp.BU1KDB01_Set = DB2102.BU1KDB01.Set; PlcReadTemp.BU1LDB01_Set = DB2102.BU1LDB01.Set; PlcReadTemp.BU1GEB02_Set = DB2102.BU1GEB02.Set; PlcReadTemp.BU2GEB02_Set = DB2102.BU2GEB02.Set; PlcReadTemp.BU3GEB02_Set = DB2102.BU3GEB02.Set; PlcReadTemp.BU4GEB02_Set = DB2102.BU4GEB02.Set; PlcReadTemp.BU5GEB02_Set = DB2102.BU5GEB02.Set; PlcReadTemp.BU6GEB02_Set = DB2102.BU6GEB02.Set; PlcReadTemp.BU7GEB02_Set = DB2102.BU7GEB02.Set; PlcReadTemp.BU8GEB02_Set = DB2102.BU8GEB02.Set; PlcReadTemp.BU1DRB01_Set = DB2102.BU1DRB01.Set; PlcReadTemp.BU2DRB01_Set = DB2102.BU2DRB01.Set; PlcReadTemp.BU3DRB01_Set = DB2102.BU3DRB01.Set; PlcReadTemp.BU4DRB01_Set = DB2102.BU4DRB01.Set; PlcReadTemp.BU1GEB01_Set = DB2102.BU1GEB01.Set; PlcReadTemp.BU2GEB01_Set = DB2102.BU2GEB01.Set; PlcReadTemp.BU3GEB01_Set = DB2102.BU3GEB01.Set; PlcReadTemp.BU4GEB01_Set = DB2102.BU4GEB01.Set; PlcReadTemp.BU5GEB01_Set = DB2102.BU5GEB01.Set; PlcReadTemp.BU6GEB01_Set = DB2102.BU6GEB01.Set; PlcReadTemp.BU7GEB01_Set = DB2102.BU7GEB01.Set; PlcReadTemp.BU8GEB01_Set = DB2102.BU8GEB01.Set; PlcReadTemp.BU2ASF01_Set = DB2102.BU2ASF01.Set; PlcReadTemp.BU2ASF02_Set = DB2102.BU2ASF02.Set; PlcReadTemp.BU2BSF01_Set = DB2102.BU2BSF01.Set; PlcReadTemp.BU2BSF02_Set = DB2102.BU2BSF02.Set; PlcReadTemp.BU2CSF01_Set = DB2102.BU2CSF01.Set; PlcReadTemp.BU2CSF02_Set = DB2102.BU2CSF02.Set; PlcReadTemp.BU2DSF01_Set = DB2102.BU2DSF01.Set; PlcReadTemp.BU2DSF02_Set = DB2102.BU2DSF02.Set; PlcReadTemp.BUWeter1_Set = DB2102.BUWeter1.Set; PlcReadTemp.BUWeter2_Set = DB2102.BUWeter2.Set; PlcReadTemp.BUWeter3_Set = DB2102.BUWeter3.Set; PlcReadTemp.BUWeter4_Set = DB2102.BUWeter4.Set; PlcReadTemp.BUWeter5_Set = DB2102.BUWeter5.Set; PlcReadTemp.BUWeter6_Set = DB2102.BUWeter6.Set; PlcReadTemp.BUWeter7_Set = DB2102.BUWeter7.Set; PlcReadTemp.BUWeter8_Set = DB2102.BUWeter8.Set; PlcReadTemp.BU1ASF01_Alarm = DB2102.BU1ASF01.Alarm; PlcReadTemp.BU1BSF01_Alarm = DB2102.BU1BSF01.Alarm; PlcReadTemp.BU1CSF01_Alarm = DB2102.BU1CSF01.Alarm; PlcReadTemp.BU1DSF01_Alarm = DB2102.BU1DSF01.Alarm; PlcReadTemp.BU1ESF01_Alarm = DB2102.BU1ESF01.Alarm; PlcReadTemp.BU1FSF01_Alarm = DB2102.BU1FSF01.Alarm; PlcReadTemp.BU1GSF01_Alarm = DB2102.BU1GSF01.Alarm; PlcReadTemp.BU1HSF01_Alarm = DB2102.BU1HSF01.Alarm; PlcReadTemp.BU1ISF01_Alarm = DB2102.BU1ISF01.Alarm; PlcReadTemp.BU1JSF01_Alarm = DB2102.BU1JSF01.Alarm; PlcReadTemp.BU1KSF01_Alarm = DB2102.BU1KSF01.Alarm; PlcReadTemp.BU1LSF01_Alarm = DB2102.BU1LSF01.Alarm; PlcReadTemp.BU1MSF01_Alarm = DB2102.BU1MSF01.Alarm; PlcReadTemp.BU1NSF01_Alarm = DB2102.BU1NSF01.Alarm; PlcReadTemp.BU1OSF01_Alarm = DB2102.BU1OSF01.Alarm; PlcReadTemp.BU1BLT01_Alarm = DB2102.BU1BLT01.Alarm; PlcReadTemp.BU1BLT02_Alarm = DB2102.BU1BLT02.Alarm; PlcReadTemp.BU1BLT03_Alarm = DB2102.BU1BLT03.Alarm; PlcReadTemp.BU1BLT04_Alarm = DB2102.BU1BLT04.Alarm; PlcReadTemp.BU1BLT05_Alarm = DB2102.BU1BLT05.Alarm; PlcReadTemp.BU1BLT06_Alarm = DB2102.BU1BLT06.Alarm; PlcReadTemp.BU1BLT07_Alarm = DB2102.BU1BLT07.Alarm; PlcReadTemp.BU2BLT01_Alarm = DB2102.BU2BLT01.Alarm; PlcReadTemp.BU2BLT02_Alarm = DB2102.BU2BLT02.Alarm; PlcReadTemp.BU2BLT03_Alarm = DB2102.BU2BLT03.Alarm; PlcReadTemp.BU2BLT04_Alarm = DB2102.BU2BLT04.Alarm; PlcReadTemp.BU2BLT05_Alarm = DB2102.BU2BLT05.Alarm; PlcReadTemp.BU3BLT01_Alarm = DB2102.BU3BLT01.Alarm; PlcReadTemp.BU3BLT02_Alarm = DB2102.BU3BLT02.Alarm; PlcReadTemp.BU3BLT03_Alarm = DB2102.BU3BLT03.Alarm; PlcReadTemp.BU3BLT04_Alarm = DB2102.BU3BLT04.Alarm; PlcReadTemp.BU3BLT05_Alarm = DB2102.BU3BLT05.Alarm; PlcReadTemp.BU3BLT06_Alarm = DB2102.BU3BLT06.Alarm; PlcReadTemp.BU3BLT07_Alarm = DB2102.BU3BLT07.Alarm; PlcReadTemp.BU4BLT01_Alarm = DB2102.BU4BLT01.Alarm; PlcReadTemp.BU4BLT02_Alarm = DB2102.BU4BLT02.Alarm; PlcReadTemp.BU4BLT03_Alarm = DB2102.BU4BLT03.Alarm; PlcReadTemp.BU4BLT04_Alarm = DB2102.BU4BLT04.Alarm; PlcReadTemp.BU4BLT05_Alarm = DB2102.BU4BLT05.Alarm; PlcReadTemp.BU4BLT06_Alarm = DB2102.BU4BLT06.Alarm; PlcReadTemp.BU4BLT07_Alarm = DB2102.BU4BLT07.Alarm; PlcReadTemp.BU5BLT01_Alarm = DB2102.BU5BLT01.Alarm; PlcReadTemp.BU5BLT02_Alarm = DB2102.BU5BLT02.Alarm; PlcReadTemp.BU5BLT03_Alarm = DB2102.BU5BLT03.Alarm; PlcReadTemp.BU5BLT04_Alarm = DB2102.BU5BLT04.Alarm; PlcReadTemp.BU1ADB01_Alarm = DB2102.BU1ADB01.Alarm; PlcReadTemp.BU1BDB01_Alarm = DB2102.BU1BDB01.Alarm; PlcReadTemp.BU1CDB01_Alarm = DB2102.BU1CDB01.Alarm; PlcReadTemp.BU1DDB01_Alarm = DB2102.BU1DDB01.Alarm; PlcReadTemp.BU1EDB01_Alarm = DB2102.BU1EDB01.Alarm; PlcReadTemp.BU1FDB01_Alarm = DB2102.BU1FDB01.Alarm; PlcReadTemp.BU1GDB01_Alarm = DB2102.BU1GDB01.Alarm; PlcReadTemp.BU1HDB01_Alarm = DB2102.BU1HDB01.Alarm; PlcReadTemp.BU1IDB01_Alarm = DB2102.BU1IDB01.Alarm; PlcReadTemp.BU1JDB01_Alarm = DB2102.BU1JDB01.Alarm; PlcReadTemp.BU1KDB01_Alarm = DB2102.BU1KDB01.Alarm; PlcReadTemp.BU1LDB01_Alarm = DB2102.BU1LDB01.Alarm; PlcReadTemp.BU1GEB02_Alarm = DB2102.BU1GEB02.Alarm; PlcReadTemp.BU2GEB02_Alarm = DB2102.BU2GEB02.Alarm; PlcReadTemp.BU3GEB02_Alarm = DB2102.BU3GEB02.Alarm; PlcReadTemp.BU4GEB02_Alarm = DB2102.BU4GEB02.Alarm; PlcReadTemp.BU5GEB02_Alarm = DB2102.BU5GEB02.Alarm; PlcReadTemp.BU6GEB02_Alarm = DB2102.BU6GEB02.Alarm; PlcReadTemp.BU7GEB02_Alarm = DB2102.BU7GEB02.Alarm; PlcReadTemp.BU8GEB02_Alarm = DB2102.BU8GEB02.Alarm; PlcReadTemp.BU1DRB01_Alarm = DB2102.BU1DRB01.Alarm; PlcReadTemp.BU2DRB01_Alarm = DB2102.BU2DRB01.Alarm; PlcReadTemp.BU3DRB01_Alarm = DB2102.BU3DRB01.Alarm; PlcReadTemp.BU4DRB01_Alarm = DB2102.BU4DRB01.Alarm; PlcReadTemp.BU1GEB01_Alarm = DB2102.BU1GEB01.Alarm; PlcReadTemp.BU2GEB01_Alarm = DB2102.BU2GEB01.Alarm; PlcReadTemp.BU3GEB01_Alarm = DB2102.BU3GEB01.Alarm; PlcReadTemp.BU4GEB01_Alarm = DB2102.BU4GEB01.Alarm; PlcReadTemp.BU5GEB01_Alarm = DB2102.BU5GEB01.Alarm; PlcReadTemp.BU6GEB01_Alarm = DB2102.BU6GEB01.Alarm; PlcReadTemp.BU7GEB01_Alarm = DB2102.BU7GEB01.Alarm; PlcReadTemp.BU8GEB01_Alarm = DB2102.BU8GEB01.Alarm; PlcReadTemp.BU2ASF01_Alarm = DB2102.BU2ASF01.Alarm; PlcReadTemp.BU2ASF02_Alarm = DB2102.BU2ASF02.Alarm; PlcReadTemp.BU2BSF01_Alarm = DB2102.BU2BSF01.Alarm; PlcReadTemp.BU2BSF02_Alarm = DB2102.BU2BSF02.Alarm; PlcReadTemp.BU2CSF01_Alarm = DB2102.BU2CSF01.Alarm; PlcReadTemp.BU2CSF02_Alarm = DB2102.BU2CSF02.Alarm; PlcReadTemp.BU2DSF01_Alarm = DB2102.BU2DSF01.Alarm; PlcReadTemp.BU2DSF02_Alarm = DB2102.BU2DSF02.Alarm; PlcReadTemp.BUWeter1_Alarm = DB2102.BUWeter1.Alarm; PlcReadTemp.BUWeter2_Alarm = DB2102.BUWeter2.Alarm; PlcReadTemp.BUWeter3_Alarm = DB2102.BUWeter3.Alarm; PlcReadTemp.BUWeter4_Alarm = DB2102.BUWeter4.Alarm; PlcReadTemp.BUWeter5_Alarm = DB2102.BUWeter5.Alarm; PlcReadTemp.BUWeter6_Alarm = DB2102.BUWeter6.Alarm; PlcReadTemp.BUWeter7_Alarm = DB2102.BUWeter7.Alarm; PlcReadTemp.BUWeter8_Alarm = DB2102.BUWeter8.Alarm; //位置获取的不对 不应该获取set LeftPosition PlcReadTemp.DV2PCP01_SetL = DB2102.DV2PCP01.LeftPosition; PlcReadTemp.DV2PCP02_SetL = DB2102.DV2PCP02.LeftPosition; PlcReadTemp.DV2PCP03_SetL = DB2102.DV2PCP03.LeftPosition; PlcReadTemp.DV2PCP04_SetL = DB2102.DV2PCP04.LeftPosition; PlcReadTemp.DV2PCP05_SetL = DB2102.DV2PCP05.LeftPosition; PlcReadTemp.DV2PCP06_SetL = DB2102.DV2PCP06.LeftPosition; PlcReadTemp.DV2PCP07_SetL = DB2102.DV2PCP07.LeftPosition; PlcReadTemp.DV2PCP08_SetL = DB2102.DV2PCP08.LeftPosition; PlcReadTemp.DV2PCP09_SetL = DB2102.DV2PCP09.LeftPosition; PlcReadTemp.DV2PCP10_SetL = DB2102.DV2PCP10.LeftPosition; PlcReadTemp.DV2PCP11_SetL = DB2102.DV2PCP11.LeftPosition; PlcReadTemp.DV2PCP12_SetL = DB2102.DV2PCP12.LeftPosition; PlcReadTemp.DV2PCP13_SetL = DB2102.DV2PCP13.LeftPosition; PlcReadTemp.DV2PCP14_SetL = DB2102.DV2PCP14.LeftPosition; PlcReadTemp.DV2PCP01_SetR = DB2102.DV2PCP01.RightPosition; PlcReadTemp.DV2PCP02_SetR = DB2102.DV2PCP02.RightPosition; PlcReadTemp.DV2PCP03_SetR = DB2102.DV2PCP03.RightPosition; PlcReadTemp.DV2PCP04_SetR = DB2102.DV2PCP04.RightPosition; PlcReadTemp.DV2PCP05_SetR = DB2102.DV2PCP05.RightPosition; PlcReadTemp.DV2PCP06_SetR = DB2102.DV2PCP06.RightPosition; PlcReadTemp.DV2PCP07_SetR = DB2102.DV2PCP07.RightPosition; PlcReadTemp.DV2PCP08_SetR = DB2102.DV2PCP08.RightPosition; PlcReadTemp.DV2PCP09_SetR = DB2102.DV2PCP09.RightPosition; PlcReadTemp.DV2PCP10_SetR = DB2102.DV2PCP10.RightPosition; PlcReadTemp.DV2PCP11_SetR = DB2102.DV2PCP11.RightPosition; PlcReadTemp.DV2PCP12_SetR = DB2102.DV2PCP12.RightPosition; PlcReadTemp.DV2PCP13_SetR = DB2102.DV2PCP13.RightPosition; PlcReadTemp.DV2PCP14_SetR = DB2102.DV2PCP14.RightPosition; PlcReadTemp.DV2PCP01_AlarmL = DB2102.DV2PCP01.AlarmLeftPosition; PlcReadTemp.DV2PCP02_AlarmL = DB2102.DV2PCP02.AlarmLeftPosition; PlcReadTemp.DV2PCP03_AlarmL = DB2102.DV2PCP03.AlarmLeftPosition; PlcReadTemp.DV2PCP04_AlarmL = DB2102.DV2PCP04.AlarmLeftPosition; PlcReadTemp.DV2PCP05_AlarmL = DB2102.DV2PCP05.AlarmLeftPosition; PlcReadTemp.DV2PCP06_AlarmL = DB2102.DV2PCP06.AlarmLeftPosition; PlcReadTemp.DV2PCP07_AlarmL = DB2102.DV2PCP07.AlarmLeftPosition; PlcReadTemp.DV2PCP08_AlarmL = DB2102.DV2PCP08.AlarmLeftPosition; PlcReadTemp.DV2PCP09_AlarmL = DB2102.DV2PCP09.AlarmLeftPosition; PlcReadTemp.DV2PCP10_AlarmL = DB2102.DV2PCP10.AlarmLeftPosition; PlcReadTemp.DV2PCP11_AlarmL = DB2102.DV2PCP11.AlarmLeftPosition; PlcReadTemp.DV2PCP12_AlarmL = DB2102.DV2PCP12.AlarmLeftPosition; PlcReadTemp.DV2PCP13_AlarmL = DB2102.DV2PCP13.AlarmLeftPosition; PlcReadTemp.DV2PCP14_AlarmL = DB2102.DV2PCP14.AlarmLeftPosition; PlcReadTemp.DV2PCP01_AlarmR = DB2102.DV2PCP01.AlarmRightPosition; PlcReadTemp.DV2PCP02_AlarmR = DB2102.DV2PCP02.AlarmRightPosition; PlcReadTemp.DV2PCP03_AlarmR = DB2102.DV2PCP03.AlarmRightPosition; PlcReadTemp.DV2PCP04_AlarmR = DB2102.DV2PCP04.AlarmRightPosition; PlcReadTemp.DV2PCP05_AlarmR = DB2102.DV2PCP05.AlarmRightPosition; PlcReadTemp.DV2PCP06_AlarmR = DB2102.DV2PCP06.AlarmRightPosition; PlcReadTemp.DV2PCP07_AlarmR = DB2102.DV2PCP07.AlarmRightPosition; PlcReadTemp.DV2PCP08_AlarmR = DB2102.DV2PCP08.AlarmRightPosition; PlcReadTemp.DV2PCP09_AlarmR = DB2102.DV2PCP09.AlarmRightPosition; PlcReadTemp.DV2PCP10_AlarmR = DB2102.DV2PCP10.AlarmRightPosition; PlcReadTemp.DV2PCP11_AlarmR = DB2102.DV2PCP11.AlarmRightPosition; PlcReadTemp.DV2PCP12_AlarmR = DB2102.DV2PCP12.AlarmRightPosition; PlcReadTemp.DV2PCP13_AlarmR = DB2102.DV2PCP13.AlarmRightPosition; PlcReadTemp.DV2PCP14_AlarmR = DB2102.DV2PCP14.AlarmRightPosition; ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP01, PlcReadTemp.DV2PCP01_AlarmR, PlcReadTemp.DV2PCP01_SetR, PlcReadTemp.DV2PCP01_AlarmL, PlcReadTemp.DV2PCP01_SetL, 4); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP02, PlcReadTemp.DV2PCP02_AlarmR, PlcReadTemp.DV2PCP02_SetR, PlcReadTemp.DV2PCP02_AlarmL, PlcReadTemp.DV2PCP02_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP03, PlcReadTemp.DV2PCP03_AlarmL, PlcReadTemp.DV2PCP03_SetL, PlcReadTemp.DV2PCP03_AlarmR, PlcReadTemp.DV2PCP03_SetR, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP04, PlcReadTemp.DV2PCP04_AlarmR, PlcReadTemp.DV2PCP04_SetR, PlcReadTemp.DV2PCP04_AlarmL, PlcReadTemp.DV2PCP04_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP05, PlcReadTemp.DV2PCP05_AlarmR, PlcReadTemp.DV2PCP05_SetR, PlcReadTemp.DV2PCP05_AlarmL, PlcReadTemp.DV2PCP05_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP06, PlcReadTemp.DV2PCP06_AlarmR, PlcReadTemp.DV2PCP06_SetR, PlcReadTemp.DV2PCP06_AlarmL, PlcReadTemp.DV2PCP06_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP07, PlcReadTemp.DV2PCP07_AlarmL, PlcReadTemp.DV2PCP07_SetL, PlcReadTemp.DV2PCP07_AlarmR, PlcReadTemp.DV2PCP07_SetR, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP08, PlcReadTemp.DV2PCP08_AlarmR, PlcReadTemp.DV2PCP08_SetR, PlcReadTemp.DV2PCP08_AlarmL, PlcReadTemp.DV2PCP08_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP09, PlcReadTemp.DV2PCP09_AlarmR, PlcReadTemp.DV2PCP09_SetR, PlcReadTemp.DV2PCP09_AlarmL, PlcReadTemp.DV2PCP09_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP10, PlcReadTemp.DV2PCP10_AlarmR, PlcReadTemp.DV2PCP10_SetR, PlcReadTemp.DV2PCP10_AlarmL, PlcReadTemp.DV2PCP10_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP11, PlcReadTemp.DV2PCP11_AlarmR, PlcReadTemp.DV2PCP11_SetR, PlcReadTemp.DV2PCP11_AlarmL, PlcReadTemp.DV2PCP11_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP12, PlcReadTemp.DV2PCP12_AlarmR, PlcReadTemp.DV2PCP12_SetR, PlcReadTemp.DV2PCP12_AlarmL, PlcReadTemp.DV2PCP12_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP13, PlcReadTemp.DV2PCP13_AlarmR, PlcReadTemp.DV2PCP13_SetR, PlcReadTemp.DV2PCP13_AlarmL, PlcReadTemp.DV2PCP13_SetL, 0); ControlsHelper.SetThreeWayValve(ThreeValveE.DV2PCP14, PlcReadTemp.DV2PCP14_AlarmR, PlcReadTemp.DV2PCP14_SetR, PlcReadTemp.DV2PCP14_AlarmL, PlcReadTemp.DV2PCP14_SetL, 0); ControlsHelper.SetLjSwith(SwithE.BU1ASF01, PlcReadTemp.BU1ASF01_Set, PlcReadTemp.BU1ASF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1BSF01, PlcReadTemp.BU1BSF01_Set, PlcReadTemp.BU1BSF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1CSF01, PlcReadTemp.BU1CSF01_Set, PlcReadTemp.BU1CSF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1DSF01, PlcReadTemp.BU1DSF01_Set, PlcReadTemp.BU1DSF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1ESF01, PlcReadTemp.BU1ESF01_Set, PlcReadTemp.BU1ESF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1FSF01, PlcReadTemp.BU1FSF01_Set, PlcReadTemp.BU1FSF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1GSF01, PlcReadTemp.BU1GSF01_Set, PlcReadTemp.BU1GSF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1HSF01, PlcReadTemp.BU1HSF01_Set, PlcReadTemp.BU1HSF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1ISF01, PlcReadTemp.BU1ISF01_Set, PlcReadTemp.BU1ISF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1JSF01, PlcReadTemp.BU1JSF01_Set, PlcReadTemp.BU1JSF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1KSF01, PlcReadTemp.BU1KSF01_Set, PlcReadTemp.BU1KSF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1LSF01, PlcReadTemp.BU1LSF01_Set, PlcReadTemp.BU1LSF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1MSF01, PlcReadTemp.BU1MSF01_Set, PlcReadTemp.BU1MSF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1NSF01, PlcReadTemp.BU1NSF01_Set, PlcReadTemp.BU1NSF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1OSF01, PlcReadTemp.BU1OSF01_Set, PlcReadTemp.BU1OSF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1BLT01, PlcReadTemp.BU1BLT01_Set, PlcReadTemp.BU1BLT01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1BLT02, PlcReadTemp.BU1BLT02_Set, PlcReadTemp.BU1BLT02_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1BLT03, PlcReadTemp.BU1BLT03_Set, PlcReadTemp.BU1BLT03_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1BLT04, PlcReadTemp.BU1BLT04_Set, PlcReadTemp.BU1BLT04_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1BLT05, PlcReadTemp.BU1BLT05_Set, PlcReadTemp.BU1BLT05_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1BLT06, PlcReadTemp.BU1BLT06_Set, PlcReadTemp.BU1BLT06_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1BLT07, PlcReadTemp.BU1BLT07_Set, PlcReadTemp.BU1BLT07_Alarm); ControlsHelper.SetLjSwith(SwithE.BU2BLT01, PlcReadTemp.BU2BLT01_Set, PlcReadTemp.BU2BLT01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU2BLT02, PlcReadTemp.BU2BLT02_Set, PlcReadTemp.BU2BLT02_Alarm); ControlsHelper.SetLjSwith(SwithE.BU2BLT03, PlcReadTemp.BU2BLT03_Set, PlcReadTemp.BU2BLT03_Alarm); ControlsHelper.SetLjSwith(SwithE.BU2BLT04, PlcReadTemp.BU2BLT04_Set, PlcReadTemp.BU2BLT04_Alarm); ControlsHelper.SetLjSwith(SwithE.BU2BLT05, PlcReadTemp.BU2BLT05_Set, PlcReadTemp.BU2BLT05_Alarm); ControlsHelper.SetLjSwith(SwithE.BU3BLT01, PlcReadTemp.BU3BLT01_Set, PlcReadTemp.BU3BLT01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU3BLT02, PlcReadTemp.BU3BLT02_Set, PlcReadTemp.BU3BLT02_Alarm); ControlsHelper.SetLjSwith(SwithE.BU3BLT03, PlcReadTemp.BU3BLT03_Set, PlcReadTemp.BU3BLT03_Alarm); ControlsHelper.SetLjSwith(SwithE.BU3BLT04, PlcReadTemp.BU3BLT04_Set, PlcReadTemp.BU3BLT04_Alarm); ControlsHelper.SetLjSwith(SwithE.BU3BLT05, PlcReadTemp.BU3BLT05_Set, PlcReadTemp.BU3BLT05_Alarm); ControlsHelper.SetLjSwith(SwithE.BU3BLT06, PlcReadTemp.BU3BLT06_Set, PlcReadTemp.BU3BLT06_Alarm); ControlsHelper.SetLjSwith(SwithE.BU3BLT07, PlcReadTemp.BU3BLT07_Set, PlcReadTemp.BU3BLT07_Alarm); ControlsHelper.SetLjSwith(SwithE.BU4BLT01, PlcReadTemp.BU4BLT01_Set, PlcReadTemp.BU4BLT01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU4BLT02, PlcReadTemp.BU4BLT02_Set, PlcReadTemp.BU4BLT02_Alarm); ControlsHelper.SetLjSwith(SwithE.BU4BLT03, PlcReadTemp.BU4BLT03_Set, PlcReadTemp.BU4BLT03_Alarm); ControlsHelper.SetLjSwith(SwithE.BU4BLT04, PlcReadTemp.BU4BLT04_Set, PlcReadTemp.BU4BLT04_Alarm); ControlsHelper.SetLjSwith(SwithE.BU4BLT05, PlcReadTemp.BU4BLT05_Set, PlcReadTemp.BU4BLT05_Alarm); ControlsHelper.SetLjSwith(SwithE.BU4BLT06, PlcReadTemp.BU4BLT06_Set, PlcReadTemp.BU4BLT06_Alarm); ControlsHelper.SetLjSwith(SwithE.BU4BLT07, PlcReadTemp.BU4BLT07_Set, PlcReadTemp.BU4BLT07_Alarm); ControlsHelper.SetLjSwith(SwithE.BU5BLT01, PlcReadTemp.BU5BLT01_Set, PlcReadTemp.BU5BLT01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU5BLT02, PlcReadTemp.BU5BLT02_Set, PlcReadTemp.BU5BLT02_Alarm); ControlsHelper.SetLjSwith(SwithE.BU5BLT03, PlcReadTemp.BU5BLT03_Set, PlcReadTemp.BU5BLT03_Alarm); ControlsHelper.SetLjSwith(SwithE.BU5BLT04, PlcReadTemp.BU5BLT04_Set, PlcReadTemp.BU5BLT04_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1ADB01, PlcReadTemp.BU1ADB01_Set, PlcReadTemp.BU1ADB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1BDB01, PlcReadTemp.BU1BDB01_Set, PlcReadTemp.BU1BDB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1CDB01, PlcReadTemp.BU1CDB01_Set, PlcReadTemp.BU1CDB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1DDB01, PlcReadTemp.BU1DDB01_Set, PlcReadTemp.BU1DDB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1EDB01, PlcReadTemp.BU1EDB01_Set, PlcReadTemp.BU1EDB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1FDB01, PlcReadTemp.BU1FDB01_Set, PlcReadTemp.BU1FDB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1GDB01, PlcReadTemp.BU1GDB01_Set, PlcReadTemp.BU1GDB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1HDB01, PlcReadTemp.BU1HDB01_Set, PlcReadTemp.BU1HDB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1IDB01, PlcReadTemp.BU1IDB01_Set, PlcReadTemp.BU1IDB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1JDB01, PlcReadTemp.BU1JDB01_Set, PlcReadTemp.BU1JDB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1KDB01, PlcReadTemp.BU1KDB01_Set, PlcReadTemp.BU1KDB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1LDB01, PlcReadTemp.BU1LDB01_Set, PlcReadTemp.BU1LDB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1GEB02, PlcReadTemp.BU1GEB02_Set, PlcReadTemp.BU1GEB02_Alarm); ControlsHelper.SetLjSwith(SwithE.BU2GEB02, PlcReadTemp.BU2GEB02_Set, PlcReadTemp.BU2GEB02_Alarm); ControlsHelper.SetLjSwith(SwithE.BU3GEB02, PlcReadTemp.BU3GEB02_Set, PlcReadTemp.BU3GEB02_Alarm); ControlsHelper.SetLjSwith(SwithE.BU4GEB02, PlcReadTemp.BU4GEB02_Set, PlcReadTemp.BU4GEB02_Alarm); ControlsHelper.SetLjSwith(SwithE.BU5GEB02, PlcReadTemp.BU5GEB02_Set, PlcReadTemp.BU5GEB02_Alarm); ControlsHelper.SetLjSwith(SwithE.BU6GEB02, PlcReadTemp.BU6GEB02_Set, PlcReadTemp.BU6GEB02_Alarm); ControlsHelper.SetLjSwith(SwithE.BU7GEB02, PlcReadTemp.BU7GEB02_Set, PlcReadTemp.BU7GEB02_Alarm); ControlsHelper.SetLjSwith(SwithE.BU8GEB02, PlcReadTemp.BU8GEB02_Set, PlcReadTemp.BU8GEB02_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1DRB01, PlcReadTemp.BU1DRB01_Set, PlcReadTemp.BU1DRB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU2DRB01, PlcReadTemp.BU2DRB01_Set, PlcReadTemp.BU2DRB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU3DRB01, PlcReadTemp.BU3DRB01_Set, PlcReadTemp.BU3DRB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU4DRB01, PlcReadTemp.BU4DRB01_Set, PlcReadTemp.BU4DRB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU1GEB01, PlcReadTemp.BU1GEB01_Set, PlcReadTemp.BU1GEB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU2GEB01, PlcReadTemp.BU2GEB01_Set, PlcReadTemp.BU2GEB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU3GEB01, PlcReadTemp.BU3GEB01_Set, PlcReadTemp.BU3GEB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU4GEB01, PlcReadTemp.BU4GEB01_Set, PlcReadTemp.BU4GEB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU5GEB01, PlcReadTemp.BU5GEB01_Set, PlcReadTemp.BU5GEB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU6GEB01, PlcReadTemp.BU6GEB01_Set, PlcReadTemp.BU6GEB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU7GEB01, PlcReadTemp.BU7GEB01_Set, PlcReadTemp.BU7GEB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU8GEB01, PlcReadTemp.BU8GEB01_Set, PlcReadTemp.BU8GEB01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU2ASF01, PlcReadTemp.BU2ASF01_Set, PlcReadTemp.BU2ASF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU2ASF02, PlcReadTemp.BU2ASF02_Set, PlcReadTemp.BU2ASF02_Alarm); ControlsHelper.SetLjSwith(SwithE.BU2BSF01, PlcReadTemp.BU2BSF01_Set, PlcReadTemp.BU2BSF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU2BSF02, PlcReadTemp.BU2BSF02_Set, PlcReadTemp.BU2BSF02_Alarm); ControlsHelper.SetLjSwith(SwithE.BU2CSF01, PlcReadTemp.BU2CSF01_Set, PlcReadTemp.BU2CSF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU2CSF02, PlcReadTemp.BU2CSF02_Set, PlcReadTemp.BU2CSF02_Alarm); ControlsHelper.SetLjSwith(SwithE.BU2DSF01, PlcReadTemp.BU2DSF01_Set, PlcReadTemp.BU2DSF01_Alarm); ControlsHelper.SetLjSwith(SwithE.BU2DSF02, PlcReadTemp.BU2DSF02_Set, PlcReadTemp.BU2DSF02_Alarm); ControlsHelper.SetLjSwith(SwithE.BUWeter1, PlcReadTemp.BUWeter1_Set, PlcReadTemp.BUWeter1_Alarm); ControlsHelper.SetLjSwith(SwithE.BUWeter2, PlcReadTemp.BUWeter2_Set, PlcReadTemp.BUWeter2_Alarm); ControlsHelper.SetLjSwith(SwithE.BUWeter3, PlcReadTemp.BUWeter3_Set, PlcReadTemp.BUWeter3_Alarm); ControlsHelper.SetLjSwith(SwithE.BUWeter4, PlcReadTemp.BUWeter4_Set, PlcReadTemp.BUWeter4_Alarm); ControlsHelper.SetLjSwith(SwithE.BUWeter5, PlcReadTemp.BUWeter5_Set, PlcReadTemp.BUWeter5_Alarm); ControlsHelper.SetLjSwith(SwithE.BUWeter6, PlcReadTemp.BUWeter6_Set, PlcReadTemp.BUWeter6_Alarm); ControlsHelper.SetLjSwith(SwithE.BUWeter7, PlcReadTemp.BUWeter7_Set, PlcReadTemp.BUWeter7_Alarm); ControlsHelper.SetLjSwith(SwithE.BUWeter8, PlcReadTemp.BUWeter8_Set, PlcReadTemp.BUWeter8_Alarm); } /// /// DB2103数据读取、控件赋值 /// private void NewThreadDb2103() { PlcReadTemp.DM1DRY1_ACT_Speed_Set = DB2103.DM1DRY1.ACT_Speed; PlcReadTemp.DM1DRY2_ACT_Speed_Set = DB2103.DM1DRY2.ACT_Speed; PlcReadTemp.DM1DRY3_ACT_Speed_Set = DB2103.DM1DRY3.ACT_Speed; PlcReadTemp.DM1DRY4_ACT_Speed_Set = DB2103.DM1DRY4.ACT_Speed; PlcReadTemp.DM1GEM_Set = DB2103.DM1GEM.ACT_Speed; PlcReadTemp.DM2GEM_Set = DB2103.DM2GEM.ACT_Speed; PlcReadTemp.DM3GEM_Set = DB2103.DM3GEM.ACT_Speed; PlcReadTemp.DM4GEM_Set = DB2103.DM4GEM.ACT_Speed; PlcReadTemp.DM5GEM_Set = DB2103.DM5GEM.ACT_Speed; PlcReadTemp.DM6GEM_Set = DB2103.DM6GEM.ACT_Speed; PlcReadTemp.DM7GEM_Set = DB2103.DM7GEM.ACT_Speed; PlcReadTemp.DM8GEM_Set = DB2103.DM8GEM.ACT_Speed; PlcReadTemp.DM2ASF01_Set = DB2103.DM2ASF01.ACT_Speed; PlcReadTemp.DM2BSF01_Set = DB2103.DM2BSF01.ACT_Speed; PlcReadTemp.DM2CSF01_Set = DB2103.DM2CSF01.ACT_Speed; PlcReadTemp.DM2DSF01_Set = DB2103.DM2DSF01.ACT_Speed; PlcReadTemp.DM1ASF01_Set = DB2103.DM1ASF01.Run; PlcReadTemp.DM1BSF01_Set = DB2103.DM1BSF01.Run; PlcReadTemp.DM1CSF01_Set = DB2103.DM1CSF01.Run; PlcReadTemp.DM1DSF01_Set = DB2103.DM1DSF01.Run; PlcReadTemp.DM1ESF01_Set = DB2103.DM1ESF01.Run; PlcReadTemp.DM1FSF01_Set = DB2103.DM1FSF01.Run; PlcReadTemp.DM1GSF01_Set = DB2103.DM1GSF01.Run; PlcReadTemp.DM1HSF01_Set = DB2103.DM1HSF01.Run; PlcReadTemp.DM1ISF01_Set = DB2103.DM1ISF01.Run; PlcReadTemp.DM1JSF01_Set = DB2103.DM1JSF01.Run; PlcReadTemp.DM1KSF01_Set = DB2103.DM1KSF01.Run; PlcReadTemp.DM1LSF01_Set = DB2103.DM1LSF01.Run; PlcReadTemp.DM1MSF01_Set = DB2103.DM1MSF01.Run; PlcReadTemp.DM1NSF01_Set = DB2103.DM1NSF01.Run; PlcReadTemp.DM1OSF01_Set = DB2103.DM1OSF01.Running; if (DB2103.DM2ASF01.Running) { if (DB2103.DM2ASF01.Polarity) { PlcReadTemp.DM2ASF01L_Set = true; PlcReadTemp.DM2ASF01R_Set = false; } else { PlcReadTemp.DM2ASF01L_Set = false; PlcReadTemp.DM2ASF01R_Set = true; } //PlcReadTemp.DM2ASF01L_Set = true; //PlcReadTemp.DM2ASF01R_Set = true; } else { PlcReadTemp.DM2ASF01L_Set = false; PlcReadTemp.DM2ASF01R_Set = false; } if (DB2103.DM2BSF01.Running) { if (DB2103.DM2BSF01.Polarity) { PlcReadTemp.DM2BSF01L_Set = true; PlcReadTemp.DM2BSF01R_Set = false; } else { PlcReadTemp.DM2BSF01L_Set = false; PlcReadTemp.DM2BSF01R_Set = true; } //PlcReadTemp.DM2BSF01L_Set = true; //PlcReadTemp.DM2BSF01R_Set = true; } else { PlcReadTemp.DM2BSF01L_Set = false; PlcReadTemp.DM2BSF01R_Set = false; } if (DB2103.DM2CSF01.Running) { if (DB2103.DM2CSF01.Polarity) { PlcReadTemp.DM2CSF01L_Set = true; PlcReadTemp.DM2CSF01R_Set = false; } else { PlcReadTemp.DM2CSF01L_Set = false; PlcReadTemp.DM2CSF01R_Set = true; } //PlcReadTemp.DM2CSF01L_Set = true; //PlcReadTemp.DM2CSF01R_Set = true; } else { PlcReadTemp.DM2CSF01L_Set = false; PlcReadTemp.DM2CSF01R_Set = false; } if (DB2103.DM2DSF01.Running) { if (DB2103.DM2DSF01.Polarity) { PlcReadTemp.DM2DSF01L_Set = true; PlcReadTemp.DM2DSF01R_Set = false; } else { PlcReadTemp.DM2DSF01L_Set = false; PlcReadTemp.DM2DSF01R_Set = true; } } else { PlcReadTemp.DM2DSF01L_Set = false; PlcReadTemp.DM2DSF01R_Set = false; } PlcReadTemp.DM1ADF01_Set = DB2103.DM1ADF01.Run; PlcReadTemp.DM1BDF01_Set = DB2103.DM1BDF01.Run; PlcReadTemp.DM1CDF01_Set = DB2103.DM1CDF01.Run; PlcReadTemp.DM1DDF01_Set = DB2103.DM1DDF01.Run; PlcReadTemp.DM1EDF01_Set = DB2103.DM1EDF01.Run; PlcReadTemp.DM1FDF01_Set = DB2103.DM1FDF01.Run; PlcReadTemp.DM1GDF01_Set = DB2103.DM1GDF01.Run; PlcReadTemp.DM1HDF01_Set = DB2103.DM1HDF01.Run; PlcReadTemp.DM1IDF01_Set = DB2103.DM1IDF01.Run; PlcReadTemp.DM1JDF01_Set = DB2103.DM1JDF01.Run; PlcReadTemp.DM1KDF01_Set = DB2103.DM1KDF01.Run; PlcReadTemp.DM1LDF01_Set = DB2103.DM1LDF01.Run; PlcReadTemp.DM1ADB01_Set = DB2103.DM1ADB01.Run; PlcReadTemp.DM1BDB01_Set = DB2103.DM1BDB01.Run; PlcReadTemp.DM1CDB01_Set = DB2103.DM1CDB01.Run; PlcReadTemp.DM1DDB01_Set = DB2103.DM1DDB01.Run; PlcReadTemp.DM1EDB01_Set = DB2103.DM1EDB01.Run; PlcReadTemp.DM1FDB01_Set = DB2103.DM1FDB01.Run; PlcReadTemp.DM1GDB01_Set = DB2103.DM1GDB01.Run; PlcReadTemp.DM1HDB01_Set = DB2103.DM1HDB01.Run; PlcReadTemp.DM1IDB01_Set = DB2103.DM1IDB01.Run; PlcReadTemp.DM1JDB01_Set = DB2103.DM1JDB01.Run; PlcReadTemp.DM1KDB01_Set = DB2103.DM1KDB01.Run; PlcReadTemp.DM1LDB01_Set = DB2103.DM1LDB01.Run; PlcReadTemp.DM1DRY1_Running_Set = DB2103.DM1DRY1.Running; PlcReadTemp.DM1DRY2_Running_Set = DB2103.DM1DRY2.Running; PlcReadTemp.DM1DRY3_Running_Set = DB2103.DM1DRY3.Running; PlcReadTemp.DM1DRY4_Running_Set = DB2103.DM1DRY4.Running; PlcReadTemp.DMWETER1_Set = DB2103.DMWETER1.Running; PlcReadTemp.DMWETER2_Set = DB2103.DMWETER2.Running; PlcReadTemp.DMWETER3_Set = DB2103.DMWETER3.Running; PlcReadTemp.DMWETER4_Set = DB2103.DMWETER4.Running; PlcReadTemp.DMWETER5_Set = DB2103.DMWETER5.Running; PlcReadTemp.DMWETER6_Set = DB2103.DMWETER6.Running; PlcReadTemp.DMWETER7_Set = DB2103.DMWETER7.Running; PlcReadTemp.DMWETER8_Set = DB2103.DMWETER8.Running; PlcReadTemp.DMWETER1_Alarm = DB2103.DMWETER1.Alarm; PlcReadTemp.DMWETER2_Alarm = DB2103.DMWETER2.Alarm; PlcReadTemp.DMWETER3_Alarm = DB2103.DMWETER3.Alarm; PlcReadTemp.DMWETER4_Alarm = DB2103.DMWETER4.Alarm; PlcReadTemp.DMWETER5_Alarm = DB2103.DMWETER5.Alarm; PlcReadTemp.DMWETER6_Alarm = DB2103.DMWETER6.Alarm; PlcReadTemp.DMWETER7_Alarm = DB2103.DMWETER7.Alarm; PlcReadTemp.DMWETER8_Alarm = DB2103.DMWETER8.Alarm; ControlsHelper.SetMCLabel(LabelE.DM1DRY1_ACT_Speed, (float)Math.Round(PlcReadTemp.DM1DRY1_ACT_Speed_Set, 2)); ControlsHelper.SetMCLabel(LabelE.DM1DRY2_ACT_Speed, (float)Math.Round(PlcReadTemp.DM1DRY2_ACT_Speed_Set, 2)); ControlsHelper.SetMCLabel(LabelE.DM1DRY3_ACT_Speed, (float)Math.Round(PlcReadTemp.DM1DRY3_ACT_Speed_Set, 2)); ControlsHelper.SetMCLabel(LabelE.DM1DRY4_ACT_Speed, (float)Math.Round(PlcReadTemp.DM1DRY4_ACT_Speed_Set, 2)); ControlsHelper.SetMCLabel(LabelE.DM1GEM, (float)Math.Round(PlcReadTemp.DM1GEM_Set, 2)); ControlsHelper.SetMCLabel(LabelE.DM2GEM, (float)Math.Round(PlcReadTemp.DM2GEM_Set, 2)); ControlsHelper.SetMCLabel(LabelE.DM3GEM, (float)Math.Round(PlcReadTemp.DM3GEM_Set, 2)); ControlsHelper.SetMCLabel(LabelE.DM4GEM, (float)Math.Round(PlcReadTemp.DM4GEM_Set, 2)); ControlsHelper.SetMCLabel(LabelE.DM5GEM, (float)Math.Round(PlcReadTemp.DM5GEM_Set, 2)); ControlsHelper.SetMCLabel(LabelE.DM6GEM, (float)Math.Round(PlcReadTemp.DM6GEM_Set, 2)); ControlsHelper.SetMCLabel(LabelE.DM7GEM, (float)Math.Round(PlcReadTemp.DM7GEM_Set, 2)); ControlsHelper.SetMCLabel(LabelE.DM8GEM, (float)Math.Round(PlcReadTemp.DM8GEM_Set, 2)); ControlsHelper.SetMCLabel(LabelE.DM2ASF01, (float)Math.Round(PlcReadTemp.DM2ASF01_Set, 2)); ControlsHelper.SetMCLabel(LabelE.DM2BSF01, (float)Math.Round(PlcReadTemp.DM2BSF01_Set, 2)); ControlsHelper.SetMCLabel(LabelE.DM2CSF01, (float)Math.Round(PlcReadTemp.DM2CSF01_Set, 2)); ControlsHelper.SetMCLabel(LabelE.DM2DSF01, (float)Math.Round(PlcReadTemp.DM2DSF01_Set, 2)); ControlsHelper.SetRSCREWBIG(RSCREE.DM1ASF01, PlcReadTemp.DM1ASF01_Set); ControlsHelper.SetRSCREWBIG(RSCREE.DM1BSF01, PlcReadTemp.DM1BSF01_Set); ControlsHelper.SetLSCREWBIG(LSCREE.DM1CSF01, PlcReadTemp.DM1CSF01_Set); ControlsHelper.SetLSCREWBIG(LSCREE.DM1DSF01, PlcReadTemp.DM1DSF01_Set); ControlsHelper.SetRSCREWBIG(RSCREE.DM1ESF01, PlcReadTemp.DM1ESF01_Set); ControlsHelper.SetLSCREWBIG(LSCREE.DM1FSF01, PlcReadTemp.DM1FSF01_Set); ControlsHelper.SetRSCREWBIG(RSCREE.DM1GSF01, PlcReadTemp.DM1GSF01_Set); ControlsHelper.SetRSCREWBIG(RSCREE.DM1HSF01, PlcReadTemp.DM1HSF01_Set); ControlsHelper.SetLSCREWBIG(LSCREE.DM1ISF01, PlcReadTemp.DM1ISF01_Set); ControlsHelper.SetLSCREWBIG(LSCREE.DM1JSF01, PlcReadTemp.DM1JSF01_Set); ControlsHelper.SetRSCREWBIG(RSCREE.DM1KSF01, PlcReadTemp.DM1KSF01_Set); ControlsHelper.SetRSCREWBIG(RSCREE.DM1LSF01, PlcReadTemp.DM1LSF01_Set); ControlsHelper.SetLSCREWBIG(LSCREE.DM1MSF01, PlcReadTemp.DM1MSF01_Set); ControlsHelper.SetLSCREWBIG(LSCREE.DM1NSF01, PlcReadTemp.DM1NSF01_Set); ControlsHelper.SetRSCREWBIG(RSCREE.DM1OSF01, PlcReadTemp.DM1OSF01_Set); ControlsHelper.SetLSCREWBIG(LSCREE.DM2ASF01L, PlcReadTemp.DM2ASF01L_Set); ControlsHelper.SetLSCREWBIG(LSCREE.DM2BSF01L, PlcReadTemp.DM2BSF01L_Set); ControlsHelper.SetLSCREWBIG(LSCREE.DM2CSF01L, PlcReadTemp.DM2CSF01L_Set); ControlsHelper.SetLSCREWBIG(LSCREE.DM2DSF01L, PlcReadTemp.DM2DSF01L_Set); ControlsHelper.SetRSCREWBIG(RSCREE.DM2ASF01R, PlcReadTemp.DM2ASF01R_Set); ControlsHelper.SetRSCREWBIG(RSCREE.DM2BSF01R, PlcReadTemp.DM2BSF01R_Set); ControlsHelper.SetRSCREWBIG(RSCREE.DM2CSF01R, PlcReadTemp.DM2CSF01R_Set); ControlsHelper.SetRSCREWBIG(RSCREE.DM2DSF01R, PlcReadTemp.DM2DSF01R_Set); ControlsHelper.SetFan(FanE.DM1ADF01, PlcReadTemp.DM1ADF01_Set); ControlsHelper.SetFan(FanE.DM1BDF01, PlcReadTemp.DM1BDF01_Set); ControlsHelper.SetFan(FanE.DM1CDF01, PlcReadTemp.DM1CDF01_Set); ControlsHelper.SetFan(FanE.DM1DDF01, PlcReadTemp.DM1DDF01_Set); ControlsHelper.SetFan(FanE.DM1EDF01, PlcReadTemp.DM1EDF01_Set); ControlsHelper.SetFan(FanE.DM1FDF01, PlcReadTemp.DM1FDF01_Set); ControlsHelper.SetFan(FanE.DM1GDF01, PlcReadTemp.DM1GDF01_Set); ControlsHelper.SetFan(FanE.DM1HDF01, PlcReadTemp.DM1HDF01_Set); ControlsHelper.SetFan(FanE.DM1IDF01, PlcReadTemp.DM1IDF01_Set); ControlsHelper.SetFan(FanE.DM1JDF01, PlcReadTemp.DM1JDF01_Set); ControlsHelper.SetFan(FanE.DM1KDF01, PlcReadTemp.DM1KDF01_Set); ControlsHelper.SetFan(FanE.DM1LDF01, PlcReadTemp.DM1LDF01_Set); ControlsHelper.SetFan(FanE.DM1ADB01, PlcReadTemp.DM1ADB01_Set); ControlsHelper.SetFan(FanE.DM1BDB01, PlcReadTemp.DM1BDB01_Set); ControlsHelper.SetFan(FanE.DM1CDB01, PlcReadTemp.DM1CDB01_Set); ControlsHelper.SetFan(FanE.DM1DDB01, PlcReadTemp.DM1DDB01_Set); ControlsHelper.SetFan(FanE.DM1EDB01, PlcReadTemp.DM1EDB01_Set); ControlsHelper.SetFan(FanE.DM1FDB01, PlcReadTemp.DM1FDB01_Set); ControlsHelper.SetFan(FanE.DM1GDB01, PlcReadTemp.DM1GDB01_Set); ControlsHelper.SetFan(FanE.DM1HDB01, PlcReadTemp.DM1HDB01_Set); ControlsHelper.SetFan(FanE.DM1IDB01, PlcReadTemp.DM1IDB01_Set); ControlsHelper.SetFan(FanE.DM1JDB01, PlcReadTemp.DM1JDB01_Set); ControlsHelper.SetFan(FanE.DM1KDB01, PlcReadTemp.DM1KDB01_Set); ControlsHelper.SetFan(FanE.DM1LDB01, PlcReadTemp.DM1LDB01_Set); ControlsHelper.SetFan(FanE.DM1DRY1_Running, PlcReadTemp.DM1DRY1_Running_Set); ControlsHelper.SetFan(FanE.DM1DRY2_Running, PlcReadTemp.DM1DRY2_Running_Set); ControlsHelper.SetFan(FanE.DM1DRY3_Running, PlcReadTemp.DM1DRY3_Running_Set); ControlsHelper.SetFan(FanE.DM1DRY4_Running, PlcReadTemp.DM1DRY4_Running_Set); ControlsHelper.SetFan(FanE.PM3ADF01, PlcReadTemp.PM3ADF01_Set); ControlsHelper.SetSwitchLight(LightE.DMWETER1, PlcReadTemp.DMWETER1_Set, PlcReadTemp.DMWETER1_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER11, PlcReadTemp.DMWETER1_Set, PlcReadTemp.DMWETER1_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER2, PlcReadTemp.DMWETER2_Set, PlcReadTemp.DMWETER2_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER22, PlcReadTemp.DMWETER2_Set, PlcReadTemp.DMWETER2_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER3, PlcReadTemp.DMWETER3_Set, PlcReadTemp.DMWETER3_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER33, PlcReadTemp.DMWETER3_Set, PlcReadTemp.DMWETER3_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER4, PlcReadTemp.DMWETER4_Set, PlcReadTemp.DMWETER4_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER44, PlcReadTemp.DMWETER4_Set, PlcReadTemp.DMWETER4_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER5, PlcReadTemp.DMWETER5_Set, PlcReadTemp.DMWETER5_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER55, PlcReadTemp.DMWETER5_Set, PlcReadTemp.DMWETER5_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER6, PlcReadTemp.DMWETER6_Set, PlcReadTemp.DMWETER6_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER66, PlcReadTemp.DMWETER6_Set, PlcReadTemp.DMWETER6_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER7, PlcReadTemp.DMWETER7_Set, PlcReadTemp.DMWETER7_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER77, PlcReadTemp.DMWETER7_Set, PlcReadTemp.DMWETER7_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER8, PlcReadTemp.DMWETER8_Set, PlcReadTemp.DMWETER8_Alarm); ControlsHelper.SetSwitchLight(LightE.DMWETER88, PlcReadTemp.DMWETER8_Set, PlcReadTemp.DMWETER8_Alarm); } /// /// DB2107数据读取、控件赋值 /// private void NewThreadDb2107() { var normalStatusWatchDog = DB2107.NormalStatus.WatchDog; PlcReadTemp.WatchDog_Set = normalStatusWatchDog >= 1 ? true : false; //MCWatchDog.MCValue = normalStatusWatchDog.ToString(); PlcReadTemp.EMStop_Set = DB2107.NormalStatus.EMStop; PlcReadTemp.Vessel_1_HighLevel_Set = DB2107.Weight.Vessel_1.HighLevel; PlcReadTemp.Vessel_2_HighLevel_Set = DB2107.Weight.Vessel_2.HighLevel; PlcReadTemp.Vessel_3_HighLevel_Set = DB2107.Weight.Vessel_3.HighLevel; PlcReadTemp.Vessel_4_HighLevel_Set = DB2107.Weight.Vessel_4.HighLevel; PlcReadTemp.Vessel_5_HighLevel_Set = DB2107.Weight.Vessel_5.HighLevel; PlcReadTemp.Vessel_1_LowLevel_Set = DB2107.Weight.Vessel_1.Lowlevel; PlcReadTemp.Vessel_2_LowLevel_Set = DB2107.Weight.Vessel_2.Lowlevel; PlcReadTemp.Vessel_3_LowLevel_Set = DB2107.Weight.Vessel_3.Lowlevel; PlcReadTemp.Vessel_4_LowLevel_Set = DB2107.Weight.Vessel_4.Lowlevel; PlcReadTemp.Vessel_5_LowLevel_Set = DB2107.Weight.Vessel_5.Lowlevel; PlcReadTemp.highLevel_D1_Set = DB2107.Level.HighLevel_D1; PlcReadTemp.highLevel_D2_Set = DB2107.Level.HighLevel_D2; PlcReadTemp.highLevel_D3_Set = DB2107.Level.HighLevel_D3; PlcReadTemp.highLevel_D4_Set = DB2107.Level.HighLevel_D4; PlcReadTemp.highLevel_D5_Set = DB2107.Level.HighLevel_D5; PlcReadTemp.highLevel_D6_Set = DB2107.Level.HighLevel_D6; PlcReadTemp.highLevel_D7_Set = DB2107.Level.HighLevel_D7; PlcReadTemp.highLevel_D8_Set = DB2107.Level.HighLevel_D8; PlcReadTemp.highLevel_D9_Set = DB2107.Level.HighLevel_D9; PlcReadTemp.highLevel_D10_Set = DB2107.Level.HighLevel_D10; PlcReadTemp.highLevel_D11_Set = DB2107.Level.HighLevel_D11; PlcReadTemp.highLevel_D12_Set = DB2107.Level.HighLevel_D12; PlcReadTemp.lowLevel_D1_Set = DB2107.Level.LowLevel_D1; PlcReadTemp.lowLevel_D2_Set = DB2107.Level.LowLevel_D2; PlcReadTemp.lowLevel_D3_Set = DB2107.Level.LowLevel_D3; PlcReadTemp.lowLevel_D4_Set = DB2107.Level.LowLevel_D4; PlcReadTemp.lowLevel_D5_Set = DB2107.Level.LowLevel_D5; PlcReadTemp.lowLevel_D6_Set = DB2107.Level.LowLevel_D6; PlcReadTemp.lowLevel_D7_Set = DB2107.Level.LowLevel_D7; PlcReadTemp.lowLevel_D8_Set = DB2107.Level.LowLevel_D8; PlcReadTemp.lowLevel_D9_Set = DB2107.Level.LowLevel_D9; PlcReadTemp.lowLevel_D10_Set = DB2107.Level.LowLevel_D10; PlcReadTemp.lowLevel_D11_Set = DB2107.Level.LowLevel_D11; PlcReadTemp.lowLevel_D12_Set = DB2107.Level.LowLevel_D12; PlcReadTemp.Hopper_1_HighLevel_Set = DB2107.Weight.Hopper_1.HighLevel; PlcReadTemp.Hopper_2_HighLevel_Set = DB2107.Weight.Hopper_2.HighLevel; PlcReadTemp.Hopper_3_HighLevel_Set = DB2107.Weight.Hopper_3.HighLevel; PlcReadTemp.Hopper_4_HighLevel_Set = DB2107.Weight.Hopper_4.HighLevel; PlcReadTemp.Hopper_1_LowLevel_Set = DB2107.Weight.Hopper_1.Lowlevel; PlcReadTemp.Hopper_2_LowLevel_Set = DB2107.Weight.Hopper_2.Lowlevel; PlcReadTemp.Hopper_3_LowLevel_Set = DB2107.Weight.Hopper_3.Lowlevel; PlcReadTemp.Hopper_4_LowLevel_Set = DB2107.Weight.Hopper_4.Lowlevel; PlcReadTemp.topPressure_V1_Set = DB2107.Pressure.TopPressure_V1.ActualValue; PlcReadTemp.topPressure_V2_Set = DB2107.Pressure.TopPressure_V2.ActualValue; PlcReadTemp.topPressure_V3_Set = DB2107.Pressure.TopPressure_V3.ActualValue; PlcReadTemp.topPressure_V4_Set = DB2107.Pressure.TopPressure_V4.ActualValue; PlcReadTemp.topPressure_V5_Set = DB2107.Pressure.TopPressure_V5.ActualValue; PlcReadTemp.Vessel_1_ActWeight_Set = DB2107.Weight.Vessel_1.ActWeight; PlcReadTemp.Vessel_2_ActWeight_Set = DB2107.Weight.Vessel_2.ActWeight; PlcReadTemp.Vessel_3_ActWeight_Set = DB2107.Weight.Vessel_3.ActWeight; PlcReadTemp.Vessel_4_ActWeight_Set = DB2107.Weight.Vessel_4.ActWeight; PlcReadTemp.Vessel_5_ActWeight_Set = DB2107.Weight.Vessel_5.ActWeight; PlcReadTemp.conveyV1_PV_Set = DB2107.PID.Convey_V1.PV; PlcReadTemp.conveyV2_PV_Set = DB2107.PID.Convey_V2.PV; PlcReadTemp.conveyV3_PV_Set = DB2107.PID.Convey_V3.PV; PlcReadTemp.conveyV5_PV_Set = DB2107.PID.Convey_V5.PV; PlcReadTemp.mainPress_V1_ActualValue_Set = DB2107.Pressure.MainPress_V1.ActualValue; PlcReadTemp.mainPress_V2_ActualValue_Set = DB2107.Pressure.MainPress_V2.ActualValue; PlcReadTemp.mainPress_V3_ActualValue_Set = DB2107.Pressure.MainPress_V3.ActualValue; PlcReadTemp.mainPress_V5_ActualValue_Set = DB2107.Pressure.MainPress_V5.ActualValue; PlcReadTemp.purgeV1_PV_Set = DB2107.PID.Purge_V1.PV; PlcReadTemp.purgeV2_PV_Set = DB2107.PID.Purge_V2.PV; PlcReadTemp.purgeV3_PV_Set = DB2107.PID.Purge_V3.PV; PlcReadTemp.purgeV5_PV_Set = DB2107.PID.Purge_V5.PV; PlcReadTemp.WScale_1_ActWeight_Set = DB2107.Weight.WScale_1.ActWeight; PlcReadTemp.WScale_2_ActWeight_Set = DB2107.Weight.WScale_2.ActWeight; PlcReadTemp.WScale_3_ActWeight_Set = DB2107.Weight.WScale_3.ActWeight; PlcReadTemp.WScale_4_ActWeight_Set = DB2107.Weight.WScale_4.ActWeight; PlcReadTemp.Hopper_1_ActWeight_Set = DB2107.Weight.Hopper_1.ActWeight; PlcReadTemp.Hopper_2_ActWeight_Set = DB2107.Weight.Hopper_2.ActWeight; PlcReadTemp.Hopper_3_ActWeight_Set = DB2107.Weight.Hopper_3.ActWeight; PlcReadTemp.Hopper_4_ActWeight_Set = DB2107.Weight.Hopper_4.ActWeight; PlcReadTemp.AS1BLT01_Set = DB2107.Valve.AS1BLT01; PlcReadTemp.AS1BLT02_Set = DB2107.Valve.AS1BLT02; PlcReadTemp.AS1BLT03_Set = DB2107.Valve.AS1BLT03; PlcReadTemp.AS1BLT04_Set = DB2107.Valve.AS1BLT04; PlcReadTemp.AS1BLT05_Set = DB2107.Valve.AS1BLT05; PlcReadTemp.AS2BLT01_Set = DB2107.Valve.AS2BLT01; PlcReadTemp.AS2BLT02_Set = DB2107.Valve.AS2BLT02; PlcReadTemp.AS2BLT03_Set = DB2107.Valve.AS2BLT03; PlcReadTemp.AS2BLT04_Set = DB2107.Valve.AS2BLT04; PlcReadTemp.AS2BLT05_Set = DB2107.Valve.AS2BLT05; PlcReadTemp.AS3BLT01_Set = DB2107.Valve.AS3BLT01; PlcReadTemp.AS3BLT02_Set = DB2107.Valve.AS3BLT02; PlcReadTemp.AS3BLT03_Set = DB2107.Valve.AS3BLT03; PlcReadTemp.AS3BLT04_Set = DB2107.Valve.AS3BLT04; PlcReadTemp.AS3BLT05_Set = DB2107.Valve.AS3BLT05; PlcReadTemp.AS4BLT01_Set = DB2107.Valve.AS4BLT01; PlcReadTemp.AS4BLT03_Set = DB2107.Valve.AS4BLT03; PlcReadTemp.AS5BLT01_Set = DB2107.Valve.AS5BLT01; PlcReadTemp.AS5BLT02_Set = DB2107.Valve.AS5BLT02; PlcReadTemp.AS5BLT03_Set = DB2107.Valve.AS5BLT03; PlcReadTemp.AS5BLT04_Set = DB2107.Valve.AS5BLT04; PlcReadTemp.AS5BLT05_Set = DB2107.Valve.AS5BLT05; PlcReadTemp.AS2PCP01_Set = DB2107.Valve.AS2PCP01; PlcReadTemp.AS2PCP02_Set = DB2107.Valve.AS2PCP02; PlcReadTemp.AS2PCP03_Set = DB2107.Valve.AS2PCP03; PlcReadTemp.AS1OIS01_Set = DB2107.Valve.AS1OIS01; PlcReadTemp.AS1OIS02_Set = DB2107.Valve.AS1OIS02; PlcReadTemp.AS1OIS03_Set = DB2107.Valve.AS1OIS03; PlcReadTemp.AS2OIS01_Set = DB2107.Valve.AS2OIS01; PlcReadTemp.AS2OIS02_Set = DB2107.Valve.AS2OIS02; PlcReadTemp.AS2OIS03_Set = DB2107.Valve.AS2OIS03; PlcReadTemp.AS3OIS01_Set = DB2107.Valve.AS3OIS01; PlcReadTemp.AS3OIS02_Set = DB2107.Valve.AS3OIS02; PlcReadTemp.AS3OIS03_Set = DB2107.Valve.AS3OIS03; PlcReadTemp.AS4OIS01_Set = DB2107.Valve.AS4OIS01; PlcReadTemp.AS4OIS02_Set = DB2107.Valve.AS4OIS02; PlcReadTemp.AS4OIS03_Set = DB2107.Valve.AS4OIS03; PlcReadTemp.AS1GET01_Set = DB2107.Valve.AS1GET01; PlcReadTemp.AS1GET02_Set = DB2107.Valve.AS1GET02; PlcReadTemp.AS2GET01_Set = DB2107.Valve.AS2GET01; PlcReadTemp.AS2GET02_Set = DB2107.Valve.AS2GET02; PlcReadTemp.AS3GET01_Set = DB2107.Valve.AS3GET01; PlcReadTemp.AS3GET02_Set = DB2107.Valve.AS3GET02; PlcReadTemp.AS4GET01_Set = DB2107.Valve.AS4GET01; PlcReadTemp.AS4GET02_Set = DB2107.Valve.AS4GET02; PlcReadTemp.AS5GET01_Set = DB2107.Valve.AS5GET01; PlcReadTemp.AS5GET02_Set = DB2107.Valve.AS5GET02; PlcReadTemp.AS6GET01_Set = DB2107.Valve.AS6GET01; PlcReadTemp.AS6GET02_Set = DB2107.Valve.AS6GET02; PlcReadTemp.AS7GET01_Set = DB2107.Valve.AS7GET01; PlcReadTemp.AS7GET02_Set = DB2107.Valve.AS7GET02; PlcReadTemp.AS8GET01_Set = DB2107.Valve.AS8GET01; PlcReadTemp.AS8GET02_Set = DB2107.Valve.AS8GET02; PlcReadTemp.PM1ADF01_Set = DB2107.Valve.PM1ADF01; PlcReadTemp.PM1BDF01_Set = DB2107.Valve.PM1BDF01; PlcReadTemp.PM1CDF01_Set = DB2107.Valve.PM1CDF01; PlcReadTemp.PM1DDF01_Set = DB2107.Valve.PM1DDF01; PlcReadTemp.PM1EDF01_Set = DB2107.Valve.PM1EDF01; PlcReadTemp.PM1FDF01_Set = DB2107.Valve.PM1FDF01; PlcReadTemp.PM1GDF01_Set = DB2107.Valve.PM1GDF01; PlcReadTemp.PM1HDF01_Set = DB2107.Valve.PM1HDF01; PlcReadTemp.PM1IDF01_Set = DB2107.Valve.PM1IDF01; PlcReadTemp.PM1JDF01_Set = DB2107.Valve.PM1JDF01; PlcReadTemp.PM1KDF01_Set = DB2107.Valve.PM1KDF01; PlcReadTemp.PM1LDF01_Set = DB2107.Valve.PM1LDF01; //PlcReadTemp.ValueWeight1 = DB2119.Spiral_A.Value_Weight; //PlcReadTemp.ValueWeight2 = DB2119.Spiral_B.Value_Weight; //PlcReadTemp.ValueWeight3 = DB2119.Spiral_C.Value_Weight; //yang 4特殊处理下 采用2107 //if (!PlcReadTemp.DM2DSF01L_Set && !PlcReadTemp.DM2DSF01R_Set) //{ // PlcReadTemp.ValueWeight4 = "0"; //} //else //{ //} //DM2ASF01L_Set if (PlcReadTemp.DM2ASF01L_Set) { PlcReadTemp.ValueWeight1 = DB2107.Weter[0].FeedValue.ToString("0.#"); } else { PlcReadTemp.ValueWeight1 = DB2107.Weter[1].FeedValue.ToString("0.#"); } // if (PlcReadTemp.DM2BSF01L_Set) { PlcReadTemp.ValueWeight2 = DB2107.Weter[2].FeedValue.ToString("0.#"); } else { PlcReadTemp.ValueWeight2 = DB2107.Weter[3].FeedValue.ToString("0.#"); } if (PlcReadTemp.DM2CSF01L_Set) { PlcReadTemp.ValueWeight3 = DB2107.Weter[4].FeedValue.ToString("0.#"); } else { PlcReadTemp.ValueWeight3 = DB2107.Weter[5].FeedValue.ToString("0.#"); } if (PlcReadTemp.DM2DSF01L_Set) { PlcReadTemp.ValueWeight4 = DB2107.Weter[6].FeedValue.ToString("0.#"); } else { PlcReadTemp.ValueWeight4 = DB2107.Weter[7].FeedValue.ToString("0.#"); } PlcReadTemp.PresDaybin1_Set = DB2107.Pressure.PressDaybin_B1.ActualValue; PlcReadTemp.PresDaybin2_Set = DB2107.Pressure.PressDaybin_B2.ActualValue; PlcReadTemp.PresDaybin3_Set = DB2107.Pressure.PressDaybin_B3.ActualValue; PlcReadTemp.PresDaybin4_Set = DB2107.Pressure.PressDaybin_B4.ActualValue; PlcReadTemp.PresDaybin5_Set = DB2107.Pressure.PressDaybin_B5.ActualValue; PlcReadTemp.PresDaybin6_Set = DB2107.Pressure.PressDaybin_B6.ActualValue; PlcReadTemp.PresDaybin7_Set = DB2107.Pressure.PressDaybin_B7.ActualValue; PlcReadTemp.PresDaybin8_Set = DB2107.Pressure.PressDaybin_B8.ActualValue; PlcReadTemp.PresDaybin9_Set = DB2107.Pressure.PressDaybin_B9.ActualValue; PlcReadTemp.PresDaybin10_Set = DB2107.Pressure.PressDaybin_B10.ActualValue; PlcReadTemp.PresDaybin11_Set = DB2107.Pressure.PressDaybin_B11.ActualValue; PlcReadTemp.PresDaybin12_Set = DB2107.Pressure.PressDaybin_B12.ActualValue; ControlsHelper.SetMCLabel(LabelE.ValueWeight1, PlcReadTemp.ValueWeight1); ControlsHelper.SetMCLabel(LabelE.ValueWeight2, PlcReadTemp.ValueWeight2); ControlsHelper.SetMCLabel(LabelE.ValueWeight3, PlcReadTemp.ValueWeight3); //yang 增加4的显示 ControlsHelper.SetMCLabel(LabelE.ValueWeight4, PlcReadTemp.ValueWeight4); //ControlsHelper.SetStateButton(DetailE.WatchDog, PlcReadTemp.WatchDog_Set); //ControlsHelper.SetSystemStateShow(DetailE.EMStop, PlcReadTemp.EMStop_Set); ControlsHelper.SetSwitchLight(LightE.Vessel_1_HighLevel, PlcReadTemp.Vessel_1_HighLevel_Set, false); ControlsHelper.SetSwitchLight(LightE.Vessel_2_HighLevel, PlcReadTemp.Vessel_2_HighLevel_Set, false); ControlsHelper.SetSwitchLight(LightE.Vessel_3_HighLevel, PlcReadTemp.Vessel_3_HighLevel_Set, false); ControlsHelper.SetSwitchLight(LightE.Vessel_4_HighLevel, PlcReadTemp.Vessel_4_HighLevel_Set, false); ControlsHelper.SetSwitchLight(LightE.Vessel_5_HighLevel, PlcReadTemp.Vessel_5_HighLevel_Set, false); ControlsHelper.SetSwitchLight(LightE.Vessel_1_LowLevel, PlcReadTemp.Vessel_1_LowLevel_Set, false); ControlsHelper.SetSwitchLight(LightE.Vessel_2_LowLevel, PlcReadTemp.Vessel_2_LowLevel_Set, false); ControlsHelper.SetSwitchLight(LightE.Vessel_3_LowLevel, PlcReadTemp.Vessel_3_LowLevel_Set, false); ControlsHelper.SetSwitchLight(LightE.Vessel_4_LowLevel, PlcReadTemp.Vessel_4_LowLevel_Set, false); ControlsHelper.SetSwitchLight(LightE.Vessel_5_LowLevel, PlcReadTemp.Vessel_5_LowLevel_Set, false); ControlsHelper.SetSwitchLight(LightE.highLevel_D1, PlcReadTemp.highLevel_D1_Set, false); ControlsHelper.SetSwitchLight(LightE.highLevel_D2, PlcReadTemp.highLevel_D2_Set, false); ControlsHelper.SetSwitchLight(LightE.highLevel_D3, PlcReadTemp.highLevel_D3_Set, false); ControlsHelper.SetSwitchLight(LightE.highLevel_D4, PlcReadTemp.highLevel_D4_Set, false); ControlsHelper.SetSwitchLight(LightE.highLevel_D5, PlcReadTemp.highLevel_D5_Set, false); ControlsHelper.SetSwitchLight(LightE.highLevel_D6, PlcReadTemp.highLevel_D6_Set, false); ControlsHelper.SetSwitchLight(LightE.highLevel_D7, PlcReadTemp.highLevel_D7_Set, false); ControlsHelper.SetSwitchLight(LightE.highLevel_D8, PlcReadTemp.highLevel_D8_Set, false); ControlsHelper.SetSwitchLight(LightE.highLevel_D9, PlcReadTemp.highLevel_D9_Set, false); ControlsHelper.SetSwitchLight(LightE.highLevel_D10, PlcReadTemp.highLevel_D10_Set, false); ControlsHelper.SetSwitchLight(LightE.highLevel_D11, PlcReadTemp.highLevel_D11_Set, false); ControlsHelper.SetSwitchLight(LightE.highLevel_D12, PlcReadTemp.highLevel_D12_Set, false); ControlsHelper.SetSwitchLight(LightE.lowLevel_D1, PlcReadTemp.lowLevel_D1_Set, false); ControlsHelper.SetSwitchLight(LightE.lowLevel_D2, PlcReadTemp.lowLevel_D2_Set, false); ControlsHelper.SetSwitchLight(LightE.lowLevel_D3, PlcReadTemp.lowLevel_D3_Set, false); ControlsHelper.SetSwitchLight(LightE.lowLevel_D4, PlcReadTemp.lowLevel_D4_Set, false); ControlsHelper.SetSwitchLight(LightE.lowLevel_D5, PlcReadTemp.lowLevel_D5_Set, false); ControlsHelper.SetSwitchLight(LightE.lowLevel_D6, PlcReadTemp.lowLevel_D6_Set, false); ControlsHelper.SetSwitchLight(LightE.lowLevel_D7, PlcReadTemp.lowLevel_D7_Set, false); ControlsHelper.SetSwitchLight(LightE.lowLevel_D8, PlcReadTemp.lowLevel_D8_Set, false); ControlsHelper.SetSwitchLight(LightE.lowLevel_D9, PlcReadTemp.lowLevel_D9_Set, false); ControlsHelper.SetSwitchLight(LightE.lowLevel_D10, PlcReadTemp.lowLevel_D10_Set, false); ControlsHelper.SetSwitchLight(LightE.lowLevel_D11, PlcReadTemp.lowLevel_D11_Set, false); ControlsHelper.SetSwitchLight(LightE.lowLevel_D12, PlcReadTemp.lowLevel_D12_Set, false); ControlsHelper.SetSwitchLight(LightE.Hopper_1_HighLevel, PlcReadTemp.Hopper_1_HighLevel_Set, false); ControlsHelper.SetSwitchLight(LightE.Hopper_2_HighLevel, PlcReadTemp.Hopper_2_HighLevel_Set, false); ControlsHelper.SetSwitchLight(LightE.Hopper_3_HighLevel, PlcReadTemp.Hopper_3_HighLevel_Set, false); ControlsHelper.SetSwitchLight(LightE.Hopper_4_HighLevel, PlcReadTemp.Hopper_4_HighLevel_Set, false); ControlsHelper.SetSwitchLight(LightE.Hopper_1_LowLevel, PlcReadTemp.Hopper_1_LowLevel_Set, false); ControlsHelper.SetSwitchLight(LightE.Hopper_2_LowLevel, PlcReadTemp.Hopper_2_LowLevel_Set, false); ControlsHelper.SetSwitchLight(LightE.Hopper_3_LowLevel, PlcReadTemp.Hopper_3_LowLevel_Set, false); ControlsHelper.SetSwitchLight(LightE.Hopper_4_LowLevel, PlcReadTemp.Hopper_4_LowLevel_Set, false); ControlsHelper.SetMCLabel(LabelE.topPressure_V1, (float)Math.Round(PlcReadTemp.topPressure_V2_Set, 2)); ControlsHelper.SetMCLabel(LabelE.topPressure_V2, (float)Math.Round(PlcReadTemp.topPressure_V2_Set, 2)); ControlsHelper.SetMCLabel(LabelE.topPressure_V3, (float)Math.Round(PlcReadTemp.topPressure_V3_Set, 2)); ControlsHelper.SetMCLabel(LabelE.topPressure_V4, (float)Math.Round(PlcReadTemp.topPressure_V4_Set, 2)); ControlsHelper.SetMCLabel(LabelE.topPressure_V5, (float)Math.Round(PlcReadTemp.topPressure_V5_Set, 2)); ControlsHelper.SetMCLabel(LabelE.Vessel_1_ActWeight, (float)Math.Round(PlcReadTemp.Vessel_1_ActWeight_Set, 2)); ControlsHelper.SetMCLabel(LabelE.Vessel_2_ActWeight, (float)Math.Round(PlcReadTemp.Vessel_2_ActWeight_Set, 2)); ControlsHelper.SetMCLabel(LabelE.Vessel_3_ActWeight, (float)Math.Round(PlcReadTemp.Vessel_3_ActWeight_Set, 2)); ControlsHelper.SetMCLabel(LabelE.Vessel_4_ActWeight, (float)Math.Round(PlcReadTemp.Vessel_4_ActWeight_Set, 2)); ControlsHelper.SetMCLabel(LabelE.Vessel_5_ActWeight, (float)Math.Round(PlcReadTemp.Vessel_5_ActWeight_Set, 2)); ControlsHelper.SetMCLabel(LabelE.conveyV1_PV, (float)Math.Round(PlcReadTemp.conveyV1_PV_Set, 2)); ControlsHelper.SetMCLabel(LabelE.conveyV2_PV, (float)Math.Round(PlcReadTemp.conveyV2_PV_Set, 2)); ControlsHelper.SetMCLabel(LabelE.conveyV3_PV, (float)Math.Round(PlcReadTemp.conveyV3_PV_Set, 2)); ControlsHelper.SetMCLabel(LabelE.conveyV5_PV, (float)Math.Round(PlcReadTemp.conveyV5_PV_Set, 2)); ControlsHelper.SetMCLabel(LabelE.mainPress_V1_ActualValue, (float)Math.Round(PlcReadTemp.mainPress_V1_ActualValue_Set, 2)); ControlsHelper.SetMCLabel(LabelE.mainPress_V2_ActualValue, (float)Math.Round(PlcReadTemp.mainPress_V2_ActualValue_Set, 2)); ControlsHelper.SetMCLabel(LabelE.mainPress_V3_ActualValue, (float)Math.Round(PlcReadTemp.mainPress_V3_ActualValue_Set, 2)); ControlsHelper.SetMCLabel(LabelE.mainPress_V5_ActualValue, (float)Math.Round(PlcReadTemp.mainPress_V5_ActualValue_Set, 2)); ControlsHelper.SetMCLabel(LabelE.purgeV1_PV, (float)Math.Round(PlcReadTemp.purgeV1_PV_Set, 2)); ControlsHelper.SetMCLabel(LabelE.purgeV2_PV, (float)Math.Round(PlcReadTemp.purgeV2_PV_Set, 2)); ControlsHelper.SetMCLabel(LabelE.purgeV3_PV, (float)Math.Round(PlcReadTemp.purgeV3_PV_Set, 2)); ControlsHelper.SetMCLabel(LabelE.purgeV5_PV, (float)Math.Round(PlcReadTemp.purgeV5_PV_Set, 2)); ControlsHelper.SetMCLabel(LabelE.WScale_1_ActWeight, (float)Math.Round(PlcReadTemp.WScale_1_ActWeight_Set, 2)); ControlsHelper.SetMCLabel(LabelE.WScale_2_ActWeight, (float)Math.Round(PlcReadTemp.WScale_2_ActWeight_Set, 2)); ControlsHelper.SetMCLabel(LabelE.WScale_3_ActWeight, (float)Math.Round(PlcReadTemp.WScale_3_ActWeight_Set, 2)); ControlsHelper.SetMCLabel(LabelE.WScale_4_ActWeight, (float)Math.Round(PlcReadTemp.WScale_4_ActWeight_Set, 2)); ControlsHelper.SetMCLabel(LabelE.Hopper_1_ActWeight, (float)Math.Round(PlcReadTemp.Hopper_1_ActWeight_Set, 2)); ControlsHelper.SetMCLabel(LabelE.Hopper_2_ActWeight, (float)Math.Round(PlcReadTemp.Hopper_2_ActWeight_Set, 2)); ControlsHelper.SetMCLabel(LabelE.Hopper_3_ActWeight, (float)Math.Round(PlcReadTemp.Hopper_3_ActWeight_Set, 2)); ControlsHelper.SetMCLabel(LabelE.Hopper_4_ActWeight, (float)Math.Round(PlcReadTemp.Hopper_4_ActWeight_Set, 2)); ControlsHelper.SetMCLabel(LabelE.PresDaybin1, (float)Math.Round(PlcReadTemp.PresDaybin1_Set, 2)); ControlsHelper.SetMCLabel(LabelE.PresDaybin2, (float)Math.Round(PlcReadTemp.PresDaybin2_Set, 2)); ControlsHelper.SetMCLabel(LabelE.PresDaybin3, (float)Math.Round(PlcReadTemp.PresDaybin3_Set, 2)); ControlsHelper.SetMCLabel(LabelE.PresDaybin4, (float)Math.Round(PlcReadTemp.PresDaybin4_Set, 2)); ControlsHelper.SetMCLabel(LabelE.PresDaybin5, (float)Math.Round(PlcReadTemp.PresDaybin5_Set, 2)); ControlsHelper.SetMCLabel(LabelE.PresDaybin6, (float)Math.Round(PlcReadTemp.PresDaybin6_Set, 2)); ControlsHelper.SetMCLabel(LabelE.PresDaybin7, (float)Math.Round(PlcReadTemp.PresDaybin7_Set, 2)); ControlsHelper.SetMCLabel(LabelE.PresDaybin8, (float)Math.Round(PlcReadTemp.PresDaybin8_Set, 2)); ControlsHelper.SetMCLabel(LabelE.PresDaybin9, (float)Math.Round(PlcReadTemp.PresDaybin9_Set, 2)); ControlsHelper.SetMCLabel(LabelE.PresDaybin10, (float)Math.Round(PlcReadTemp.PresDaybin10_Set, 2)); ControlsHelper.SetMCLabel(LabelE.PresDaybin11, (float)Math.Round(PlcReadTemp.PresDaybin11_Set, 2)); ControlsHelper.SetMCLabel(LabelE.PresDaybin12, (float)Math.Round(PlcReadTemp.PresDaybin12_Set, 2)); ControlsHelper.SetJzf(JzfE.AS1BLT01, PlcReadTemp.AS1BLT01_Set); ControlsHelper.SetJzf(JzfE.AS1BLT02, PlcReadTemp.AS1BLT02_Set); ControlsHelper.SetJzf(JzfE.AS1BLT03, PlcReadTemp.AS1BLT03_Set); ControlsHelper.SetJzf(JzfE.AS1BLT04, PlcReadTemp.AS1BLT04_Set); ControlsHelper.SetJzf(JzfE.AS1BLT05, PlcReadTemp.AS1BLT05_Set); ControlsHelper.SetJzf(JzfE.AS2BLT01, PlcReadTemp.AS2BLT01_Set); ControlsHelper.SetJzf(JzfE.AS2BLT02, PlcReadTemp.AS2BLT02_Set); ControlsHelper.SetJzf(JzfE.AS2BLT03, PlcReadTemp.AS2BLT03_Set); ControlsHelper.SetJzf(JzfE.AS2BLT04, PlcReadTemp.AS2BLT04_Set); ControlsHelper.SetJzf(JzfE.AS2BLT05, PlcReadTemp.AS2BLT05_Set); ControlsHelper.SetJzf(JzfE.AS3BLT01, PlcReadTemp.AS3BLT01_Set); ControlsHelper.SetJzf(JzfE.AS3BLT02, PlcReadTemp.AS3BLT02_Set); ControlsHelper.SetJzf(JzfE.AS3BLT03, PlcReadTemp.AS3BLT03_Set); ControlsHelper.SetJzf(JzfE.AS3BLT04, PlcReadTemp.AS3BLT04_Set); ControlsHelper.SetJzf(JzfE.AS3BLT05, PlcReadTemp.AS3BLT05_Set); ControlsHelper.SetJzf(JzfE.AS4BLT01, PlcReadTemp.AS4BLT01_Set); ControlsHelper.SetJzf(JzfE.AS4BLT03, PlcReadTemp.AS4BLT03_Set); ControlsHelper.SetJzf(JzfE.AS5BLT01, PlcReadTemp.AS5BLT01_Set); ControlsHelper.SetJzf(JzfE.AS5BLT02, PlcReadTemp.AS5BLT02_Set); ControlsHelper.SetJzf(JzfE.AS5BLT03, PlcReadTemp.AS5BLT03_Set); ControlsHelper.SetJzf(JzfE.AS5BLT04, PlcReadTemp.AS5BLT04_Set); ControlsHelper.SetJzf(JzfE.AS5BLT05, PlcReadTemp.AS5BLT05_Set); ControlsHelper.SetJzf(JzfE.AS2PCP01, PlcReadTemp.AS2PCP01_Set); ControlsHelper.SetJzf(JzfE.AS2PCP02, PlcReadTemp.AS2PCP02_Set); ControlsHelper.SetJzf(JzfE.AS2PCP03, PlcReadTemp.AS2PCP03_Set); ControlsHelper.SetJzf(JzfE.AS1OIS01, PlcReadTemp.AS1OIS01_Set); ControlsHelper.SetJzf(JzfE.AS1OIS02, PlcReadTemp.AS1OIS02_Set); ControlsHelper.SetJzf(JzfE.AS1OIS03, PlcReadTemp.AS1OIS03_Set); ControlsHelper.SetJzf(JzfE.AS2OIS01, PlcReadTemp.AS2OIS01_Set); ControlsHelper.SetJzf(JzfE.AS2OIS02, PlcReadTemp.AS2OIS02_Set); ControlsHelper.SetJzf(JzfE.AS2OIS03, PlcReadTemp.AS2OIS03_Set); ControlsHelper.SetJzf(JzfE.AS3OIS01, PlcReadTemp.AS3OIS01_Set); ControlsHelper.SetJzf(JzfE.AS3OIS02, PlcReadTemp.AS3OIS02_Set); ControlsHelper.SetJzf(JzfE.AS3OIS03, PlcReadTemp.AS3OIS03_Set); ControlsHelper.SetJzf(JzfE.AS4OIS01, PlcReadTemp.AS4OIS01_Set); ControlsHelper.SetJzf(JzfE.AS4OIS02, PlcReadTemp.AS4OIS02_Set); ControlsHelper.SetJzf(JzfE.AS4OIS03, PlcReadTemp.AS4OIS03_Set); ControlsHelper.SetJzf(JzfE.AS1GET01, PlcReadTemp.AS1GET01_Set); ControlsHelper.SetJzf(JzfE.AS1GET02, PlcReadTemp.AS1GET02_Set); ControlsHelper.SetJzf(JzfE.AS2GET01, PlcReadTemp.AS2GET01_Set); ControlsHelper.SetJzf(JzfE.AS2GET02, PlcReadTemp.AS2GET02_Set); ControlsHelper.SetJzf(JzfE.AS3GET01, PlcReadTemp.AS3GET01_Set); ControlsHelper.SetJzf(JzfE.AS3GET02, PlcReadTemp.AS3GET02_Set); ControlsHelper.SetJzf(JzfE.AS4GET01, PlcReadTemp.AS4GET01_Set); ControlsHelper.SetJzf(JzfE.AS4GET02, PlcReadTemp.AS4GET02_Set); ControlsHelper.SetJzf(JzfE.AS5GET01, PlcReadTemp.AS5GET01_Set); ControlsHelper.SetJzf(JzfE.AS5GET02, PlcReadTemp.AS5GET02_Set); ControlsHelper.SetJzf(JzfE.AS6GET01, PlcReadTemp.AS6GET01_Set); ControlsHelper.SetJzf(JzfE.AS6GET02, PlcReadTemp.AS6GET02_Set); ControlsHelper.SetJzf(JzfE.AS7GET01, PlcReadTemp.AS7GET01_Set); ControlsHelper.SetJzf(JzfE.AS7GET02, PlcReadTemp.AS7GET02_Set); ControlsHelper.SetJzf(JzfE.AS8GET01, PlcReadTemp.AS8GET01_Set); ControlsHelper.SetJzf(JzfE.AS8GET02, PlcReadTemp.AS8GET02_Set); ControlsHelper.SetControlCabinet(ControlCabinetE.PM1ADF01, PlcReadTemp.PM1ADF01_Set); ControlsHelper.SetControlCabinet(ControlCabinetE.PM1BDF01, PlcReadTemp.PM1BDF01_Set); ControlsHelper.SetControlCabinet(ControlCabinetE.PM1CDF01, PlcReadTemp.PM1CDF01_Set); ControlsHelper.SetControlCabinet(ControlCabinetE.PM1DDF01, PlcReadTemp.PM1DDF01_Set); ControlsHelper.SetControlCabinet(ControlCabinetE.PM1EDF01, PlcReadTemp.PM1EDF01_Set); ControlsHelper.SetControlCabinet(ControlCabinetE.PM1FDF01, PlcReadTemp.PM1FDF01_Set); ControlsHelper.SetControlCabinet(ControlCabinetE.PM1GDF01, PlcReadTemp.PM1GDF01_Set); ControlsHelper.SetControlCabinet(ControlCabinetE.PM1HDF01, PlcReadTemp.PM1HDF01_Set); ControlsHelper.SetControlCabinet(ControlCabinetE.PM1IDF01, PlcReadTemp.PM1IDF01_Set); ControlsHelper.SetControlCabinet(ControlCabinetE.PM1JDF01, PlcReadTemp.PM1JDF01_Set); ControlsHelper.SetControlCabinet(ControlCabinetE.PM1KDF01, PlcReadTemp.PM1KDF01_Set); ControlsHelper.SetControlCabinet(ControlCabinetE.PM1LDF01, PlcReadTemp.PM1LDF01_Set); ControlsHelper.SetMCLabel(LabelE.DryMode4, DB2107.Dryer[3].Mode, 1); ControlsHelper.SetMCLabel(LabelE.DryStatus4, DB2107.Dryer[3].Status, 2); ControlsHelper.SetMCLabel(LabelE.DryStepCode4, DB2107.Dryer[3].StepCode); ControlsHelper.SetMCLabel(LabelE.DryStepName4, DryStepConvert(DB2107.Dryer[3].StepCode)); ControlsHelper.SetMCLabel(LabelE.DryTotalTime4, SecondToTime(DB2107.Dryer[3].TotalTime)); ControlsHelper.SetMCLabel(LabelE.DryStepTime4, SecondToTime(DB2107.Dryer[3].StepTime)); ControlsHelper.SetMCLabel(LabelE.DryMode1, DB2107.Dryer[0].Mode, 1); ControlsHelper.SetMCLabel(LabelE.DryStatus1, DB2107.Dryer[0].Status, 2); ControlsHelper.SetMCLabel(LabelE.DryStepCode1, DB2107.Dryer[0].StepCode); ControlsHelper.SetMCLabel(LabelE.DryStepName1, DryStepConvert(DB2107.Dryer[0].StepCode)); ControlsHelper.SetMCLabel(LabelE.DryTotalTime1, SecondToTime(DB2107.Dryer[0].TotalTime)); ControlsHelper.SetMCLabel(LabelE.DryStepTime1, SecondToTime(DB2107.Dryer[0].StepTime)); ControlsHelper.SetMCLabel(LabelE.DryMode2, DB2107.Dryer[1].Mode, 1); ControlsHelper.SetMCLabel(LabelE.DryStatus2, DB2107.Dryer[1].Status, 2); ControlsHelper.SetMCLabel(LabelE.DryStepCode2, DB2107.Dryer[1].StepCode); ControlsHelper.SetMCLabel(LabelE.DryStepName2, DryStepConvert(DB2107.Dryer[1].StepCode)); ControlsHelper.SetMCLabel(LabelE.DryTotalTime2, SecondToTime(DB2107.Dryer[1].TotalTime)); ControlsHelper.SetMCLabel(LabelE.DryStepTime2, SecondToTime(DB2107.Dryer[1].StepTime)); ControlsHelper.SetMCLabel(LabelE.DryMode3, DB2107.Dryer[2].Mode, 1); ControlsHelper.SetMCLabel(LabelE.DryStatus3, DB2107.Dryer[2].Status, 2); ControlsHelper.SetMCLabel(LabelE.DryStepCode3, DB2107.Dryer[2].StepCode); ControlsHelper.SetMCLabel(LabelE.DryStepName3, DryStepConvert(DB2107.Dryer[2].StepCode)); ControlsHelper.SetMCLabel(LabelE.DryTotalTime3, SecondToTime(DB2107.Dryer[2].TotalTime)); ControlsHelper.SetMCLabel(LabelE.DryStepTime3, SecondToTime(DB2107.Dryer[2].StepTime)); ControlsHelper.SetMCLabel(LabelE.GelMode7, DB2107.Gelater[6].Mode, 1); ControlsHelper.SetMCLabel(LabelE.GelStatus7, DB2107.Gelater[6].Status, 2); ControlsHelper.SetMCLabel(LabelE.GelStepCode7, DB2107.Gelater[6].StepCode); ControlsHelper.SetMCLabel(LabelE.GelStepName7, GelStepConvert(DB2107.Gelater[6].StepCode)); ControlsHelper.SetMCLabel(LabelE.GelTotalTime7, SecondToTime(DB2107.Gelater[6].TotalTime)); ControlsHelper.SetMCLabel(LabelE.GelStepTime7, SecondToTime(DB2107.Gelater[6].StepTime)); ControlsHelper.SetMCLabel(LabelE.GelMode8, DB2107.Gelater[7].Mode, 1); ControlsHelper.SetMCLabel(LabelE.GelStatus8, DB2107.Gelater[7].Status, 2); ControlsHelper.SetMCLabel(LabelE.GelStepCode8, DB2107.Gelater[7].StepCode); ControlsHelper.SetMCLabel(LabelE.GelStepName8, GelStepConvert(DB2107.Gelater[7].StepCode)); ControlsHelper.SetMCLabel(LabelE.GelTotalTime8, SecondToTime(DB2107.Gelater[7].TotalTime)); ControlsHelper.SetMCLabel(LabelE.GelStepTime8, SecondToTime(DB2107.Gelater[7].StepTime)); ControlsHelper.SetMCLabel(LabelE.GelMode1, DB2107.Gelater[0].Mode, 1); ControlsHelper.SetMCLabel(LabelE.GelStatus1, DB2107.Gelater[0].Status, 2); ControlsHelper.SetMCLabel(LabelE.GelStepCode1, DB2107.Gelater[0].StepCode); ControlsHelper.SetMCLabel(LabelE.GelStepName1, GelStepConvert(DB2107.Gelater[0].StepCode)); ControlsHelper.SetMCLabel(LabelE.GelTotalTime1, SecondToTime(DB2107.Gelater[0].TotalTime)); ControlsHelper.SetMCLabel(LabelE.GelStepTime1, SecondToTime(DB2107.Gelater[0].StepTime)); ControlsHelper.SetMCLabel(LabelE.GelMode2, DB2107.Gelater[1].Mode, 1); ControlsHelper.SetMCLabel(LabelE.GelStatus2, DB2107.Gelater[1].Status, 2); ControlsHelper.SetMCLabel(LabelE.GelStepCode2, DB2107.Gelater[1].StepCode); ControlsHelper.SetMCLabel(LabelE.GelStepName2, GelStepConvert(DB2107.Gelater[1].StepCode)); ControlsHelper.SetMCLabel(LabelE.GelTotalTime2, SecondToTime(DB2107.Gelater[1].TotalTime)); ControlsHelper.SetMCLabel(LabelE.GelStepTime2, SecondToTime(DB2107.Gelater[1].StepTime)); ControlsHelper.SetMCLabel(LabelE.GelMode3, DB2107.Gelater[2].Mode, 1); ControlsHelper.SetMCLabel(LabelE.GelStatus3, DB2107.Gelater[2].Status, 2); ControlsHelper.SetMCLabel(LabelE.GelStepCode3, DB2107.Gelater[2].StepCode); ControlsHelper.SetMCLabel(LabelE.GelStepName3, GelStepConvert(DB2107.Gelater[2].StepCode)); ControlsHelper.SetMCLabel(LabelE.GelTotalTime3, SecondToTime(DB2107.Gelater[2].TotalTime)); ControlsHelper.SetMCLabel(LabelE.GelStepTime3, SecondToTime(DB2107.Gelater[2].StepTime)); ControlsHelper.SetMCLabel(LabelE.GelMode4, DB2107.Gelater[3].Mode, 1); ControlsHelper.SetMCLabel(LabelE.GelStatus4, DB2107.Gelater[3].Status, 2); ControlsHelper.SetMCLabel(LabelE.GelStepCode4, DB2107.Gelater[3].StepCode); ControlsHelper.SetMCLabel(LabelE.GelStepName4, GelStepConvert(DB2107.Gelater[3].StepCode)); ControlsHelper.SetMCLabel(LabelE.GelTotalTime4, SecondToTime(DB2107.Gelater[3].TotalTime)); ControlsHelper.SetMCLabel(LabelE.GelStepTime4, SecondToTime(DB2107.Gelater[3].StepTime)); ControlsHelper.SetMCLabel(LabelE.GelMode5, DB2107.Gelater[4].Mode, 1); ControlsHelper.SetMCLabel(LabelE.GelStatus5, DB2107.Gelater[4].Status, 2); ControlsHelper.SetMCLabel(LabelE.GelStepCode5, DB2107.Gelater[4].StepCode); ControlsHelper.SetMCLabel(LabelE.GelStepName5, GelStepConvert(DB2107.Gelater[4].StepCode)); ControlsHelper.SetMCLabel(LabelE.GelTotalTime5, SecondToTime(DB2107.Gelater[4].TotalTime)); ControlsHelper.SetMCLabel(LabelE.GelStepTime5, SecondToTime(DB2107.Gelater[4].StepTime)); ControlsHelper.SetMCLabel(LabelE.GelMode6, DB2107.Gelater[5].Mode, 1); ControlsHelper.SetMCLabel(LabelE.GelStatus6, DB2107.Gelater[5].Status, 2); ControlsHelper.SetMCLabel(LabelE.GelStepCode6, DB2107.Gelater[5].StepCode); ControlsHelper.SetMCLabel(LabelE.GelStepName6, GelStepConvert(DB2107.Gelater[5].StepCode)); ControlsHelper.SetMCLabel(LabelE.GelTotalTime6, SecondToTime(DB2107.Gelater[5].TotalTime)); ControlsHelper.SetMCLabel(LabelE.GelStepTime6, SecondToTime(DB2107.Gelater[5].StepTime)); ControlsHelper.SetMCLabel(LabelE.WetMode7, DB2107.Weter[6].Mode, 1); ControlsHelper.SetMCLabel(LabelE.WetStatus7, DB2107.Weter[6].Status, 2); ControlsHelper.SetMCLabel(LabelE.WetStepCode7, DB2107.Weter[6].StepCode); ControlsHelper.SetMCLabel(LabelE.WetStepName7, WetStepConvert(DB2107.Weter[6].StepCode)); ControlsHelper.SetMCLabel(LabelE.WetTotalTime7, SecondToTime(DB2107.Weter[6].TotalTime)); ControlsHelper.SetMCLabel(LabelE.WetStepTime7, SecondToTime(DB2107.Weter[6].StepTime)); ControlsHelper.SetMCLabel(LabelE.WetMode8, DB2107.Weter[7].Mode, 1); ControlsHelper.SetMCLabel(LabelE.WetStatus8, DB2107.Weter[7].Status, 2); ControlsHelper.SetMCLabel(LabelE.WetStepCode8, DB2107.Weter[7].StepCode); ControlsHelper.SetMCLabel(LabelE.WetStepName8, WetStepConvert(DB2107.Weter[7].StepCode)); ControlsHelper.SetMCLabel(LabelE.WetTotalTime8, SecondToTime(DB2107.Weter[7].TotalTime)); ControlsHelper.SetMCLabel(LabelE.WetStepTime8, SecondToTime(DB2107.Weter[7].StepTime)); ControlsHelper.SetMCLabel(LabelE.WetMode1, DB2107.Weter[0].Mode, 1); ControlsHelper.SetMCLabel(LabelE.WetStatus1, DB2107.Weter[0].Status, 2); ControlsHelper.SetMCLabel(LabelE.WetStepCode1, DB2107.Weter[0].StepCode); ControlsHelper.SetMCLabel(LabelE.WetStepName1, WetStepConvert(DB2107.Weter[0].StepCode)); ControlsHelper.SetMCLabel(LabelE.WetTotalTime1, SecondToTime(DB2107.Weter[0].TotalTime)); ControlsHelper.SetMCLabel(LabelE.WetStepTime1, SecondToTime(DB2107.Weter[0].StepTime)); ControlsHelper.SetMCLabel(LabelE.WetMode2, DB2107.Weter[1].Mode, 1); ControlsHelper.SetMCLabel(LabelE.WetStatus2, DB2107.Weter[1].Status, 2); ControlsHelper.SetMCLabel(LabelE.WetStepCode2, DB2107.Weter[1].StepCode); ControlsHelper.SetMCLabel(LabelE.WetStepName2, WetStepConvert(DB2107.Weter[1].StepCode)); ControlsHelper.SetMCLabel(LabelE.WetTotalTime2, SecondToTime(DB2107.Weter[1].TotalTime)); ControlsHelper.SetMCLabel(LabelE.WetStepTime2, SecondToTime(DB2107.Weter[1].StepTime)); ControlsHelper.SetMCLabel(LabelE.WetMode3, DB2107.Weter[2].Mode, 1); ControlsHelper.SetMCLabel(LabelE.WetStatus3, DB2107.Weter[2].Status, 2); ControlsHelper.SetMCLabel(LabelE.WetStepCode3, DB2107.Weter[2].StepCode); ControlsHelper.SetMCLabel(LabelE.WetStepName3, WetStepConvert(DB2107.Weter[2].StepCode)); ControlsHelper.SetMCLabel(LabelE.WetTotalTime3, SecondToTime(DB2107.Weter[2].TotalTime)); ControlsHelper.SetMCLabel(LabelE.WetStepTime3, SecondToTime(DB2107.Weter[2].StepTime)); ControlsHelper.SetMCLabel(LabelE.WetMode4, DB2107.Weter[3].Mode, 1); ControlsHelper.SetMCLabel(LabelE.WetStatus4, DB2107.Weter[3].Status, 2); ControlsHelper.SetMCLabel(LabelE.WetStepCode4, DB2107.Weter[3].StepCode); ControlsHelper.SetMCLabel(LabelE.WetStepName4, WetStepConvert(DB2107.Weter[3].StepCode)); ControlsHelper.SetMCLabel(LabelE.WetTotalTime4, SecondToTime(DB2107.Weter[3].TotalTime)); ControlsHelper.SetMCLabel(LabelE.WetStepTime4, SecondToTime(DB2107.Weter[3].StepTime)); ControlsHelper.SetMCLabel(LabelE.WetMode5, DB2107.Weter[4].Mode, 1); ControlsHelper.SetMCLabel(LabelE.WetStatus5, DB2107.Weter[4].Status, 2); ControlsHelper.SetMCLabel(LabelE.WetStepCode5, DB2107.Weter[4].StepCode); ControlsHelper.SetMCLabel(LabelE.WetStepName5, WetStepConvert(DB2107.Weter[4].StepCode)); ControlsHelper.SetMCLabel(LabelE.WetTotalTime5, SecondToTime(DB2107.Weter[4].TotalTime)); ControlsHelper.SetMCLabel(LabelE.WetStepTime5, SecondToTime(DB2107.Weter[4].StepTime)); ControlsHelper.SetMCLabel(LabelE.WetMode6, DB2107.Weter[5].Mode, 1); ControlsHelper.SetMCLabel(LabelE.WetStatus6, DB2107.Weter[5].Status, 2); ControlsHelper.SetMCLabel(LabelE.WetStepCode6, DB2107.Weter[5].StepCode); ControlsHelper.SetMCLabel(LabelE.WetStepName6, WetStepConvert(DB2107.Weter[5].StepCode)); ControlsHelper.SetMCLabel(LabelE.WetTotalTime6, SecondToTime(DB2107.Weter[5].TotalTime)); ControlsHelper.SetMCLabel(LabelE.WetStepTime6, SecondToTime(DB2107.Weter[5].StepTime)); ControlsHelper.SetMCLabel(LabelE.DryBatch1, DB2107.Dryer[0].Batch); ControlsHelper.SetMCLabel(LabelE.DryBatch2, DB2107.Dryer[1].Batch); ControlsHelper.SetMCLabel(LabelE.DryBatch3, DB2107.Dryer[2].Batch); ControlsHelper.SetMCLabel(LabelE.DryBatch4, DB2107.Dryer[3].Batch); ControlsHelper.SetMCLabel(LabelE.WetBatch1, DB2107.Weter[0].Batch); ControlsHelper.SetMCLabel(LabelE.WetBatch2, DB2107.Weter[1].Batch); ControlsHelper.SetMCLabel(LabelE.WetBatch3, DB2107.Weter[2].Batch); ControlsHelper.SetMCLabel(LabelE.WetBatch4, DB2107.Weter[3].Batch); ControlsHelper.SetMCLabel(LabelE.WetBatch5, DB2107.Weter[4].Batch); ControlsHelper.SetMCLabel(LabelE.WetBatch6, DB2107.Weter[5].Batch); ControlsHelper.SetMCLabel(LabelE.WetBatch7, DB2107.Weter[6].Batch); ControlsHelper.SetMCLabel(LabelE.WetBatch8, DB2107.Weter[7].Batch); ControlsHelper.SetMCLabel(LabelE.GelBatch1, DB2107.Gelater[0].Batch); ControlsHelper.SetMCLabel(LabelE.GelBatch2, DB2107.Gelater[1].Batch); ControlsHelper.SetMCLabel(LabelE.GelBatch3, DB2107.Gelater[2].Batch); ControlsHelper.SetMCLabel(LabelE.GelBatch4, DB2107.Gelater[3].Batch); ControlsHelper.SetMCLabel(LabelE.GelBatch5, DB2107.Gelater[4].Batch); ControlsHelper.SetMCLabel(LabelE.GelBatch6, DB2107.Gelater[5].Batch); ControlsHelper.SetMCLabel(LabelE.GelBatch7, DB2107.Gelater[6].Batch); ControlsHelper.SetMCLabel(LabelE.GelBatch8, DB2107.Gelater[7].Batch); } /// /// 干混机步骤代码转换为步骤名 /// private string DryStepConvert(int code) { switch (code) { case 1: return "加粉料"; case 4: return "时间控制"; case 6: return "排料等待"; default: return "无"; } } /// /// 糊化机步骤代码转换为步骤名 /// private string GelStepConvert(int code) { switch (code) { case 1: return "加冷水"; case 2: return "加粉料"; case 3: return "搅拌"; case 4: return "加热水"; case 5: return "时间控制"; case 6: return "等待确认"; case 7: return "排料等待"; default: return "无"; } } /// /// 湿混机步骤代码转换为步骤名 /// private string WetStepConvert(int code) { switch (code) { case 1: return "调糊化料"; case 2: return "下干料"; case 3: return "搅拌"; case 4: return "等待确认"; case 5: return "排料等待"; default: return "无"; } } #endregion #region 返回数据读取 private void Timer1_Tick() { bool mixok1 = PlcConnect.Instance.ReadBool("DB3000.0.0").Content; Time(1, mixok1 ? 1 : 0); bool mixok2 = PlcConnect.Instance.ReadBool("DB3000.0.1").Content; Time(2, mixok2 ? 1 : 0); bool mixok3 = PlcConnect.Instance.ReadBool("DB3000.0.2").Content; Time(3, mixok3 ? 1 : 0); bool mixok4 = PlcConnect.Instance.ReadBool("DB3000.0.3").Content; Time(4, mixok4 ? 1 : 0); bool mixok5 = PlcConnect.Instance.ReadBool("DB3000.0.4").Content; Time(5, mixok5 ? 1 : 0); bool mixok6 = PlcConnect.Instance.ReadBool("DB3000.0.5").Content; Time(6, mixok6 ? 1 : 0); bool mixok7 = PlcConnect.Instance.ReadBool("DB3000.0.6").Content; Trace.WriteLine("7号信号:" + mixok7); Time(7, mixok7 ? 1 : 0); bool mixok8 = PlcConnect.Instance.ReadBool("DB3000.0.7").Content; Trace.WriteLine("8号信号:" + mixok8); Time(8, mixok8 ? 1 : 0); } private void Time(int deviceNo, int statu) { //OpenDoorService.Insert(new OpenDoorEntity() //{ // DeviceId = deviceNo, // OpenTime = DateTime.Now, // CreateTime = DateTime.Now, // Status = statu //}); if (WetStatus.ContainsKey(deviceNo) == false) { WetStatus.Add(deviceNo, statu); DonwloadWetState(deviceNo, statu); } if (WetStatus[deviceNo] != statu) { WetStatus[deviceNo] = statu; DonwloadWetState(deviceNo, statu); } } private void DonwloadWetState(int deviceNo, int statu) { TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity() { reqCode = System.Guid.NewGuid().ToString(), reqTime = DateTime.Now, deviceNo = deviceNo.ToString(), state = statu.ToString(), }; //即使网络不同 也不会影响上位机的使用 ThreadPool.QueueUserWorkItem(delegate { HttpResponse httpResponse = new HttpResponse(); // MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}下发请求"); string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity); // LjManualLog.ManualLogControl($"湿混机{deviceNo}返回数据 " + returnTest); MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}返回数据" + returnTest); }); } #endregion } }