using DataBlockHelper.DBHelpers; using Mesnac.Action.Base; using Mesnac.Controls.Base; using Mesnac.Controls.ChemicalWeighing; using Mesnac.Controls.Default; using Mesnac.Controls.Feeding; using Mesnac.Core.Service; 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 HslCommunication.Core; using Mesnac.Action.ChemicalWeighing.FreeDb; using Mesnac.Action.ChemicalWeighing.ManualControl; using DevExpress.Pdf.Native; using DevExpress.Utils.Drawing.Helpers; using Mesnac.Action.ChemicalWeighing.InterfaceDocking; 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; //DataTable ParametersWithPCTable = new DataTable(); //所有Alarm点位 DataTable AllAlarmTable = new DataTable(); //DataTable LogAlarmTable = new DataTable(); //DataTable NowAlarmTable = new DataTable(); //报警展示的dt DataTable TempTable = 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 DbMCControl AlarmForm = null; 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.AlarmForm = McControllist.FirstOrDefault(t => t.BaseControl.MCKey != null && t.BaseControl.MCKey == "AlarmForm"); //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)); TempTable.Columns.Add("报警设备", typeof(string)); TempTable.Columns.Add("报警内容", typeof(string)); TempTable.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"); if (this.AlarmForm != null && this.AlarmForm.BaseControl != null) { this.AlarmForm.BaseControl.BindDataSource = null; this.AlarmForm.BaseControl.BindDataSource = TempTable; } var dict = new HttpResponse().GetLGInfo(); SetMCLabel(LabelE.LineKind1, dict[1]); SetMCLabel(LabelE.LineKind2, dict[2]); SetMCLabel(LabelE.LineKind3, dict[3]); SetMCLabel(LabelE.LineKind4, dict[4]); SetMCLabel(LabelE.LineKind5, dict[5]); SetMCLabel(LabelE.LineKind6, dict[6]); SetMCLabel(LabelE.LineKind7, dict[7]); 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(); } LineKindFlag += 1; if(LineKindFlag >= 300) { LineKindFlag = 0; var dict = new HttpResponse().GetLGInfo(); SetMCLabel(LabelE.LineKind1, dict[1]); SetMCLabel(LabelE.LineKind2, dict[2]); SetMCLabel(LabelE.LineKind3, dict[3]); SetMCLabel(LabelE.LineKind4, dict[4]); SetMCLabel(LabelE.LineKind5, dict[5]); SetMCLabel(LabelE.LineKind6, dict[6]); SetMCLabel(LabelE.LineKind7, dict[7]); SetMCLabel(LabelE.LineKind8, dict[8]); } var reachSingle = RgvPlcUtil.GetRGVAllError(); var mixSingle = Db3000Helper.ReadDb(); RGVRecord(reachSingle, mixSingle); //目前只有主线程可以 //小车到位信号 SetHslLanternAlarm(HslAlarmE.HslLanternAlarm1, reachSingle[0]); SetHslLanternAlarm(HslAlarmE.HslLanternAlarm2, reachSingle[1]); SetHslLanternAlarm(HslAlarmE.HslLanternAlarm3, reachSingle[2]); SetHslLanternAlarm(HslAlarmE.HslLanternAlarm4, reachSingle[3]); SetHslLanternAlarm(HslAlarmE.HslLanternAlarm5, reachSingle[4]); SetHslLanternAlarm(HslAlarmE.HslLanternAlarm6, reachSingle[5]); SetHslLanternAlarm(HslAlarmE.HslLanternAlarm7, reachSingle[6]); SetHslLanternAlarm(HslAlarmE.HslLanternAlarm8, reachSingle[7]); //搅拌准备好信号 SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple1, mixSingle[0]); SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple2, mixSingle[1]); SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple3, mixSingle[2]); SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple4, mixSingle[3]); SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple5, mixSingle[4]); SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple6, mixSingle[5]); SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple7, mixSingle[6]); SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple8, mixSingle[7]); SetHslLanternSimple(HslLanternSimpleE.HslLanternSimpleM1, MinAnPlc.ReqD1); SetHslLanternSimple(HslLanternSimpleE.HslLanternSimpleM2, MinAnPlc.ReqD2); SetHslLanternSimple(HslLanternSimpleE.HslLanternSimpleM3, MinAnPlc.ReqD3); SetHslLanternSimple(HslLanternSimpleE.HslLanternSimpleM4, MinAnPlc.ReqD4); SetHslLanternSimpleRequest(HslLanternSimpleE.HslLanternSimpleReq1, MinAnPlc.Heir1); SetHslLanternSimpleRequest(HslLanternSimpleE.HslLanternSimpleReq2, MinAnPlc.Heir2); SetHslLanternSimpleRequest(HslLanternSimpleE.HslLanternSimpleReq3, MinAnPlc.Heir3); 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() { //DataTable TempTable = DBHelp.GetTable(@"SELECT // t2.Alarm_Other_Info, // t2.Alarm_Cn_Info, // t1.Alarm_OccurTime // FROM // LR_Alarmlog t1 // LEFT JOIN Pmt_Alarm t2 ON t1.Alarm_ID = t2.Alarm_ID // WHERE // t1.Alarm_Status = 1 // ORDER BY // t1.Alarm_OccurTime desc"); b2 = DB2102.bytes; b3 = DB2103.bytes; b7 = DB2107.bytes; TempTable.Rows.Clear(); 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(@" \ "); DataRow dr = TempTable.NewRow(); dr[0] = rows["Alarm_Other_Info"]; dr[1] = rows["Alarm_Cn_Info"]; //dr[2] = nowtime; TempTable.Rows.Add(dr); } 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(@" \ "); DataRow dr = TempTable.NewRow(); dr[0] = rows["Alarm_Other_Info"]; dr[1] = rows["Alarm_Cn_Info"]; //dr[2] = nowtime; TempTable.Rows.Add(dr); } 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(@" \ "); DataRow dr = TempTable.NewRow(); dr[0] = rows["Alarm_Other_Info"]; dr[1] = rows["Alarm_Cn_Info"]; //dr[2] = nowtime; TempTable.Rows.Add(dr); } } string str = sb.ToString(); 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; PlcReadTemp.DV2PCP01_SetL = DB2102.DV2PCP01.SetLeft; PlcReadTemp.DV2PCP02_SetL = DB2102.DV2PCP02.SetLeft; PlcReadTemp.DV2PCP03_SetL = DB2102.DV2PCP03.SetLeft; PlcReadTemp.DV2PCP04_SetL = DB2102.DV2PCP04.SetLeft; PlcReadTemp.DV2PCP05_SetL = DB2102.DV2PCP05.SetLeft; PlcReadTemp.DV2PCP06_SetL = DB2102.DV2PCP06.SetLeft; PlcReadTemp.DV2PCP07_SetL = DB2102.DV2PCP07.SetLeft; PlcReadTemp.DV2PCP08_SetL = DB2102.DV2PCP08.SetLeft; PlcReadTemp.DV2PCP09_SetL = DB2102.DV2PCP09.SetLeft; PlcReadTemp.DV2PCP10_SetL = DB2102.DV2PCP10.SetLeft; PlcReadTemp.DV2PCP11_SetL = DB2102.DV2PCP11.SetLeft; PlcReadTemp.DV2PCP12_SetL = DB2102.DV2PCP12.SetLeft; PlcReadTemp.DV2PCP13_SetL = DB2102.DV2PCP13.SetLeft; PlcReadTemp.DV2PCP01_SetR = DB2102.DV2PCP01.SetRight; PlcReadTemp.DV2PCP02_SetR = DB2102.DV2PCP02.SetRight; PlcReadTemp.DV2PCP03_SetR = DB2102.DV2PCP03.SetRight; PlcReadTemp.DV2PCP04_SetR = DB2102.DV2PCP04.SetRight; PlcReadTemp.DV2PCP05_SetR = DB2102.DV2PCP05.SetRight; PlcReadTemp.DV2PCP06_SetR = DB2102.DV2PCP06.SetRight; PlcReadTemp.DV2PCP07_SetR = DB2102.DV2PCP07.SetRight; PlcReadTemp.DV2PCP08_SetR = DB2102.DV2PCP08.SetRight; PlcReadTemp.DV2PCP09_SetR = DB2102.DV2PCP09.SetRight; PlcReadTemp.DV2PCP10_SetR = DB2102.DV2PCP10.SetRight; PlcReadTemp.DV2PCP11_SetR = DB2102.DV2PCP11.SetRight; PlcReadTemp.DV2PCP12_SetR = DB2102.DV2PCP12.SetRight; PlcReadTemp.DV2PCP13_SetR = DB2102.DV2PCP13.SetRight; 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.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; SetThreeWayValve(ThreeValveE.DV2PCP01, PlcReadTemp.DV2PCP01_AlarmR, PlcReadTemp.DV2PCP01_SetR, PlcReadTemp.DV2PCP01_AlarmL, PlcReadTemp.DV2PCP01_SetL); SetThreeWayValve(ThreeValveE.DV2PCP02, PlcReadTemp.DV2PCP02_AlarmR, PlcReadTemp.DV2PCP02_SetR, PlcReadTemp.DV2PCP02_AlarmL, PlcReadTemp.DV2PCP02_SetL); SetThreeWayValve(ThreeValveE.DV2PCP03, PlcReadTemp.DV2PCP03_AlarmR, PlcReadTemp.DV2PCP03_SetR, PlcReadTemp.DV2PCP03_AlarmL, PlcReadTemp.DV2PCP03_SetL); SetThreeWayValve(ThreeValveE.DV2PCP04, PlcReadTemp.DV2PCP04_AlarmR, PlcReadTemp.DV2PCP04_SetR, PlcReadTemp.DV2PCP04_AlarmL, PlcReadTemp.DV2PCP04_SetL); SetThreeWayValve(ThreeValveE.DV2PCP05, PlcReadTemp.DV2PCP05_AlarmR, PlcReadTemp.DV2PCP05_SetR, PlcReadTemp.DV2PCP05_AlarmL, PlcReadTemp.DV2PCP05_SetL); SetThreeWayValve(ThreeValveE.DV2PCP06, PlcReadTemp.DV2PCP06_AlarmR, PlcReadTemp.DV2PCP06_SetR, PlcReadTemp.DV2PCP06_AlarmL, PlcReadTemp.DV2PCP06_SetL); SetThreeWayValve(ThreeValveE.DV2PCP07, PlcReadTemp.DV2PCP07_AlarmR, PlcReadTemp.DV2PCP07_SetR, PlcReadTemp.DV2PCP07_AlarmL, PlcReadTemp.DV2PCP07_SetL); SetThreeWayValve(ThreeValveE.DV2PCP08, PlcReadTemp.DV2PCP08_AlarmR, PlcReadTemp.DV2PCP08_SetR, PlcReadTemp.DV2PCP08_AlarmL, PlcReadTemp.DV2PCP08_SetL); SetThreeWayValve(ThreeValveE.DV2PCP09, PlcReadTemp.DV2PCP09_AlarmR, PlcReadTemp.DV2PCP09_SetR, PlcReadTemp.DV2PCP09_AlarmL, PlcReadTemp.DV2PCP09_SetL); SetThreeWayValve(ThreeValveE.DV2PCP10, PlcReadTemp.DV2PCP10_AlarmR, PlcReadTemp.DV2PCP10_SetR, PlcReadTemp.DV2PCP10_AlarmL, PlcReadTemp.DV2PCP10_SetL); SetThreeWayValve(ThreeValveE.DV2PCP11, PlcReadTemp.DV2PCP11_AlarmR, PlcReadTemp.DV2PCP11_SetR, PlcReadTemp.DV2PCP11_AlarmL, PlcReadTemp.DV2PCP11_SetL); SetThreeWayValve(ThreeValveE.DV2PCP12, PlcReadTemp.DV2PCP12_AlarmR, PlcReadTemp.DV2PCP12_SetR, PlcReadTemp.DV2PCP12_AlarmL, PlcReadTemp.DV2PCP12_SetL); SetThreeWayValve(ThreeValveE.DV2PCP13, PlcReadTemp.DV2PCP13_AlarmR, PlcReadTemp.DV2PCP13_SetR, PlcReadTemp.DV2PCP13_AlarmL, PlcReadTemp.DV2PCP13_SetL); SetLjSwith(SwithE.BU1ASF01, PlcReadTemp.BU1ASF01_Set, PlcReadTemp.BU1ASF01_Alarm); SetLjSwith(SwithE.BU1BSF01, PlcReadTemp.BU1BSF01_Set, PlcReadTemp.BU1BSF01_Alarm); SetLjSwith(SwithE.BU1CSF01, PlcReadTemp.BU1CSF01_Set, PlcReadTemp.BU1CSF01_Alarm); SetLjSwith(SwithE.BU1DSF01, PlcReadTemp.BU1DSF01_Set, PlcReadTemp.BU1DSF01_Alarm); SetLjSwith(SwithE.BU1ESF01, PlcReadTemp.BU1ESF01_Set, PlcReadTemp.BU1ESF01_Alarm); SetLjSwith(SwithE.BU1FSF01, PlcReadTemp.BU1FSF01_Set, PlcReadTemp.BU1FSF01_Alarm); SetLjSwith(SwithE.BU1GSF01, PlcReadTemp.BU1GSF01_Set, PlcReadTemp.BU1GSF01_Alarm); SetLjSwith(SwithE.BU1HSF01, PlcReadTemp.BU1HSF01_Set, PlcReadTemp.BU1HSF01_Alarm); SetLjSwith(SwithE.BU1ISF01, PlcReadTemp.BU1ISF01_Set, PlcReadTemp.BU1ISF01_Alarm); SetLjSwith(SwithE.BU1JSF01, PlcReadTemp.BU1JSF01_Set, PlcReadTemp.BU1JSF01_Alarm); SetLjSwith(SwithE.BU1KSF01, PlcReadTemp.BU1KSF01_Set, PlcReadTemp.BU1KSF01_Alarm); SetLjSwith(SwithE.BU1LSF01, PlcReadTemp.BU1LSF01_Set, PlcReadTemp.BU1LSF01_Alarm); SetLjSwith(SwithE.BU1MSF01, PlcReadTemp.BU1MSF01_Set, PlcReadTemp.BU1MSF01_Alarm); SetLjSwith(SwithE.BU1NSF01, PlcReadTemp.BU1NSF01_Set, PlcReadTemp.BU1NSF01_Alarm); SetLjSwith(SwithE.BU1OSF01, PlcReadTemp.BU1OSF01_Set, PlcReadTemp.BU1OSF01_Alarm); SetLjSwith(SwithE.BU1BLT01, PlcReadTemp.BU1BLT01_Set, PlcReadTemp.BU1BLT01_Alarm); SetLjSwith(SwithE.BU1BLT02, PlcReadTemp.BU1BLT02_Set, PlcReadTemp.BU1BLT02_Alarm); SetLjSwith(SwithE.BU1BLT03, PlcReadTemp.BU1BLT03_Set, PlcReadTemp.BU1BLT03_Alarm); SetLjSwith(SwithE.BU1BLT04, PlcReadTemp.BU1BLT04_Set, PlcReadTemp.BU1BLT04_Alarm); SetLjSwith(SwithE.BU1BLT05, PlcReadTemp.BU1BLT05_Set, PlcReadTemp.BU1BLT05_Alarm); SetLjSwith(SwithE.BU1BLT06, PlcReadTemp.BU1BLT06_Set, PlcReadTemp.BU1BLT06_Alarm); SetLjSwith(SwithE.BU1BLT07, PlcReadTemp.BU1BLT07_Set, PlcReadTemp.BU1BLT07_Alarm); SetLjSwith(SwithE.BU2BLT01, PlcReadTemp.BU2BLT01_Set, PlcReadTemp.BU2BLT01_Alarm); SetLjSwith(SwithE.BU2BLT02, PlcReadTemp.BU2BLT02_Set, PlcReadTemp.BU2BLT02_Alarm); SetLjSwith(SwithE.BU2BLT03, PlcReadTemp.BU2BLT03_Set, PlcReadTemp.BU2BLT03_Alarm); SetLjSwith(SwithE.BU2BLT04, PlcReadTemp.BU2BLT04_Set, PlcReadTemp.BU2BLT04_Alarm); SetLjSwith(SwithE.BU2BLT05, PlcReadTemp.BU2BLT05_Set, PlcReadTemp.BU2BLT05_Alarm); SetLjSwith(SwithE.BU3BLT01, PlcReadTemp.BU3BLT01_Set, PlcReadTemp.BU3BLT01_Alarm); SetLjSwith(SwithE.BU3BLT02, PlcReadTemp.BU3BLT02_Set, PlcReadTemp.BU3BLT02_Alarm); SetLjSwith(SwithE.BU3BLT03, PlcReadTemp.BU3BLT03_Set, PlcReadTemp.BU3BLT03_Alarm); SetLjSwith(SwithE.BU3BLT04, PlcReadTemp.BU3BLT04_Set, PlcReadTemp.BU3BLT04_Alarm); SetLjSwith(SwithE.BU3BLT05, PlcReadTemp.BU3BLT05_Set, PlcReadTemp.BU3BLT05_Alarm); SetLjSwith(SwithE.BU3BLT06, PlcReadTemp.BU3BLT06_Set, PlcReadTemp.BU3BLT06_Alarm); SetLjSwith(SwithE.BU3BLT07, PlcReadTemp.BU3BLT07_Set, PlcReadTemp.BU3BLT07_Alarm); SetLjSwith(SwithE.BU4BLT01, PlcReadTemp.BU4BLT01_Set, PlcReadTemp.BU4BLT01_Alarm); SetLjSwith(SwithE.BU4BLT02, PlcReadTemp.BU4BLT02_Set, PlcReadTemp.BU4BLT02_Alarm); SetLjSwith(SwithE.BU4BLT03, PlcReadTemp.BU4BLT03_Set, PlcReadTemp.BU4BLT03_Alarm); SetLjSwith(SwithE.BU4BLT04, PlcReadTemp.BU4BLT04_Set, PlcReadTemp.BU4BLT04_Alarm); SetLjSwith(SwithE.BU4BLT05, PlcReadTemp.BU4BLT05_Set, PlcReadTemp.BU4BLT05_Alarm); SetLjSwith(SwithE.BU4BLT06, PlcReadTemp.BU4BLT06_Set, PlcReadTemp.BU4BLT06_Alarm); SetLjSwith(SwithE.BU4BLT07, PlcReadTemp.BU4BLT07_Set, PlcReadTemp.BU4BLT07_Alarm); SetLjSwith(SwithE.BU5BLT01, PlcReadTemp.BU5BLT01_Set, PlcReadTemp.BU5BLT01_Alarm); SetLjSwith(SwithE.BU5BLT02, PlcReadTemp.BU5BLT02_Set, PlcReadTemp.BU5BLT02_Alarm); SetLjSwith(SwithE.BU5BLT03, PlcReadTemp.BU5BLT03_Set, PlcReadTemp.BU5BLT03_Alarm); SetLjSwith(SwithE.BU5BLT04, PlcReadTemp.BU5BLT04_Set, PlcReadTemp.BU5BLT04_Alarm); SetLjSwith(SwithE.BU1ADB01, PlcReadTemp.BU1ADB01_Set, PlcReadTemp.BU1ADB01_Alarm); SetLjSwith(SwithE.BU1BDB01, PlcReadTemp.BU1BDB01_Set, PlcReadTemp.BU1BDB01_Alarm); SetLjSwith(SwithE.BU1CDB01, PlcReadTemp.BU1CDB01_Set, PlcReadTemp.BU1CDB01_Alarm); SetLjSwith(SwithE.BU1DDB01, PlcReadTemp.BU1DDB01_Set, PlcReadTemp.BU1DDB01_Alarm); SetLjSwith(SwithE.BU1EDB01, PlcReadTemp.BU1EDB01_Set, PlcReadTemp.BU1EDB01_Alarm); SetLjSwith(SwithE.BU1FDB01, PlcReadTemp.BU1FDB01_Set, PlcReadTemp.BU1FDB01_Alarm); SetLjSwith(SwithE.BU1GDB01, PlcReadTemp.BU1GDB01_Set, PlcReadTemp.BU1GDB01_Alarm); SetLjSwith(SwithE.BU1HDB01, PlcReadTemp.BU1HDB01_Set, PlcReadTemp.BU1HDB01_Alarm); SetLjSwith(SwithE.BU1IDB01, PlcReadTemp.BU1IDB01_Set, PlcReadTemp.BU1IDB01_Alarm); SetLjSwith(SwithE.BU1JDB01, PlcReadTemp.BU1JDB01_Set, PlcReadTemp.BU1JDB01_Alarm); SetLjSwith(SwithE.BU1KDB01, PlcReadTemp.BU1KDB01_Set, PlcReadTemp.BU1KDB01_Alarm); SetLjSwith(SwithE.BU1LDB01, PlcReadTemp.BU1LDB01_Set, PlcReadTemp.BU1LDB01_Alarm); SetLjSwith(SwithE.BU1GEB02, PlcReadTemp.BU1GEB02_Set, PlcReadTemp.BU1GEB02_Alarm); SetLjSwith(SwithE.BU2GEB02, PlcReadTemp.BU2GEB02_Set, PlcReadTemp.BU2GEB02_Alarm); SetLjSwith(SwithE.BU3GEB02, PlcReadTemp.BU3GEB02_Set, PlcReadTemp.BU3GEB02_Alarm); SetLjSwith(SwithE.BU4GEB02, PlcReadTemp.BU4GEB02_Set, PlcReadTemp.BU4GEB02_Alarm); SetLjSwith(SwithE.BU5GEB02, PlcReadTemp.BU5GEB02_Set, PlcReadTemp.BU5GEB02_Alarm); SetLjSwith(SwithE.BU6GEB02, PlcReadTemp.BU6GEB02_Set, PlcReadTemp.BU6GEB02_Alarm); SetLjSwith(SwithE.BU7GEB02, PlcReadTemp.BU7GEB02_Set, PlcReadTemp.BU7GEB02_Alarm); SetLjSwith(SwithE.BU8GEB02, PlcReadTemp.BU8GEB02_Set, PlcReadTemp.BU8GEB02_Alarm); SetLjSwith(SwithE.BU1DRB01, PlcReadTemp.BU1DRB01_Set, PlcReadTemp.BU1DRB01_Alarm); SetLjSwith(SwithE.BU2DRB01, PlcReadTemp.BU2DRB01_Set, PlcReadTemp.BU2DRB01_Alarm); SetLjSwith(SwithE.BU3DRB01, PlcReadTemp.BU3DRB01_Set, PlcReadTemp.BU3DRB01_Alarm); SetLjSwith(SwithE.BU4DRB01, PlcReadTemp.BU4DRB01_Set, PlcReadTemp.BU4DRB01_Alarm); SetLjSwith(SwithE.BU1GEB01, PlcReadTemp.BU1GEB01_Set, PlcReadTemp.BU1GEB01_Alarm); SetLjSwith(SwithE.BU2GEB01, PlcReadTemp.BU2GEB01_Set, PlcReadTemp.BU2GEB01_Alarm); SetLjSwith(SwithE.BU3GEB01, PlcReadTemp.BU3GEB01_Set, PlcReadTemp.BU3GEB01_Alarm); SetLjSwith(SwithE.BU4GEB01, PlcReadTemp.BU4GEB01_Set, PlcReadTemp.BU4GEB01_Alarm); SetLjSwith(SwithE.BU5GEB01, PlcReadTemp.BU5GEB01_Set, PlcReadTemp.BU5GEB01_Alarm); SetLjSwith(SwithE.BU6GEB01, PlcReadTemp.BU6GEB01_Set, PlcReadTemp.BU6GEB01_Alarm); SetLjSwith(SwithE.BU7GEB01, PlcReadTemp.BU7GEB01_Set, PlcReadTemp.BU7GEB01_Alarm); SetLjSwith(SwithE.BU8GEB01, PlcReadTemp.BU8GEB01_Set, PlcReadTemp.BU8GEB01_Alarm); SetLjSwith(SwithE.BU2ASF01, PlcReadTemp.BU2ASF01_Set, PlcReadTemp.BU2ASF01_Alarm); SetLjSwith(SwithE.BU2ASF02, PlcReadTemp.BU2ASF02_Set, PlcReadTemp.BU2ASF02_Alarm); SetLjSwith(SwithE.BU2BSF01, PlcReadTemp.BU2BSF01_Set, PlcReadTemp.BU2BSF01_Alarm); SetLjSwith(SwithE.BU2BSF02, PlcReadTemp.BU2BSF02_Set, PlcReadTemp.BU2BSF02_Alarm); SetLjSwith(SwithE.BU2CSF01, PlcReadTemp.BU2CSF01_Set, PlcReadTemp.BU2CSF01_Alarm); SetLjSwith(SwithE.BU2CSF02, PlcReadTemp.BU2CSF02_Set, PlcReadTemp.BU2CSF02_Alarm); SetLjSwith(SwithE.BU2DSF01, PlcReadTemp.BU2DSF01_Set, PlcReadTemp.BU2DSF01_Alarm); SetLjSwith(SwithE.BU2DSF02, PlcReadTemp.BU2DSF02_Set, PlcReadTemp.BU2DSF02_Alarm); SetLjSwith(SwithE.BUWeter1, PlcReadTemp.BUWeter1_Set, PlcReadTemp.BUWeter1_Alarm); SetLjSwith(SwithE.BUWeter2, PlcReadTemp.BUWeter2_Set, PlcReadTemp.BUWeter2_Alarm); SetLjSwith(SwithE.BUWeter3, PlcReadTemp.BUWeter3_Set, PlcReadTemp.BUWeter3_Alarm); SetLjSwith(SwithE.BUWeter4, PlcReadTemp.BUWeter4_Set, PlcReadTemp.BUWeter4_Alarm); SetLjSwith(SwithE.BUWeter5, PlcReadTemp.BUWeter5_Set, PlcReadTemp.BUWeter5_Alarm); SetLjSwith(SwithE.BUWeter6, PlcReadTemp.BUWeter6_Set, PlcReadTemp.BUWeter6_Alarm); SetLjSwith(SwithE.BUWeter7, PlcReadTemp.BUWeter7_Set, PlcReadTemp.BUWeter7_Alarm); 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 (DB2119.Spiral_A.Polarty) { 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 (DB2119.Spiral_B.Polarty) { 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 (DB2119.Spiral_C.Polarty) { 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; SetMCLabel(LabelE.DM1DRY1_ACT_Speed, (float)Math.Round(PlcReadTemp.DM1DRY1_ACT_Speed_Set, 2)); SetMCLabel(LabelE.DM1DRY2_ACT_Speed, (float)Math.Round(PlcReadTemp.DM1DRY2_ACT_Speed_Set, 2)); SetMCLabel(LabelE.DM1DRY3_ACT_Speed, (float)Math.Round(PlcReadTemp.DM1DRY3_ACT_Speed_Set, 2)); SetMCLabel(LabelE.DM1DRY4_ACT_Speed, (float)Math.Round(PlcReadTemp.DM1DRY4_ACT_Speed_Set, 2)); SetMCLabel(LabelE.DM1GEM, (float)Math.Round(PlcReadTemp.DM1GEM_Set, 2)); SetMCLabel(LabelE.DM2GEM, (float)Math.Round(PlcReadTemp.DM2GEM_Set, 2)); SetMCLabel(LabelE.DM3GEM, (float)Math.Round(PlcReadTemp.DM3GEM_Set, 2)); SetMCLabel(LabelE.DM4GEM, (float)Math.Round(PlcReadTemp.DM4GEM_Set, 2)); SetMCLabel(LabelE.DM5GEM, (float)Math.Round(PlcReadTemp.DM5GEM_Set, 2)); SetMCLabel(LabelE.DM6GEM, (float)Math.Round(PlcReadTemp.DM6GEM_Set, 2)); SetMCLabel(LabelE.DM7GEM, (float)Math.Round(PlcReadTemp.DM7GEM_Set, 2)); SetMCLabel(LabelE.DM8GEM, (float)Math.Round(PlcReadTemp.DM8GEM_Set, 2)); SetMCLabel(LabelE.DM2ASF01, (float)Math.Round(PlcReadTemp.DM2ASF01_Set, 2)); SetMCLabel(LabelE.DM2BSF01, (float)Math.Round(PlcReadTemp.DM2BSF01_Set, 2)); SetMCLabel(LabelE.DM2CSF01, (float)Math.Round(PlcReadTemp.DM2CSF01_Set, 2)); SetMCLabel(LabelE.DM2DSF01, (float)Math.Round(PlcReadTemp.DM2DSF01_Set, 2)); SetRSCREWBIG(RSCREE.DM1ASF01, PlcReadTemp.DM1ASF01_Set); SetRSCREWBIG(RSCREE.DM1BSF01, PlcReadTemp.DM1BSF01_Set); SetLSCREWBIG(LSCREE.DM1CSF01, PlcReadTemp.DM1CSF01_Set); SetLSCREWBIG(LSCREE.DM1DSF01, PlcReadTemp.DM1DSF01_Set); SetRSCREWBIG(RSCREE.DM1ESF01, PlcReadTemp.DM1ESF01_Set); SetLSCREWBIG(LSCREE.DM1FSF01, PlcReadTemp.DM1FSF01_Set); SetRSCREWBIG(RSCREE.DM1GSF01, PlcReadTemp.DM1GSF01_Set); SetRSCREWBIG(RSCREE.DM1HSF01, PlcReadTemp.DM1HSF01_Set); SetLSCREWBIG(LSCREE.DM1ISF01, PlcReadTemp.DM1ISF01_Set); SetLSCREWBIG(LSCREE.DM1JSF01, PlcReadTemp.DM1JSF01_Set); SetRSCREWBIG(RSCREE.DM1KSF01, PlcReadTemp.DM1KSF01_Set); SetRSCREWBIG(RSCREE.DM1LSF01, PlcReadTemp.DM1LSF01_Set); SetLSCREWBIG(LSCREE.DM1MSF01, PlcReadTemp.DM1MSF01_Set); SetLSCREWBIG(LSCREE.DM1NSF01, PlcReadTemp.DM1NSF01_Set); SetRSCREWBIG(RSCREE.DM1OSF01, PlcReadTemp.DM1OSF01_Set); SetLSCREWBIG(LSCREE.DM2ASF01L, PlcReadTemp.DM2ASF01L_Set); SetLSCREWBIG(LSCREE.DM2BSF01L, PlcReadTemp.DM2BSF01L_Set); SetLSCREWBIG(LSCREE.DM2CSF01L, PlcReadTemp.DM2CSF01L_Set); SetLSCREWBIG(LSCREE.DM2DSF01L, PlcReadTemp.DM2DSF01L_Set); SetRSCREWBIG(RSCREE.DM2ASF01R, PlcReadTemp.DM2ASF01R_Set); SetRSCREWBIG(RSCREE.DM2BSF01R, PlcReadTemp.DM2BSF01R_Set); SetRSCREWBIG(RSCREE.DM2CSF01R, PlcReadTemp.DM2CSF01R_Set); SetRSCREWBIG(RSCREE.DM2DSF01R, PlcReadTemp.DM2DSF01R_Set); SetFan(FanE.DM1ADF01, PlcReadTemp.DM1ADF01_Set); SetFan(FanE.DM1BDF01, PlcReadTemp.DM1BDF01_Set); SetFan(FanE.DM1CDF01, PlcReadTemp.DM1CDF01_Set); SetFan(FanE.DM1DDF01, PlcReadTemp.DM1DDF01_Set); SetFan(FanE.DM1EDF01, PlcReadTemp.DM1EDF01_Set); SetFan(FanE.DM1FDF01, PlcReadTemp.DM1FDF01_Set); SetFan(FanE.DM1GDF01, PlcReadTemp.DM1GDF01_Set); SetFan(FanE.DM1HDF01, PlcReadTemp.DM1HDF01_Set); SetFan(FanE.DM1IDF01, PlcReadTemp.DM1IDF01_Set); SetFan(FanE.DM1JDF01, PlcReadTemp.DM1JDF01_Set); SetFan(FanE.DM1KDF01, PlcReadTemp.DM1KDF01_Set); SetFan(FanE.DM1LDF01, PlcReadTemp.DM1LDF01_Set); SetFan(FanE.DM1ADB01, PlcReadTemp.DM1ADB01_Set); SetFan(FanE.DM1BDB01, PlcReadTemp.DM1BDB01_Set); SetFan(FanE.DM1CDB01, PlcReadTemp.DM1CDB01_Set); SetFan(FanE.DM1DDB01, PlcReadTemp.DM1DDB01_Set); SetFan(FanE.DM1EDB01, PlcReadTemp.DM1EDB01_Set); SetFan(FanE.DM1FDB01, PlcReadTemp.DM1FDB01_Set); SetFan(FanE.DM1GDB01, PlcReadTemp.DM1GDB01_Set); SetFan(FanE.DM1HDB01, PlcReadTemp.DM1HDB01_Set); SetFan(FanE.DM1IDB01, PlcReadTemp.DM1IDB01_Set); SetFan(FanE.DM1JDB01, PlcReadTemp.DM1JDB01_Set); SetFan(FanE.DM1KDB01, PlcReadTemp.DM1KDB01_Set); SetFan(FanE.DM1LDB01, PlcReadTemp.DM1LDB01_Set); SetFan(FanE.DM1DRY1_Running, PlcReadTemp.DM1DRY1_Running_Set); SetFan(FanE.DM1DRY2_Running, PlcReadTemp.DM1DRY2_Running_Set); SetFan(FanE.DM1DRY3_Running, PlcReadTemp.DM1DRY3_Running_Set); SetFan(FanE.DM1DRY4_Running, PlcReadTemp.DM1DRY4_Running_Set); SetFan(FanE.PM3ADF01, PlcReadTemp.PM3ADF01_Set); SetSwitchLight(LightE.DMWETER1, PlcReadTemp.DMWETER1_Set, PlcReadTemp.DMWETER1_Alarm); SetSwitchLight(LightE.DMWETER11, PlcReadTemp.DMWETER1_Set, PlcReadTemp.DMWETER1_Alarm); SetSwitchLight(LightE.DMWETER2, PlcReadTemp.DMWETER2_Set, PlcReadTemp.DMWETER2_Alarm); SetSwitchLight(LightE.DMWETER22, PlcReadTemp.DMWETER2_Set, PlcReadTemp.DMWETER2_Alarm); SetSwitchLight(LightE.DMWETER3, PlcReadTemp.DMWETER3_Set, PlcReadTemp.DMWETER3_Alarm); SetSwitchLight(LightE.DMWETER33, PlcReadTemp.DMWETER3_Set, PlcReadTemp.DMWETER3_Alarm); SetSwitchLight(LightE.DMWETER4, PlcReadTemp.DMWETER4_Set, PlcReadTemp.DMWETER4_Alarm); SetSwitchLight(LightE.DMWETER44, PlcReadTemp.DMWETER4_Set, PlcReadTemp.DMWETER4_Alarm); SetSwitchLight(LightE.DMWETER5, PlcReadTemp.DMWETER5_Set, PlcReadTemp.DMWETER5_Alarm); SetSwitchLight(LightE.DMWETER55, PlcReadTemp.DMWETER5_Set, PlcReadTemp.DMWETER5_Alarm); SetSwitchLight(LightE.DMWETER6, PlcReadTemp.DMWETER6_Set, PlcReadTemp.DMWETER6_Alarm); SetSwitchLight(LightE.DMWETER66, PlcReadTemp.DMWETER6_Set, PlcReadTemp.DMWETER6_Alarm); SetSwitchLight(LightE.DMWETER7, PlcReadTemp.DMWETER7_Set, PlcReadTemp.DMWETER7_Alarm); SetSwitchLight(LightE.DMWETER77, PlcReadTemp.DMWETER7_Set, PlcReadTemp.DMWETER7_Alarm); SetSwitchLight(LightE.DMWETER8, PlcReadTemp.DMWETER8_Set, PlcReadTemp.DMWETER8_Alarm); 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 //{ //} if (PlcReadTemp.DM2DSF01L_Set) { PlcReadTemp.ValueWeight4 = DB2107.Weter[6].FeedValue.ToString("0.#"); } else { PlcReadTemp.ValueWeight4 = DB2107.Weter[7].FeedValue.ToString("0.#"); } SetMCLabel(LabelE.ValueWeight1, PlcReadTemp.ValueWeight1); SetMCLabel(LabelE.ValueWeight2, PlcReadTemp.ValueWeight2); SetMCLabel(LabelE.ValueWeight3, PlcReadTemp.ValueWeight3); //yang 增加4的显示 SetMCLabel(LabelE.ValueWeight4, PlcReadTemp.ValueWeight4); SetStateButton(DetailE.WatchDog, PlcReadTemp.WatchDog_Set); SetSystemStateShow(DetailE.EMStop, PlcReadTemp.EMStop_Set); SetSwitchLight(LightE.Vessel_1_HighLevel, PlcReadTemp.Vessel_1_HighLevel_Set, false); SetSwitchLight(LightE.Vessel_2_HighLevel, PlcReadTemp.Vessel_2_HighLevel_Set, false); SetSwitchLight(LightE.Vessel_3_HighLevel, PlcReadTemp.Vessel_3_HighLevel_Set, false); SetSwitchLight(LightE.Vessel_4_HighLevel, PlcReadTemp.Vessel_4_HighLevel_Set, false); SetSwitchLight(LightE.Vessel_5_HighLevel, PlcReadTemp.Vessel_5_HighLevel_Set, false); SetSwitchLight(LightE.Vessel_1_LowLevel, PlcReadTemp.Vessel_1_LowLevel_Set, false); SetSwitchLight(LightE.Vessel_2_LowLevel, PlcReadTemp.Vessel_2_LowLevel_Set, false); SetSwitchLight(LightE.Vessel_3_LowLevel, PlcReadTemp.Vessel_3_LowLevel_Set, false); SetSwitchLight(LightE.Vessel_4_LowLevel, PlcReadTemp.Vessel_4_LowLevel_Set, false); SetSwitchLight(LightE.Vessel_5_LowLevel, PlcReadTemp.Vessel_5_LowLevel_Set, false); SetSwitchLight(LightE.highLevel_D1, PlcReadTemp.highLevel_D1_Set, false); SetSwitchLight(LightE.highLevel_D2, PlcReadTemp.highLevel_D2_Set, false); SetSwitchLight(LightE.highLevel_D3, PlcReadTemp.highLevel_D3_Set, false); SetSwitchLight(LightE.highLevel_D4, PlcReadTemp.highLevel_D4_Set, false); SetSwitchLight(LightE.highLevel_D5, PlcReadTemp.highLevel_D5_Set, false); SetSwitchLight(LightE.highLevel_D6, PlcReadTemp.highLevel_D6_Set, false); SetSwitchLight(LightE.highLevel_D7, PlcReadTemp.highLevel_D7_Set, false); SetSwitchLight(LightE.highLevel_D8, PlcReadTemp.highLevel_D8_Set, false); SetSwitchLight(LightE.highLevel_D9, PlcReadTemp.highLevel_D9_Set, false); SetSwitchLight(LightE.highLevel_D10, PlcReadTemp.highLevel_D10_Set, false); SetSwitchLight(LightE.highLevel_D11, PlcReadTemp.highLevel_D11_Set, false); SetSwitchLight(LightE.highLevel_D12, PlcReadTemp.highLevel_D12_Set, false); SetSwitchLight(LightE.lowLevel_D1, PlcReadTemp.lowLevel_D1_Set, false); SetSwitchLight(LightE.lowLevel_D2, PlcReadTemp.lowLevel_D2_Set, false); SetSwitchLight(LightE.lowLevel_D3, PlcReadTemp.lowLevel_D3_Set, false); SetSwitchLight(LightE.lowLevel_D4, PlcReadTemp.lowLevel_D4_Set, false); SetSwitchLight(LightE.lowLevel_D5, PlcReadTemp.lowLevel_D5_Set, false); SetSwitchLight(LightE.lowLevel_D6, PlcReadTemp.lowLevel_D6_Set, false); SetSwitchLight(LightE.lowLevel_D7, PlcReadTemp.lowLevel_D7_Set, false); SetSwitchLight(LightE.lowLevel_D8, PlcReadTemp.lowLevel_D8_Set, false); SetSwitchLight(LightE.lowLevel_D9, PlcReadTemp.lowLevel_D9_Set, false); SetSwitchLight(LightE.lowLevel_D10, PlcReadTemp.lowLevel_D10_Set, false); SetSwitchLight(LightE.lowLevel_D11, PlcReadTemp.lowLevel_D11_Set, false); SetSwitchLight(LightE.lowLevel_D12, PlcReadTemp.lowLevel_D12_Set, false); SetSwitchLight(LightE.Hopper_1_HighLevel, PlcReadTemp.Hopper_1_HighLevel_Set, false); SetSwitchLight(LightE.Hopper_2_HighLevel, PlcReadTemp.Hopper_2_HighLevel_Set, false); SetSwitchLight(LightE.Hopper_3_HighLevel, PlcReadTemp.Hopper_3_HighLevel_Set, false); SetSwitchLight(LightE.Hopper_4_HighLevel, PlcReadTemp.Hopper_4_HighLevel_Set, false); SetSwitchLight(LightE.Hopper_1_LowLevel, PlcReadTemp.Hopper_1_LowLevel_Set, false); SetSwitchLight(LightE.Hopper_2_LowLevel, PlcReadTemp.Hopper_2_LowLevel_Set, false); SetSwitchLight(LightE.Hopper_3_LowLevel, PlcReadTemp.Hopper_3_LowLevel_Set, false); SetSwitchLight(LightE.Hopper_4_LowLevel, PlcReadTemp.Hopper_4_LowLevel_Set, false); SetMCLabel(LabelE.topPressure_V1, (float)Math.Round(PlcReadTemp.topPressure_V2_Set, 2)); SetMCLabel(LabelE.topPressure_V2, (float)Math.Round(PlcReadTemp.topPressure_V2_Set, 2)); SetMCLabel(LabelE.topPressure_V3, (float)Math.Round(PlcReadTemp.topPressure_V3_Set, 2)); SetMCLabel(LabelE.topPressure_V4, (float)Math.Round(PlcReadTemp.topPressure_V4_Set, 2)); SetMCLabel(LabelE.topPressure_V5, (float)Math.Round(PlcReadTemp.topPressure_V5_Set, 2)); SetMCLabel(LabelE.Vessel_1_ActWeight, (float)Math.Round(PlcReadTemp.Vessel_1_ActWeight_Set, 2)); SetMCLabel(LabelE.Vessel_2_ActWeight, (float)Math.Round(PlcReadTemp.Vessel_2_ActWeight_Set, 2)); SetMCLabel(LabelE.Vessel_3_ActWeight, (float)Math.Round(PlcReadTemp.Vessel_3_ActWeight_Set, 2)); SetMCLabel(LabelE.Vessel_4_ActWeight, (float)Math.Round(PlcReadTemp.Vessel_4_ActWeight_Set, 2)); SetMCLabel(LabelE.Vessel_5_ActWeight, (float)Math.Round(PlcReadTemp.Vessel_5_ActWeight_Set, 2)); SetMCLabel(LabelE.conveyV1_PV, (float)Math.Round(PlcReadTemp.conveyV1_PV_Set, 2)); SetMCLabel(LabelE.conveyV2_PV, (float)Math.Round(PlcReadTemp.conveyV2_PV_Set, 2)); SetMCLabel(LabelE.conveyV3_PV, (float)Math.Round(PlcReadTemp.conveyV3_PV_Set, 2)); SetMCLabel(LabelE.conveyV5_PV, (float)Math.Round(PlcReadTemp.conveyV5_PV_Set, 2)); SetMCLabel(LabelE.mainPress_V1_ActualValue, (float)Math.Round(PlcReadTemp.mainPress_V1_ActualValue_Set, 2)); SetMCLabel(LabelE.mainPress_V2_ActualValue, (float)Math.Round(PlcReadTemp.mainPress_V2_ActualValue_Set, 2)); SetMCLabel(LabelE.mainPress_V3_ActualValue, (float)Math.Round(PlcReadTemp.mainPress_V3_ActualValue_Set, 2)); SetMCLabel(LabelE.mainPress_V5_ActualValue, (float)Math.Round(PlcReadTemp.mainPress_V5_ActualValue_Set, 2)); SetMCLabel(LabelE.purgeV1_PV, (float)Math.Round(PlcReadTemp.purgeV1_PV_Set, 2)); SetMCLabel(LabelE.purgeV2_PV, (float)Math.Round(PlcReadTemp.purgeV2_PV_Set, 2)); SetMCLabel(LabelE.purgeV3_PV, (float)Math.Round(PlcReadTemp.purgeV3_PV_Set, 2)); SetMCLabel(LabelE.purgeV5_PV, (float)Math.Round(PlcReadTemp.purgeV5_PV_Set, 2)); SetMCLabel(LabelE.WScale_1_ActWeight, (float)Math.Round(PlcReadTemp.WScale_1_ActWeight_Set, 2)); SetMCLabel(LabelE.WScale_2_ActWeight, (float)Math.Round(PlcReadTemp.WScale_2_ActWeight_Set, 2)); SetMCLabel(LabelE.WScale_3_ActWeight, (float)Math.Round(PlcReadTemp.WScale_3_ActWeight_Set, 2)); SetMCLabel(LabelE.WScale_4_ActWeight, (float)Math.Round(PlcReadTemp.WScale_4_ActWeight_Set, 2)); SetMCLabel(LabelE.Hopper_1_ActWeight, (float)Math.Round(PlcReadTemp.Hopper_1_ActWeight_Set, 2)); SetMCLabel(LabelE.Hopper_2_ActWeight, (float)Math.Round(PlcReadTemp.Hopper_2_ActWeight_Set, 2)); SetMCLabel(LabelE.Hopper_3_ActWeight, (float)Math.Round(PlcReadTemp.Hopper_3_ActWeight_Set, 2)); SetMCLabel(LabelE.Hopper_4_ActWeight, (float)Math.Round(PlcReadTemp.Hopper_4_ActWeight_Set, 2)); SetJzf(JzfE.AS1BLT01, PlcReadTemp.AS1BLT01_Set); SetJzf(JzfE.AS1BLT02, PlcReadTemp.AS1BLT02_Set); SetJzf(JzfE.AS1BLT03, PlcReadTemp.AS1BLT03_Set); SetJzf(JzfE.AS1BLT04, PlcReadTemp.AS1BLT04_Set); SetJzf(JzfE.AS1BLT05, PlcReadTemp.AS1BLT05_Set); SetJzf(JzfE.AS2BLT01, PlcReadTemp.AS2BLT01_Set); SetJzf(JzfE.AS2BLT02, PlcReadTemp.AS2BLT02_Set); SetJzf(JzfE.AS2BLT03, PlcReadTemp.AS2BLT03_Set); SetJzf(JzfE.AS2BLT04, PlcReadTemp.AS2BLT04_Set); SetJzf(JzfE.AS2BLT05, PlcReadTemp.AS2BLT05_Set); SetJzf(JzfE.AS3BLT01, PlcReadTemp.AS3BLT01_Set); SetJzf(JzfE.AS3BLT02, PlcReadTemp.AS3BLT02_Set); SetJzf(JzfE.AS3BLT03, PlcReadTemp.AS3BLT03_Set); SetJzf(JzfE.AS3BLT04, PlcReadTemp.AS3BLT04_Set); SetJzf(JzfE.AS3BLT05, PlcReadTemp.AS3BLT05_Set); SetJzf(JzfE.AS4BLT01, PlcReadTemp.AS4BLT01_Set); SetJzf(JzfE.AS4BLT03, PlcReadTemp.AS4BLT03_Set); SetJzf(JzfE.AS5BLT01, PlcReadTemp.AS5BLT01_Set); SetJzf(JzfE.AS5BLT02, PlcReadTemp.AS5BLT02_Set); SetJzf(JzfE.AS5BLT03, PlcReadTemp.AS5BLT03_Set); SetJzf(JzfE.AS5BLT04, PlcReadTemp.AS5BLT04_Set); SetJzf(JzfE.AS5BLT05, PlcReadTemp.AS5BLT05_Set); SetJzf(JzfE.AS2PCP01, PlcReadTemp.AS2PCP01_Set); SetJzf(JzfE.AS2PCP02, PlcReadTemp.AS2PCP02_Set); SetJzf(JzfE.AS2PCP03, PlcReadTemp.AS2PCP03_Set); SetJzf(JzfE.AS1OIS01, PlcReadTemp.AS1OIS01_Set); SetJzf(JzfE.AS1OIS02, PlcReadTemp.AS1OIS02_Set); SetJzf(JzfE.AS1OIS03, PlcReadTemp.AS1OIS03_Set); SetJzf(JzfE.AS2OIS01, PlcReadTemp.AS2OIS01_Set); SetJzf(JzfE.AS2OIS02, PlcReadTemp.AS2OIS02_Set); SetJzf(JzfE.AS2OIS03, PlcReadTemp.AS2OIS03_Set); SetJzf(JzfE.AS3OIS01, PlcReadTemp.AS3OIS01_Set); SetJzf(JzfE.AS3OIS02, PlcReadTemp.AS3OIS02_Set); SetJzf(JzfE.AS3OIS03, PlcReadTemp.AS3OIS03_Set); SetJzf(JzfE.AS4OIS01, PlcReadTemp.AS4OIS01_Set); SetJzf(JzfE.AS4OIS02, PlcReadTemp.AS4OIS02_Set); SetJzf(JzfE.AS4OIS03, PlcReadTemp.AS4OIS03_Set); SetJzf(JzfE.AS1GET01, PlcReadTemp.AS1GET01_Set); SetJzf(JzfE.AS1GET02, PlcReadTemp.AS1GET02_Set); SetJzf(JzfE.AS2GET01, PlcReadTemp.AS2GET01_Set); SetJzf(JzfE.AS2GET02, PlcReadTemp.AS2GET02_Set); SetJzf(JzfE.AS3GET01, PlcReadTemp.AS3GET01_Set); SetJzf(JzfE.AS3GET02, PlcReadTemp.AS3GET02_Set); SetJzf(JzfE.AS4GET01, PlcReadTemp.AS4GET01_Set); SetJzf(JzfE.AS4GET02, PlcReadTemp.AS4GET02_Set); SetJzf(JzfE.AS5GET01, PlcReadTemp.AS5GET01_Set); SetJzf(JzfE.AS5GET02, PlcReadTemp.AS5GET02_Set); SetJzf(JzfE.AS6GET01, PlcReadTemp.AS6GET01_Set); SetJzf(JzfE.AS6GET02, PlcReadTemp.AS6GET02_Set); SetJzf(JzfE.AS7GET01, PlcReadTemp.AS7GET01_Set); SetJzf(JzfE.AS7GET02, PlcReadTemp.AS7GET02_Set); SetJzf(JzfE.AS8GET01, PlcReadTemp.AS8GET01_Set); SetJzf(JzfE.AS8GET02, PlcReadTemp.AS8GET02_Set); SetControlCabinet(ControlCabinetE.PM1ADF01, PlcReadTemp.PM1ADF01_Set); SetControlCabinet(ControlCabinetE.PM1BDF01, PlcReadTemp.PM1BDF01_Set); SetControlCabinet(ControlCabinetE.PM1CDF01, PlcReadTemp.PM1CDF01_Set); SetControlCabinet(ControlCabinetE.PM1DDF01, PlcReadTemp.PM1DDF01_Set); SetControlCabinet(ControlCabinetE.PM1EDF01, PlcReadTemp.PM1EDF01_Set); SetControlCabinet(ControlCabinetE.PM1FDF01, PlcReadTemp.PM1FDF01_Set); SetControlCabinet(ControlCabinetE.PM1GDF01, PlcReadTemp.PM1GDF01_Set); SetControlCabinet(ControlCabinetE.PM1HDF01, PlcReadTemp.PM1HDF01_Set); SetControlCabinet(ControlCabinetE.PM1IDF01, PlcReadTemp.PM1IDF01_Set); SetControlCabinet(ControlCabinetE.PM1JDF01, PlcReadTemp.PM1JDF01_Set); SetControlCabinet(ControlCabinetE.PM1KDF01, PlcReadTemp.PM1KDF01_Set); SetControlCabinet(ControlCabinetE.PM1LDF01, PlcReadTemp.PM1LDF01_Set); SetMCLabel(LabelE.DryMode4, DB2107.Dryer[3].Mode, 1); SetMCLabel(LabelE.DryStatus4, DB2107.Dryer[3].Status, 2); SetMCLabel(LabelE.DryStepCode4, DB2107.Dryer[3].StepCode); SetMCLabel(LabelE.DryStepName4, DryStepConvert(DB2107.Dryer[3].StepCode)); SetMCLabel(LabelE.DryTotalTime4, SecondToTime(DB2107.Dryer[3].TotalTime)); SetMCLabel(LabelE.DryStepTime4, SecondToTime(DB2107.Dryer[3].StepTime)); SetMCLabel(LabelE.DryMode1, DB2107.Dryer[0].Mode, 1); SetMCLabel(LabelE.DryStatus1, DB2107.Dryer[0].Status, 2); SetMCLabel(LabelE.DryStepCode1, DB2107.Dryer[0].StepCode); SetMCLabel(LabelE.DryStepName1, DryStepConvert(DB2107.Dryer[0].StepCode)); SetMCLabel(LabelE.DryTotalTime1, SecondToTime(DB2107.Dryer[0].TotalTime)); SetMCLabel(LabelE.DryStepTime1, SecondToTime(DB2107.Dryer[0].StepTime)); SetMCLabel(LabelE.DryMode2, DB2107.Dryer[1].Mode, 1); SetMCLabel(LabelE.DryStatus2, DB2107.Dryer[1].Status, 2); SetMCLabel(LabelE.DryStepCode2, DB2107.Dryer[1].StepCode); SetMCLabel(LabelE.DryStepName2, DryStepConvert(DB2107.Dryer[1].StepCode)); SetMCLabel(LabelE.DryTotalTime2, SecondToTime(DB2107.Dryer[1].TotalTime)); SetMCLabel(LabelE.DryStepTime2, SecondToTime(DB2107.Dryer[1].StepTime)); SetMCLabel(LabelE.DryMode3, DB2107.Dryer[2].Mode, 1); SetMCLabel(LabelE.DryStatus3, DB2107.Dryer[2].Status, 2); SetMCLabel(LabelE.DryStepCode3, DB2107.Dryer[2].StepCode); SetMCLabel(LabelE.DryStepName3, DryStepConvert(DB2107.Dryer[2].StepCode)); SetMCLabel(LabelE.DryTotalTime3, SecondToTime(DB2107.Dryer[2].TotalTime)); SetMCLabel(LabelE.DryStepTime3, SecondToTime(DB2107.Dryer[2].StepTime)); SetMCLabel(LabelE.GelMode7, DB2107.Gelater[6].Mode, 1); SetMCLabel(LabelE.GelStatus7, DB2107.Gelater[6].Status, 2); SetMCLabel(LabelE.GelStepCode7, DB2107.Gelater[6].StepCode); SetMCLabel(LabelE.GelStepName7, GelStepConvert(DB2107.Gelater[6].StepCode)); SetMCLabel(LabelE.GelTotalTime7, SecondToTime(DB2107.Gelater[6].TotalTime)); SetMCLabel(LabelE.GelStepTime7, SecondToTime(DB2107.Gelater[6].StepTime)); SetMCLabel(LabelE.GelMode8, DB2107.Gelater[7].Mode, 1); SetMCLabel(LabelE.GelStatus8, DB2107.Gelater[7].Status, 2); SetMCLabel(LabelE.GelStepCode8, DB2107.Gelater[7].StepCode); SetMCLabel(LabelE.GelStepName8, GelStepConvert(DB2107.Gelater[7].StepCode)); SetMCLabel(LabelE.GelTotalTime8, SecondToTime(DB2107.Gelater[7].TotalTime)); SetMCLabel(LabelE.GelStepTime8, SecondToTime(DB2107.Gelater[7].StepTime)); SetMCLabel(LabelE.GelMode1, DB2107.Gelater[0].Mode, 1); SetMCLabel(LabelE.GelStatus1, DB2107.Gelater[0].Status, 2); SetMCLabel(LabelE.GelStepCode1, DB2107.Gelater[0].StepCode); SetMCLabel(LabelE.GelStepName1, GelStepConvert(DB2107.Gelater[0].StepCode)); SetMCLabel(LabelE.GelTotalTime1, SecondToTime(DB2107.Gelater[0].TotalTime)); SetMCLabel(LabelE.GelStepTime1, SecondToTime(DB2107.Gelater[0].StepTime)); SetMCLabel(LabelE.GelMode2, DB2107.Gelater[1].Mode, 1); SetMCLabel(LabelE.GelStatus2, DB2107.Gelater[1].Status, 2); SetMCLabel(LabelE.GelStepCode2, DB2107.Gelater[1].StepCode); SetMCLabel(LabelE.GelStepName2, GelStepConvert(DB2107.Gelater[1].StepCode)); SetMCLabel(LabelE.GelTotalTime2, SecondToTime(DB2107.Gelater[1].TotalTime)); SetMCLabel(LabelE.GelStepTime2, SecondToTime(DB2107.Gelater[1].StepTime)); SetMCLabel(LabelE.GelMode3, DB2107.Gelater[2].Mode, 1); SetMCLabel(LabelE.GelStatus3, DB2107.Gelater[2].Status, 2); SetMCLabel(LabelE.GelStepCode3, DB2107.Gelater[2].StepCode); SetMCLabel(LabelE.GelStepName3, GelStepConvert(DB2107.Gelater[2].StepCode)); SetMCLabel(LabelE.GelTotalTime3, SecondToTime(DB2107.Gelater[2].TotalTime)); SetMCLabel(LabelE.GelStepTime3, SecondToTime(DB2107.Gelater[2].StepTime)); SetMCLabel(LabelE.GelMode4, DB2107.Gelater[3].Mode, 1); SetMCLabel(LabelE.GelStatus4, DB2107.Gelater[3].Status, 2); SetMCLabel(LabelE.GelStepCode4, DB2107.Gelater[3].StepCode); SetMCLabel(LabelE.GelStepName4, GelStepConvert(DB2107.Gelater[3].StepCode)); SetMCLabel(LabelE.GelTotalTime4, SecondToTime(DB2107.Gelater[3].TotalTime)); SetMCLabel(LabelE.GelStepTime4, SecondToTime(DB2107.Gelater[3].StepTime)); SetMCLabel(LabelE.GelMode5, DB2107.Gelater[4].Mode, 1); SetMCLabel(LabelE.GelStatus5, DB2107.Gelater[4].Status, 2); SetMCLabel(LabelE.GelStepCode5, DB2107.Gelater[4].StepCode); SetMCLabel(LabelE.GelStepName5, GelStepConvert(DB2107.Gelater[4].StepCode)); SetMCLabel(LabelE.GelTotalTime5, SecondToTime(DB2107.Gelater[4].TotalTime)); SetMCLabel(LabelE.GelStepTime5, SecondToTime(DB2107.Gelater[4].StepTime)); SetMCLabel(LabelE.GelMode6, DB2107.Gelater[5].Mode, 1); SetMCLabel(LabelE.GelStatus6, DB2107.Gelater[5].Status, 2); SetMCLabel(LabelE.GelStepCode6, DB2107.Gelater[5].StepCode); SetMCLabel(LabelE.GelStepName6, GelStepConvert(DB2107.Gelater[5].StepCode)); SetMCLabel(LabelE.GelTotalTime6, SecondToTime(DB2107.Gelater[5].TotalTime)); SetMCLabel(LabelE.GelStepTime6, SecondToTime(DB2107.Gelater[5].StepTime)); SetMCLabel(LabelE.WetMode7, DB2107.Weter[6].Mode, 1); SetMCLabel(LabelE.WetStatus7, DB2107.Weter[6].Status, 2); SetMCLabel(LabelE.WetStepCode7, DB2107.Weter[6].StepCode); SetMCLabel(LabelE.WetStepName7, WetStepConvert(DB2107.Weter[6].StepCode)); SetMCLabel(LabelE.WetTotalTime7, SecondToTime(DB2107.Weter[6].TotalTime)); SetMCLabel(LabelE.WetStepTime7, SecondToTime(DB2107.Weter[6].StepTime)); SetMCLabel(LabelE.WetMode8, DB2107.Weter[7].Mode, 1); SetMCLabel(LabelE.WetStatus8, DB2107.Weter[7].Status, 2); SetMCLabel(LabelE.WetStepCode8, DB2107.Weter[7].StepCode); SetMCLabel(LabelE.WetStepName8, WetStepConvert(DB2107.Weter[7].StepCode)); SetMCLabel(LabelE.WetTotalTime8, SecondToTime(DB2107.Weter[7].TotalTime)); SetMCLabel(LabelE.WetStepTime8, SecondToTime(DB2107.Weter[7].StepTime)); SetMCLabel(LabelE.WetMode1, DB2107.Weter[0].Mode, 1); SetMCLabel(LabelE.WetStatus1, DB2107.Weter[0].Status, 2); SetMCLabel(LabelE.WetStepCode1, DB2107.Weter[0].StepCode); SetMCLabel(LabelE.WetStepName1, WetStepConvert(DB2107.Weter[0].StepCode)); SetMCLabel(LabelE.WetTotalTime1, SecondToTime(DB2107.Weter[0].TotalTime)); SetMCLabel(LabelE.WetStepTime1, SecondToTime(DB2107.Weter[0].StepTime)); SetMCLabel(LabelE.WetMode2, DB2107.Weter[1].Mode, 1); SetMCLabel(LabelE.WetStatus2, DB2107.Weter[1].Status, 2); SetMCLabel(LabelE.WetStepCode2, DB2107.Weter[1].StepCode); SetMCLabel(LabelE.WetStepName2, WetStepConvert(DB2107.Weter[1].StepCode)); SetMCLabel(LabelE.WetTotalTime2, SecondToTime(DB2107.Weter[1].TotalTime)); SetMCLabel(LabelE.WetStepTime2, SecondToTime(DB2107.Weter[1].StepTime)); SetMCLabel(LabelE.WetMode3, DB2107.Weter[2].Mode, 1); SetMCLabel(LabelE.WetStatus3, DB2107.Weter[2].Status, 2); SetMCLabel(LabelE.WetStepCode3, DB2107.Weter[2].StepCode); SetMCLabel(LabelE.WetStepName3, WetStepConvert(DB2107.Weter[2].StepCode)); SetMCLabel(LabelE.WetTotalTime3, SecondToTime(DB2107.Weter[2].TotalTime)); SetMCLabel(LabelE.WetStepTime3, SecondToTime(DB2107.Weter[2].StepTime)); SetMCLabel(LabelE.WetMode4, DB2107.Weter[3].Mode, 1); SetMCLabel(LabelE.WetStatus4, DB2107.Weter[3].Status, 2); SetMCLabel(LabelE.WetStepCode4, DB2107.Weter[3].StepCode); SetMCLabel(LabelE.WetStepName4, WetStepConvert(DB2107.Weter[3].StepCode)); SetMCLabel(LabelE.WetTotalTime4, SecondToTime(DB2107.Weter[3].TotalTime)); SetMCLabel(LabelE.WetStepTime4, SecondToTime(DB2107.Weter[3].StepTime)); SetMCLabel(LabelE.WetMode5, DB2107.Weter[4].Mode, 1); SetMCLabel(LabelE.WetStatus5, DB2107.Weter[4].Status, 2); SetMCLabel(LabelE.WetStepCode5, DB2107.Weter[4].StepCode); SetMCLabel(LabelE.WetStepName5, WetStepConvert(DB2107.Weter[4].StepCode)); SetMCLabel(LabelE.WetTotalTime5, SecondToTime(DB2107.Weter[4].TotalTime)); SetMCLabel(LabelE.WetStepTime5, SecondToTime(DB2107.Weter[4].StepTime)); SetMCLabel(LabelE.WetMode6, DB2107.Weter[5].Mode, 1); SetMCLabel(LabelE.WetStatus6, DB2107.Weter[5].Status, 2); SetMCLabel(LabelE.WetStepCode6, DB2107.Weter[5].StepCode); SetMCLabel(LabelE.WetStepName6, WetStepConvert(DB2107.Weter[5].StepCode)); SetMCLabel(LabelE.WetTotalTime6, SecondToTime(DB2107.Weter[5].TotalTime)); SetMCLabel(LabelE.WetStepTime6, SecondToTime(DB2107.Weter[5].StepTime)); SetMCLabel(LabelE.DryBatch1, DB2107.Dryer[0].Batch); SetMCLabel(LabelE.DryBatch2, DB2107.Dryer[1].Batch); SetMCLabel(LabelE.DryBatch3, DB2107.Dryer[2].Batch); SetMCLabel(LabelE.DryBatch4, DB2107.Dryer[3].Batch); SetMCLabel(LabelE.WetBatch1, DB2107.Weter[0].Batch); SetMCLabel(LabelE.WetBatch2, DB2107.Weter[1].Batch); SetMCLabel(LabelE.WetBatch3, DB2107.Weter[2].Batch); SetMCLabel(LabelE.WetBatch4, DB2107.Weter[3].Batch); SetMCLabel(LabelE.WetBatch5, DB2107.Weter[4].Batch); SetMCLabel(LabelE.WetBatch6, DB2107.Weter[5].Batch); SetMCLabel(LabelE.WetBatch7, DB2107.Weter[6].Batch); SetMCLabel(LabelE.WetBatch8, DB2107.Weter[7].Batch); SetMCLabel(LabelE.GelBatch1, DB2107.Gelater[0].Batch); SetMCLabel(LabelE.GelBatch2, DB2107.Gelater[1].Batch); SetMCLabel(LabelE.GelBatch3, DB2107.Gelater[2].Batch); SetMCLabel(LabelE.GelBatch4, DB2107.Gelater[3].Batch); SetMCLabel(LabelE.GelBatch5, DB2107.Gelater[4].Batch); SetMCLabel(LabelE.GelBatch6, DB2107.Gelater[5].Batch); SetMCLabel(LabelE.GelBatch7, DB2107.Gelater[6].Batch); 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 图像控件交互 /// /// 看门狗 /// /// /// public void SetStateButton(StateButton obj, bool set) { if (set == true) { obj.Status = StateButton.Statuses.sssRun; } else { obj.Status = StateButton.Statuses.sssStop; } } /// /// 停止状态 /// /// /// public void SetSystemStateShow(SystemStateShow obj, bool set) { if (set == true) { obj.Status = SystemStateShow.Statuses.sssRun; } else { obj.Status = SystemStateShow.Statuses.sssStop; } } /// /// 指示灯 /// /// /// /// public void SetSwitchLight(SwitchLight obj, bool set, bool alarm) { obj.BackColor = Color.Gray; if (set == true && alarm == false) { obj.Status = SwitchLight.Statuses.ylMove; } else if (alarm == true) { obj.Status = SwitchLight.Statuses.ylAlarm; } else { obj.Status = SwitchLight.Statuses.ylNormal; } } /// /// 阀门 /// /// /// /// public void SetLjSwith(LjSwith obj, bool set, bool alarm) { if (set == true && alarm == false) { obj.Set = true; obj.Alarm = false; } else if (alarm == true) { obj.Set = false; obj.Alarm = true; } else { obj.Set = false; obj.Alarm = false; } } /// /// 螺旋给料器R /// /// /// public void SetRSCREWBIG(RSCREWBIG obj, bool set) { if (set == true) { obj.Status = RSCREWBIG.Statuses.ylMove; } else { obj.Status = RSCREWBIG.Statuses.ylNormal; } } /// /// 螺旋给料器L /// /// /// public void SetLSCREWBIG(LSCREWBIG obj, bool set) { if (set == true) { obj.Status = LSCREWBIG.Statuses.ylMove; } else { obj.Status = LSCREWBIG.Statuses.ylNormal; } } /// /// 脚座阀 /// /// /// public void SetJzf(Jzf obj, bool set) { if (set == true) { obj.Status = Jzf.Statuses.TurnOn; } else { obj.Status = Jzf.Statuses.TurnOff; } } /// /// 文本标签 /// /// /// public void SetMCLabel(MCLabel obj, object set) { obj.Text = Convert.ToString(set); } public void SetMCLabel(MCLabel obj, object set, Color color) { obj.Text = Convert.ToString(set); obj.ForeColor = color; } public void SetMCLabel(MCLabel obj, bool state, int flag) { if (flag == 1) { obj.Text = state ? "自动" : "手动"; } else if (flag == 2) { obj.Text = state ? "启动" : "停止"; } obj.ForeColor = state ? Color.Green : Color.Yellow; } /// /// 三通 /// /// /// /// /// /// public void SetThreeWayValve(ThreeWayValve obj, bool alarmr, bool setr, bool alarml, bool setl) { obj.ZLTValue = setr; obj.ZLDValue = setl; obj.ALMTValue = alarmr; obj.ALMDValue = alarml; } /// /// 风扇电机 /// /// /// public void SetFan(Fan obj, bool set) { if (set == true) { obj.Status = Fan.Statuses.zsTurnOn; } else { obj.Status = Fan.Statuses.zsTurnOff; } } /// /// 称量柜 /// /// /// public void SetControlCabinet(ControlCabinet obj, bool set) { if (set == true) { obj.Status = ControlCabinet.Statuses.TurnOn; } else { obj.Status = ControlCabinet.Statuses.TurnOff; } } /// /// 胡工报警灯 /// /// /// public void SetHslLanternAlarm(HslLanternAlarm lanternAlarm, RGVEntity rGV) { lanternAlarm.IsAlarm = false; if (rGV.Error) { lanternAlarm.NormalColor = Color.Red; } else { if (rGV.RequestFeed) { lanternAlarm.NormalColor = Color.Green; } else { lanternAlarm.NormalColor = Color.DarkGray; } } } /// /// 绿色胡工小灯 /// /// /// public void SetHslLanternSimple(HslLanternSimple lanternSimple, bool su) { if (su == true) { lanternSimple.LanternBackground = Color.LimeGreen; } else { lanternSimple.LanternBackground = Color.DarkGray; } } /// /// 紫色胡工小灯 /// /// /// public void SetHslLanternSimpleRequest(HslLanternSimple lanternSimple, bool su) { if (su == true) { lanternSimple.LanternBackground = Color.SlateBlue; } else { lanternSimple.LanternBackground = Color.DarkGray; } } #endregion } }