change - 三通阀逻辑控制完善

master
wangsr 1 year ago
parent 927685d010
commit cfa80ec7f3

@ -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)

@ -638,6 +638,7 @@
<Content Include="Resources\swith_default.png" />
<EmbeddedResource Include="Resources\p0.png" />
<EmbeddedResource Include="Resources\p1.png" />
<EmbeddedResource Include="Resources\ThreeWayValveHVError.png" />
<Content Include="Resources\xie.png" />
<Content Include="Resources\拆包机.png" />
<EmbeddedResource Include="Resources\loudou.png" />

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

@ -10,6 +10,7 @@ namespace Mesnac.Controls.ChemicalWeighing
/// </summary>
public partial class ThreeWayValve : ChemicalWeighingControl
{
private object lockobj = new object();
public ThreeWayValve()
{
InitializeComponent();
@ -43,7 +44,7 @@ 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";
@ -53,11 +54,11 @@ namespace Mesnac.Controls.ChemicalWeighing
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();
}
}
}
}

@ -420,7 +420,7 @@
<Propertys>
<Property Name="ZLTName" Caption="斜通到位" Group="控制阀门" ControlPropertyName="ZLTValue"/>
<Property Name="ZLDName" Caption="直通到位" Group="控制阀门" ControlPropertyName="ZLDValue"/>
<Property Name="ALMTName" Caption="通报警" Group="控制阀门" ControlPropertyName="ALMTValue"/>
<Property Name="ALMTName" Caption="通报警" Group="控制阀门" ControlPropertyName="ALMTValue"/>
<Property Name="ALMDName" Caption="直通报警" Group="控制阀门" ControlPropertyName="ALMDValue"/>
</Propertys>
</Component>

@ -4,7 +4,7 @@
<Main>
<Brand value="Siemens" />
<Model value="S7" />
<ReadHz value="1000" />
<ReadHz value="5000" />
<UnitLen value="8" />
<Connection mode="Net">
<IP value="192.168.0.1" />

File diff suppressed because it is too large Load Diff

@ -4022,7 +4022,7 @@
<Property name="RefreshDataActionList">
<Binary>AAEAAAD/////AQAAAAAAAAAMAgAAAEtNZXNuYWMuQ29udHJvbHMuQmFzZSwgVmVyc2lvbj0xLjAuMC4wLCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPW51bGwEAQAAAJMBU3lzdGVtLkNvbGxlY3Rpb25zLkdlbmVyaWMuTGlzdGAxW1tNZXNuYWMuQ29udHJvbHMuQmFzZS5EZXNpZ25BY3Rpb24sIE1lc25hYy5Db250cm9scy5CYXNlLCBWZXJzaW9uPTEuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49bnVsbF1dAwAAAAZfaXRlbXMFX3NpemUIX3ZlcnNpb24EAAAjTWVzbmFjLkNvbnRyb2xzLkJhc2UuRGVzaWduQWN0aW9uW10CAAAACAgJAwAAAAAAAAAAAAAABwMAAAAAAQAAAAAAAAAEIU1lc25hYy5Db250cm9scy5CYXNlLkRlc2lnbkFjdGlvbgIAAAAL</Binary>
</Property>
<Property name="BHaveAction">False</Property>
<Property name="BHaveAction">True</Property>
<Property name="MCPurview">False</Property>
<Property name="AllowOriginalSizeShow">False</Property>
<Property name="BackColor">Control</Property>

@ -460,9 +460,7 @@
<Content Include="Data\MCProject\nodeDataSource.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Data\MCProject\nodeDevice.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Data\MCProject\nodeDevice.xml" />
<Content Include="Data\MCProject\nodeForm\FrmAlarmInfo.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>

Loading…
Cancel
Save