dep_deliver
杨威 5 months ago
parent ac23f8c609
commit 88f7faacc6

@ -96,6 +96,11 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
#endregion #endregion
MCLabel MCLabel349;
MCLabel MCLabel350;
Color mcCol;
#region 接口Run方法 #region 接口Run方法
public void Run(RuntimeParameter runtime) public void Run(RuntimeParameter runtime)
@ -110,6 +115,9 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
SetAllControls(); SetAllControls();
MCLabel349 = Controls.FirstOrDefault(x => x != null && x.Name == "MCLabel349") as MCLabel;
MCLabel350 = Controls.FirstOrDefault(x => x != null && x.Name == "MCLabel350") as MCLabel;
mcCol = MCLabel349.ForeColor;
//wangsr(); //wangsr();
AllAlarmTable = DBHelp.GetTable(@"SELECT Alarm_ID, Alarm_Block, Alarm_Word, Alarm_Bit, Alarm_Cn_Info, Alarm_Other_Info FROM Pmt_Alarm"); AllAlarmTable = DBHelp.GetTable(@"SELECT Alarm_ID, Alarm_Block, Alarm_Word, Alarm_Bit, Alarm_Cn_Info, Alarm_Other_Info FROM Pmt_Alarm");
@ -121,6 +129,24 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
} }
private void other()
{
var a = PlcConnect.Instance.ReadFloat("DB1.1634").Content;
if (a > 40)
{
MCLabel349.ForeColor=Color.Red;
}
else
{
MCLabel349.ForeColor = mcCol;
}
MCLabel349.Text = a.ToString("0.00") + " mg/m3";
var b = PlcConnect.Instance.ReadFloat("DB1.1654").Content;
MCLabel350.Text = b.ToString("0.00") + " ℃";
}
#endregion #endregion
#region 方法 #region 方法
@ -207,6 +233,8 @@ namespace Mesnac.Action.ChemicalWeighing.LjDeliver
timer.Dispose(); timer.Dispose();
} }
other();
DB1 = new DB1Helper(); DB1 = new DB1Helper();
DB90 = new DB90Helper(); DB90 = new DB90Helper();
DB91 = new DB91Helper(); DB91 = new DB91Helper();

@ -1,6 +1,90 @@
<Object type="Mesnac.Gui.Common.FrmRunTemplate, Mesnac.Gui.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="LjDeliver" children="Controls"> <Object type="Mesnac.Gui.Common.FrmRunTemplate, Mesnac.Gui.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="LjDeliver" children="Controls">
<Object type="System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="Panel15" children="Controls"> <Object type="System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="Panel15" children="Controls">
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel350" children="Controls">
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
<Property name="MCKey" />
<Property name="MCDataSourceID" />
<Property name="IsDbControl">False</Property>
<Property name="InitDataSource" />
<Property name="ActionDataSource" />
<Property name="BindDataSource" />
<Property name="DbOptionType">None</Property>
<Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property>
<Property name="Text">压送罐1</Property>
<Property name="BackColor">Transparent</Property>
<Property name="ForeColor">ButtonHighlight</Property>
<Property name="Location">475, 112</Property>
<Property name="Name">MCLabel350</Property>
<Property name="Size">47, 12</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel349" children="Controls">
<Property name="Format" />
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
<Property name="MCKey" />
<Property name="MCDataSourceID" />
<Property name="IsDbControl">False</Property>
<Property name="InitDataSource" />
<Property name="ActionDataSource" />
<Property name="BindDataSource" />
<Property name="DbOptionType">None</Property>
<Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property>
<Property name="Text">压送罐1</Property>
<Property name="BackColor">Transparent</Property>
<Property name="ForeColor">ButtonHighlight</Property>
<Property name="Location">476, 86</Property>
<Property name="Name">MCLabel349</Property>
<Property name="Size">47, 12</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel348" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
<Property name="MCKey" />
<Property name="MCDataSourceID" />
<Property name="IsDbControl">False</Property>
<Property name="InitDataSource" />
<Property name="ActionDataSource" />
<Property name="BindDataSource" />
<Property name="DbOptionType">None</Property>
<Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property>
<Property name="Text">大仓排气口温度</Property>
<Property name="ForeColor">ButtonHighlight</Property>
<Property name="Location">357, 111</Property>
<Property name="Name">MCLabel348</Property>
<Property name="Size">89, 12</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel347" children="Controls">
<Property name="Format">
</Property>
<Property name="TextName" />
<Property name="NewFillColor">Red</Property>
<Property name="OldFillColor">DarkGray</Property>
<Property name="MCKey" />
<Property name="MCDataSourceID" />
<Property name="IsDbControl">False</Property>
<Property name="InitDataSource" />
<Property name="ActionDataSource" />
<Property name="BindDataSource" />
<Property name="DbOptionType">None</Property>
<Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property>
<Property name="Text">大仓排气口粉尘浓度</Property>
<Property name="ForeColor">ButtonHighlight</Property>
<Property name="Location">357, 86</Property>
<Property name="Name">MCLabel347</Property>
<Property name="Size">113, 12</Property>
</Object>
<Object type="Mesnac.Controls.Default.SpecialLabelBlue, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="SpA1VC11" children="Controls"> <Object type="Mesnac.Controls.Default.SpecialLabelBlue, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="SpA1VC11" children="Controls">
<Property name="Format" /> <Property name="Format" />
<Property name="TextName" /> <Property name="TextName" />

Loading…
Cancel
Save