diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/AutoControl.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/AutoControl.cs
index 28196b0..420d6cc 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/AutoControl.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/AutoControl.cs
@@ -20,6 +20,7 @@ using System.Diagnostics;
using Mesnac.Action.ChemicalWeighing.InterfaceDocking.DockingEntity;
using Mesnac.Action.ChemicalWeighing.InterfaceDocking;
using Mesnac.Action.ChemicalWeighing.SetValueInfo;
+using System.Security.Cryptography.X509Certificates;
namespace Mesnac.Action.ChemicalWeighing.AutoControl
{
@@ -441,6 +442,21 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
}
+ if (ButtonE.BtnQz == runtime.Sender)
+ {
+ if (MessageBox.Show("确认启动强制?", "启动强制", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.No)
+ {
+ return;
+ }
+
+ var siemensS7Net = PlcConnect.Instance;
+ siemensS7Net.Write($"DB2107.10.2", true);
+
+ MessageBox.Show("已经强制");
+
+ }
+
+
#endregion
#region 维修模式
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/Entity/GelerWeterControlsEntity.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/Entity/GelerWeterControlsEntity.cs
index ca30181..304b9da 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/Entity/GelerWeterControlsEntity.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/Entity/GelerWeterControlsEntity.cs
@@ -72,6 +72,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.Entity
public Button Download { get; set; }
public Button LineStart { get; set; }
public Button LineStop { get; set; }
+
+ public Button BtnQz { get; set; }
public Button GelManualPowder { get; set; }
public Button GelManualColdWater { get; set; }
public Button GelManualHotWater { get; set; }
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/HslControlsEntity.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/HslControlsEntity.cs
index bff4123..4610d8a 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/HslControlsEntity.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/Entity/HslControlsEntity.cs
@@ -40,6 +40,72 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl.Entity
public HslLanternSimple HslLanternSimpleReq2 { get; set; }
public HslLanternSimple HslLanternSimpleReq3 { get; set; }
public HslLanternSimple HslLanternSimpleReq4 { get; set; }
+
+
+
+
+ //湿混机已经加完干混料
+
+ public HslLanternSimple FeededDryM1 { get; set; }
+
+ public HslLanternSimple FeededDryM2 { get; set; }
+ public HslLanternSimple FeededDryM3 { get; set; }
+ public HslLanternSimple FeededDryM4 { get; set; }
+ public HslLanternSimple FeededDryM5 { get; set; }
+ public HslLanternSimple FeededDryM6 { get; set; }
+ public HslLanternSimple FeededDryM7 { get; set; }
+
+ public HslLanternSimple FeededDryM8 { get; set; }
+
+
+ //湿混机已经加完糊化
+
+ public HslLanternSimple FeededGelM1 { get; set; }
+
+ public HslLanternSimple FeededGelM2 { get; set; }
+ public HslLanternSimple FeededGelM3 { get; set; }
+ public HslLanternSimple FeededGelM4 { get; set; }
+ public HslLanternSimple FeededGelM5 { get; set; }
+ public HslLanternSimple FeededGelM6 { get; set; }
+ public HslLanternSimple FeededGelM7 { get; set; }
+
+ public HslLanternSimple FeededGelM8 { get; set; }
+
+
+
+ //冷水
+ public HslLanternSimple FeededCWG1 { get; set; }
+ public HslLanternSimple FeededCWG2 { get; set; }
+ public HslLanternSimple FeededCWG3 { get; set; }
+ public HslLanternSimple FeededCWG4 { get; set; }
+ public HslLanternSimple FeededCWG5 { get; set; }
+ public HslLanternSimple FeededCWG6 { get; set; }
+ public HslLanternSimple FeededCWG7 { get; set; }
+ public HslLanternSimple FeededCWG8 { get; set; }
+
+
+
+
+ public HslLanternSimple FeededHWG1 { get; set; }
+ public HslLanternSimple FeededHWG2 { get; set; }
+ public HslLanternSimple FeededHWG3 { get; set; }
+ public HslLanternSimple FeededHWG4 { get; set; }
+ public HslLanternSimple FeededHWG5 { get; set; }
+ public HslLanternSimple FeededHWG6 { get; set; }
+ public HslLanternSimple FeededHWG7 { get; set; }
+ public HslLanternSimple FeededHWG8 { get; set; }
+
+
+ public HslLanternSimple FeededPDG1 { get; set; }
+ public HslLanternSimple FeededPDG2 { get; set; }
+ public HslLanternSimple FeededPDG3 { get; set; }
+ public HslLanternSimple FeededPDG4 { get; set; }
+ public HslLanternSimple FeededPDG5 { get; set; }
+ public HslLanternSimple FeededPDG6 { get; set; }
+ public HslLanternSimple FeededPDG7 { get; set; }
+ public HslLanternSimple FeededPDG8 { get; set; }
+
+
}
public class HslSwitchEntity
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs
index dd3c701..c66db9e 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/MainDetailControl/MainDetailControlAction.cs
@@ -338,6 +338,65 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
ControlsHelper.SetHslLanternSimple(HslLanternSimpleE.HslLanternSimple8, mixSingle[7]);
+ //湿混机 加完料
+
+ DB2114Helper dB2114 = new DB2114Helper();
+ var dry = dB2114.Dry;
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededDryM1, dry.M1);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededDryM2, dry.M2);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededDryM3, dry.M3);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededDryM4, dry.M4);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededDryM5, dry.M5);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededDryM6, dry.M6);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededDryM7, dry.M7);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededDryM8, dry.M8);
+
+ dry = dB2114.Gel;
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededGelM1, dry.M1);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededGelM2, dry.M2);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededGelM3, dry.M3);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededGelM4, dry.M4);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededGelM5, dry.M5);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededGelM6, dry.M6);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededGelM7, dry.M7);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededGelM8, dry.M8);
+
+
+ var ch = dB2114.CW;
+
+ //FeededCWG1
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededCWG1, ch.G1);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededCWG2, ch.G2);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededCWG3, ch.G3);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededCWG4, ch.G4);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededCWG5, ch.G5);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededCWG6, ch.G6);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededCWG7, ch.G7);
+ ControlsHelper.SetHslLanternFeed(HslLanternSimpleE.FeededCWG8, ch.G8);
+
+ //SetHslLanternFeedHw
+ ch = dB2114.HW;
+ ControlsHelper.SetHslLanternFeedHw(HslLanternSimpleE.FeededHWG1, ch.G1);
+ ControlsHelper.SetHslLanternFeedHw(HslLanternSimpleE.FeededHWG2, ch.G2);
+ ControlsHelper.SetHslLanternFeedHw(HslLanternSimpleE.FeededHWG3, ch.G3);
+ ControlsHelper.SetHslLanternFeedHw(HslLanternSimpleE.FeededHWG4, ch.G4);
+ ControlsHelper.SetHslLanternFeedHw(HslLanternSimpleE.FeededHWG5, ch.G5);
+ ControlsHelper.SetHslLanternFeedHw(HslLanternSimpleE.FeededHWG6, ch.G6);
+ ControlsHelper.SetHslLanternFeedHw(HslLanternSimpleE.FeededHWG7, ch.G7);
+ ControlsHelper.SetHslLanternFeedHw(HslLanternSimpleE.FeededHWG8, ch.G8);
+
+ ch = dB2114.PD;
+
+ ControlsHelper.SetHslLanternFeedPd(HslLanternSimpleE.FeededPDG1, ch.G1);
+ ControlsHelper.SetHslLanternFeedPd(HslLanternSimpleE.FeededPDG2, ch.G2);
+ ControlsHelper.SetHslLanternFeedPd(HslLanternSimpleE.FeededPDG3, ch.G3);
+ ControlsHelper.SetHslLanternFeedPd(HslLanternSimpleE.FeededPDG4, ch.G4);
+ ControlsHelper.SetHslLanternFeedPd(HslLanternSimpleE.FeededPDG5, ch.G5);
+ ControlsHelper.SetHslLanternFeedPd(HslLanternSimpleE.FeededPDG6, ch.G6);
+ ControlsHelper.SetHslLanternFeedPd(HslLanternSimpleE.FeededPDG7, ch.G7);
+ ControlsHelper.SetHslLanternFeedPd(HslLanternSimpleE.FeededPDG8, ch.G8);
+
+
ControlsHelper.SetHslLanternSimple(HslLanternSimpleE.HslLanternSimpleM1, MinAnPlc.ReqD1);
ControlsHelper.SetHslLanternSimple(HslLanternSimpleE.HslLanternSimpleM2, MinAnPlc.ReqD2);
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs
index 1f09c27..b7d7bc0 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Test/TestAction.cs
@@ -4,27 +4,13 @@ using System.Data;
using System.Diagnostics;
using System.Drawing;
using System.Linq;
-using System.Text;
-using System.Threading;
-using System.Windows.Forms;
using DataBlockHelper.DBHelpers;
-using DevExpress.XtraEditors.Filtering.Templates;
-
-using ICSharpCode.Core;
-using log4net;
+using DevExpress.Utils.Extensions;
using Mesnac.Action.Base;
-using Mesnac.Action.ChemicalWeighing.InterfaceDocking;
-using Mesnac.Action.ChemicalWeighing.LjReport.OpenDoor;
-using Mesnac.Action.ChemicalWeighing.MinAn;
-using Mesnac.Action.ChemicalWeighing.Report;
-using Mesnac.Action.ChemicalWeighing.RgvPlc;
using Mesnac.Action.ChemicalWeighing.SetValueInfo;
-using Mesnac.Basic;
-using Mesnac.Codd.Session;
-using Mesnac.Controls.Base;
using Mesnac.Controls.ChemicalWeighing;
using Mesnac.Controls.Default;
@@ -68,8 +54,12 @@ namespace Mesnac.Action.ChemicalWeighing.Test
private void MCButton_Click(object sender, EventArgs e)
{
- FormEnqPar formEnqPar = new FormEnqPar();
- formEnqPar.ShowDialog();
+ DB2114Helper dB = new DB2114Helper();
+ var a = dB.Dry;
+ var b = dB.Gel;
+ var c = dB.CW;
+ var d = dB.HW;
+ var e1 = dB.PD;
}
}
}
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/ControlsImprot.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/ControlsImprot.cs
index 4f3a2f4..6f141ff 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/ControlsImprot.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Util/ControlsImprot.cs
@@ -288,6 +288,47 @@ namespace Mesnac.Action.ChemicalWeighing.Util
}
}
+
+ public static void SetHslLanternFeed(HslLanternSimple lanternSimple, bool su)
+ {
+
+ if (su == true)
+ {
+ lanternSimple.LanternBackground = Color.LimeGreen;
+ }
+ else
+ {
+ lanternSimple.LanternBackground = Color.Transparent;
+ }
+ }
+
+ public static void SetHslLanternFeedHw(HslLanternSimple lanternSimple, bool su)
+ {
+
+ if (su == true)
+ {
+ lanternSimple.LanternBackground = Color.Yellow;
+ }
+ else
+ {
+ lanternSimple.LanternBackground = Color.Transparent;
+ }
+ }
+
+
+ public static void SetHslLanternFeedPd(HslLanternSimple lanternSimple, bool su)
+ {
+
+ if (su == true)
+ {
+ lanternSimple.LanternBackground = Color.Blue;
+ }
+ else
+ {
+ lanternSimple.LanternBackground = Color.Transparent;
+ }
+ }
+
///
/// 紫色胡工小灯
///
diff --git a/DataBlockHelper/DBHelpers/DB2114Helper.cs b/DataBlockHelper/DBHelpers/DB2114Helper.cs
new file mode 100644
index 0000000..268ee99
--- /dev/null
+++ b/DataBlockHelper/DBHelpers/DB2114Helper.cs
@@ -0,0 +1,212 @@
+using HslCommunication;
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace DataBlockHelper.DBHelpers
+{
+ public class DB2114Helper: DBHelper
+ {
+ public DB2114Helper()
+ {
+ OperateResult db = PlcConnect.Instance.Read("DB2114.0.0", 9);
+ bytes = db.Content;
+ }
+
+ public Rdy Rdy
+ {
+ get
+ {
+ byte[] content = bytes.Skip(0).Take(2).ToArray();
+ var trans = PlcConnect.Instance.ByteTransform;
+ Rdy rdy = new Rdy();
+
+ return rdy;
+ }
+ }
+
+ ///
+ /// 糊化机已经加完冷水
+ ///
+
+ public FeedCW CW
+ {
+ get
+ {
+ FeedCW feedCW = new FeedCW();
+ byte[] content = bytes.Skip(5).Take(2).ToArray();
+ var a = content[0];
+ feedCW.G1=a.GetBit(4);
+ feedCW.G2 = a.GetBit(5);
+ feedCW.G3 = a.GetBit(6);
+ feedCW.G4 = a.GetBit(7);
+ var b = content[1];
+ feedCW.G5 = b.GetBit(0);
+ feedCW.G6 = b.GetBit(1);
+ feedCW.G7 = b.GetBit(2);
+ feedCW.G8 = b.GetBit(3);
+ return feedCW;
+ }
+ }
+
+
+ ///
+ /// 糊化机已经加完热水
+ ///
+
+
+ public FeedCW HW
+ {
+ get
+ {
+ FeedCW feedHW = new FeedCW();
+ byte[] content = bytes.Skip(6).Take(2).ToArray();
+ var a = content[0];
+ feedHW.G1 = a.GetBit(4);
+ feedHW.G2 = a.GetBit(5);
+ feedHW.G3 = a.GetBit(6);
+ feedHW.G4 = a.GetBit(7);
+ var b = content[1];
+ feedHW.G5 = b.GetBit(0);
+ feedHW.G6 = b.GetBit(1);
+ feedHW.G7 = b.GetBit(2);
+ feedHW.G8 = b.GetBit(3);
+ return feedHW;
+ }
+ }
+
+
+
+ ///
+ /// 湿混机已经加完干混料
+ ///
+ public FeedDry Dry
+ {
+ get
+ {
+ FeedDry dry=new FeedDry();
+ byte[] content = bytes.Skip(3).Take(2).ToArray();
+
+ var a = content[0];
+ dry.M1 = a.GetBit(4);
+ dry.M2 = a.GetBit(5);
+ dry.M3 = a.GetBit(6);
+ dry.M4 = a.GetBit(7);
+ var b = content[1];
+ dry.M5 = b.GetBit(0);
+ dry.M6 = b.GetBit(1);
+ dry.M7 = b.GetBit(2);
+ dry.M8 = b.GetBit(3);
+ return dry;
+
+ }
+ }
+ ///
+ /// 湿混机已经加完糊化料
+ ///
+
+ public FeedDry Gel
+ {
+ get
+ {
+ FeedDry dry = new FeedDry();
+ byte[] content = bytes.Skip(4).Take(2).ToArray();
+
+ var a = content[0];
+ dry.M1 = a.GetBit(4);
+ dry.M2 = a.GetBit(5);
+ dry.M3 = a.GetBit(6);
+ dry.M4 = a.GetBit(7);
+ var b = content[1];
+ dry.M5 = b.GetBit(0);
+ dry.M6 = b.GetBit(1);
+ dry.M7 = b.GetBit(2);
+ dry.M8 = b.GetBit(3);
+ return dry;
+
+ }
+ }
+
+
+ public FeedCW PD
+ {
+ get
+ {
+ FeedCW cW = new FeedCW();
+ byte[] content = bytes.Skip(7).Take(2).ToArray();
+
+
+ var a = content[0];
+ cW.G1 = a.GetBit(4);
+ cW.G2 = a.GetBit(5);
+ cW.G3 = a.GetBit(6);
+ cW.G4 = a.GetBit(7);
+ var b = content[1];
+ cW.G5 = b.GetBit(0);
+ cW.G6 = b.GetBit(1);
+ cW.G7 = b.GetBit(2);
+ cW.G8 = b.GetBit(3);
+
+ return cW;
+
+ }
+ }
+ }
+
+
+ public class Rdy
+ {
+ public bool B1 { get; set; }
+ public bool B2 { get; set; }
+ public bool B3 { get; set; }
+ public bool B4 { get; set; }
+ public bool B5 { get; set; }
+ public bool B6 { get; set; }
+ public bool B7 { get; set; }
+ public bool B8 { get; set; }
+ public bool B9 { get; set; }
+ public bool B10 { get; set; }
+ public bool B11 { get; set; }
+ public bool B12 { get; set; }
+
+ }
+
+
+
+
+ ///
+ ///
+ ///
+ public class FeedCW
+ {
+ public bool G1 { get; set; }
+ public bool G2 { get; set; }
+ public bool G3 { get; set; }
+ public bool G4 { get; set; }
+ public bool G5 { get; set; }
+ public bool G6 { get; set; }
+ public bool G7 { get; set; }
+ public bool G8 { get; set; }
+
+ }
+
+
+
+ public class FeedDry
+ {
+ public bool M1 { get; set;}
+ public bool M2 { get; set; }
+ public bool M3 { get; set; }
+ public bool M4 { get; set; }
+ public bool M5 { get; set; }
+ public bool M6 { get; set; }
+ public bool M7 { get; set; }
+ public bool M8 { get; set; }
+
+ }
+
+
+}
diff --git a/DataBlockHelper/DataBlockHelper.csproj b/DataBlockHelper/DataBlockHelper.csproj
index 8071e18..69a6ff5 100644
--- a/DataBlockHelper/DataBlockHelper.csproj
+++ b/DataBlockHelper/DataBlockHelper.csproj
@@ -63,6 +63,7 @@
+
diff --git a/Main/MCEdit/Data/MCProject/nodeForm/AutoControlC.xml b/Main/MCEdit/Data/MCProject/nodeForm/AutoControlC.xml
index 0066863..5a454d0 100644
--- a/Main/MCEdit/Data/MCProject/nodeForm/AutoControlC.xml
+++ b/Main/MCEdit/Data/MCProject/nodeForm/AutoControlC.xml
@@ -1,5 +1,30 @@