添加一个标识 来测试plc 得通讯能力

dep_nodyang
nodyang 1 year ago
parent f30896869a
commit d531a2699d

@ -851,6 +851,8 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
bool DV2PCP13_AlarmR;
#endregion
private MCLabel MCWatchDog;
public void Run(RuntimeParameter runtime)
{
@ -1067,6 +1069,9 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
#endregion
Controls = GetAllControls();
MCWatchDog =Controls.FirstOrDefault(x=>x.Name=="MCWatchDog") as MCLabel;
SetControl();
@ -1680,7 +1685,12 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
/// </summary>
private void NewThreadDb2107()
{
WatchDog_Set = DB2107.NormalStatus.WatchDog >= 1 ? true : false;
var normalStatusWatchDog = DB2107.NormalStatus.WatchDog;
WatchDog_Set = normalStatusWatchDog >= 1 ? true : false;
MCWatchDog.MCValue = normalStatusWatchDog.ToString();
EMStop_Set = DB2107.NormalStatus.EMStop;
Vessel_1_HighLevel_Set = DB2107.Weight.Vessel_1.HighLevel;

@ -1,6 +1,26 @@
<Object type="Mesnac.Gui.Common.FrmRunTemplate, Mesnac.Gui.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MainDetail" children="Controls">
<Object type="System.Windows.Forms.Panel, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" name="Panel1" children="Controls">
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCWatchDog" 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">Modify</Property>
<Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property>
<Property name="Text">MCLabel149</Property>
<Property name="ForeColor">Red</Property>
<Property name="Location">23, 115</Property>
<Property name="Name">MCWatchDog</Property>
<Property name="Size">65, 12</Property>
</Object>
<Object type="Mesnac.Controls.Default.MCLabel, Mesnac.Controls.Default, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" name="MCLabel150" children="Controls">
<Property name="Format" />
<Property name="TextName" />

Loading…
Cancel
Save