diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ValveInitStateMonitor/ValveInitStateMonitor.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ValveInitStateMonitor/ValveInitStateMonitor.cs
index 1c5f69e..7969b20 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ValveInitStateMonitor/ValveInitStateMonitor.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/EngineeringDebuggingMode/ValveInitStateMonitor/ValveInitStateMonitor.cs
@@ -70,6 +70,7 @@ namespace Mesnac.Action.ChemicalWeighing.EngineeringDebuggingMode.NewFolder1
AlarmPosition_D.Text = PlcCommunicationUtil.GetDataToString(dmName, "_AlarmPosition");
Alarm_D.Text = PlcCommunicationUtil.GetDataToString(dmName, "_Alarm");
+
}
private void Refresh_Click(object sender, EventArgs e)
diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Mesnac.Controls.ChemicalWeighing.csproj b/Controls/Mesnac.Controls.ChemicalWeighing/Mesnac.Controls.ChemicalWeighing.csproj
index d31f5dc..0751dbb 100644
--- a/Controls/Mesnac.Controls.ChemicalWeighing/Mesnac.Controls.ChemicalWeighing.csproj
+++ b/Controls/Mesnac.Controls.ChemicalWeighing/Mesnac.Controls.ChemicalWeighing.csproj
@@ -638,6 +638,7 @@
+
diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveHVError.png b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveHVError.png
new file mode 100644
index 0000000..78b93c3
Binary files /dev/null and b/Controls/Mesnac.Controls.ChemicalWeighing/Resources/ThreeWayValveHVError.png differ
diff --git a/Controls/Mesnac.Controls.ChemicalWeighing/ThreeWayValve.cs b/Controls/Mesnac.Controls.ChemicalWeighing/ThreeWayValve.cs
index ee54ed0..ae68c84 100644
--- a/Controls/Mesnac.Controls.ChemicalWeighing/ThreeWayValve.cs
+++ b/Controls/Mesnac.Controls.ChemicalWeighing/ThreeWayValve.cs
@@ -10,6 +10,7 @@ namespace Mesnac.Controls.ChemicalWeighing
///
public partial class ThreeWayValve : ChemicalWeighingControl
{
+ private object lockobj = new object();
public ThreeWayValve()
{
InitializeComponent();
@@ -43,20 +44,20 @@ namespace Mesnac.Controls.ChemicalWeighing
sImages[4] = "Mesnac.Controls.ChemicalWeighing.Resources.ThreeWayValveVError.png";
//都报警
sImages[5] = "Mesnac.Controls.ChemicalWeighing.Resources.ThreeWayValveHVError.png";
-
+ //三个都通
sImages[6] = "Mesnac.Controls.ChemicalWeighing.Resources.ThreeWayValveAll.png";
}
-
-
+
+
private void ReloadStream()
{
+
int defaultIndex = 0;
//如果出现报警 就去判断是直还是斜
-
//直报警 斜报警
if (_almtValue && _almdValue)
@@ -66,48 +67,38 @@ namespace Mesnac.Controls.ChemicalWeighing
else
{
//如果直的报警
- if (_almdValue)
+ if (_almdValue && _almtValue == false)
{
defaultIndex = 3;
}
-
//如果斜的报警
- if (_almtValue)
+ if (_almtValue && _almdValue == false)
{
defaultIndex = 4;
}
-
}
//如果不是故障
if (_almtValue == false && _almdValue == false)
{
-
-
- if (_zltValue && _zldValue)
+ if (_zltValue && _zldValue == false)
{
defaultIndex = 2;
}
-
if (_zltValue == false && _zldValue)
{
defaultIndex = 1;
}
-
-
//如果都是假 就变成默认值 可能没有数据
if (_zltValue == false && _zldValue == false)
{
defaultIndex = 0;
}
-
//如果都是真 就是双通
if (_zltValue && _zldValue)
{
defaultIndex = 6;
}
-
-
}
@@ -127,8 +118,11 @@ namespace Mesnac.Controls.ChemicalWeighing
private void R()
{
- ReloadStream();
- Reload();
+ lock (lockobj)
+ {
+ ReloadStream();
+ Reload();
+ }
}
@@ -145,8 +139,10 @@ namespace Mesnac.Controls.ChemicalWeighing
get => _zltValue;
set
{
- _zltValue = value;
- R();
+ if(_zltValue != value) {
+ _zltValue = value;
+ R();
+ }
}
}
@@ -163,8 +159,10 @@ namespace Mesnac.Controls.ChemicalWeighing
get => _zldValue;
set
{
- _zldValue = value;
- R();
+ if( _zldValue != value ) {
+ _zldValue = value;
+ R();
+ }
}
}
@@ -181,8 +179,11 @@ namespace Mesnac.Controls.ChemicalWeighing
get => _almtValue;
set
{
- _almtValue = value;
- R();
+ if( _almtValue != value ) {
+ _almtValue = value;
+ R();
+ }
+
}
}
@@ -199,8 +200,10 @@ namespace Mesnac.Controls.ChemicalWeighing
get => _almdValue;
set
{
- _almdValue = value;
- R();
+ if( _almdValue != value ) {
+ _almdValue = value;
+ R();
+ }
}
}
}
diff --git a/Main/MCEdit/Data/ComponentAction.xml b/Main/MCEdit/Data/ComponentAction.xml
index dc49421..adbed79 100644
--- a/Main/MCEdit/Data/ComponentAction.xml
+++ b/Main/MCEdit/Data/ComponentAction.xml
@@ -420,7 +420,7 @@
-
+
diff --git a/Main/MCEdit/Data/MCProject/nodeDevice.xml b/Main/MCEdit/Data/MCProject/nodeDevice.xml
index 9efa5d2..f5c81cd 100644
--- a/Main/MCEdit/Data/MCProject/nodeDevice.xml
+++ b/Main/MCEdit/Data/MCProject/nodeDevice.xml
@@ -4,7 +4,7 @@
-
+
diff --git a/Main/MCEdit/Data/MCProject/nodeForm/DeviceDetail_1.xml b/Main/MCEdit/Data/MCProject/nodeForm/DeviceDetail_1.xml
index 00379e3..03226cd 100644
--- a/Main/MCEdit/Data/MCProject/nodeForm/DeviceDetail_1.xml
+++ b/Main/MCEdit/Data/MCProject/nodeForm/DeviceDetail_1.xml
@@ -1,10 +1,1690 @@