diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/AutoControl.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/AutoControl.cs
index dfaf896..baba701 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/AutoControl.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/AutoControl.cs
@@ -14,6 +14,11 @@ using static Mesnac.Action.ChemicalWeighing.AutoControl.AutoLogHelper;
using static Mesnac.Action.ChemicalWeighing.AutoControl.PlcAutoWriteHelper;
using Mesnac.Controls.Default;
using Mesnac.Action.ChemicalWeighing.Report;
+using System.Threading;
+using DataBlockHelper;
+using System.Diagnostics;
+using Mesnac.Action.ChemicalWeighing.InterfaceDocking.DockingEntity;
+using Mesnac.Action.ChemicalWeighing.InterfaceDocking;
namespace Mesnac.Action.ChemicalWeighing.AutoControl
{
@@ -406,6 +411,72 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
}
#endregion
+
+ #region 清报警
+
+ if (ButtonE.EliAlarms == runtime.Sender)
+ {
+ PlcConnect.Instance.Write("DB2107.10.7", true);
+ Thread.Sleep(2000);
+ PlcConnect.Instance.Write("DB2107.10.7", false);
+ }
+
+ #endregion
+
+ #region 下传送料请求
+
+ if (ButtonE.DownloadRequest == runtime.Sender)
+ {
+ bool mixok1 = PlcConnect.Instance.ReadBool("DB3000.0.0").Content;
+ Time(1, mixok1 ? 1 : 0);
+ bool mixok2 = PlcConnect.Instance.ReadBool("DB3000.0.1").Content;
+ Time(2, mixok2 ? 1 : 0);
+ bool mixok3 = PlcConnect.Instance.ReadBool("DB3000.0.2").Content;
+ Time(3, mixok3 ? 1 : 0);
+ bool mixok4 = PlcConnect.Instance.ReadBool("DB3000.0.3").Content;
+ Time(4, mixok4 ? 1 : 0);
+ bool mixok5 = PlcConnect.Instance.ReadBool("DB3000.0.4").Content;
+ Time(5, mixok5 ? 1 : 0);
+ bool mixok6 = PlcConnect.Instance.ReadBool("DB3000.0.5").Content;
+ Time(6, mixok6 ? 1 : 0);
+ bool mixok7 = PlcConnect.Instance.ReadBool("DB3000.0.6").Content;
+ Trace.WriteLine("7号信号:" + mixok7);
+ Time(7, mixok7 ? 1 : 0);
+ bool mixok8 = PlcConnect.Instance.ReadBool("DB3000.0.7").Content;
+ Trace.WriteLine("8号信号:" + mixok8);
+ Time(8, mixok8 ? 1 : 0);
+ }
+
+ #endregion
+
+ }
+
+ #region 下发接料请求
+
+ ///
+ /// 下发接料请求
+ ///
+ ///
+ ///
+ private void Time(int deviceNo, int statu)
+ {
+ TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity()
+ {
+ reqCode = System.Guid.NewGuid().ToString(),
+ reqTime = DateTime.Now,
+ deviceNo = deviceNo.ToString(),
+ state = statu.ToString(),
+ };
+ //即使网络不同 也不会影响上位机的使用
+ ThreadPool.QueueUserWorkItem(delegate
+ {
+ HttpResponse httpResponse = new HttpResponse();
+ string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity);
+ MesnacServiceManager.Instance.LoggingService.Info($"湿混机{deviceNo}返回数据" + returnTest);
+ });
}
+
+ #endregion
+
}
}
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/Entity/GelerWeterControlsEntity.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/Entity/GelerWeterControlsEntity.cs
index ceaccdc..6bc7e4d 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/Entity/GelerWeterControlsEntity.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/AutoControl/Entity/GelerWeterControlsEntity.cs
@@ -85,6 +85,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl.Entity
public Button CAOnOff { get; set; }
public Button HBOnOff { get; set; }
public Button CBOnOff { get; set; }
+ public Button EliAlarms { get; set; }
+ public Button DownloadRequest { get; set; }
}
public class MCTextBoxEntity
diff --git a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/LjLogReport.cs b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/LjLogReport.cs
index 7cebcd6..75ee7c7 100644
--- a/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/LjLogReport.cs
+++ b/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/Report/LjLogReport.cs
@@ -29,8 +29,6 @@ namespace Mesnac.Action.ChemicalWeighing.Report
MCButton ManualControl;
MCButton Refresh;
MCButton SelectByText;
- MCButton EliAlarms;
- MCButton DownloadRequest;
//HslSwitch HslSwitch1;
//HslSwitch HslSwitch2;
@@ -62,8 +60,6 @@ namespace Mesnac.Action.ChemicalWeighing.Report
ManualControl = control.FirstOrDefault(x => x != null && x.Name == "ManualControl") as MCButton;
Refresh = control.FirstOrDefault(x => x != null && x.Name == "Refresh") as MCButton;
SelectByText = control.FirstOrDefault(x => x != null && x.Name == "SelectByText") as MCButton;
- EliAlarms = control.FirstOrDefault(x => x != null && x.Name == "EliAlarms") as MCButton;
- DownloadRequest = control.FirstOrDefault(x => x != null && x.Name == "DownloadRequest") as MCButton;
StartDate = control.FirstOrDefault(x => x != null && x.Name == "StartDate") as MCDateTimePicker;
EndDate = control.FirstOrDefault(x => x != null && x.Name == "EndDate") as MCDateTimePicker;
LogForm = this.GetDbMCControlByKey(Mesnac.Basic.DataSourceFactory.MCDbType.Local, "ManualLogGridView1").FirstOrDefault();
@@ -110,8 +106,6 @@ namespace Mesnac.Action.ChemicalWeighing.Report
ManualControl.Click += ManualControlSelect;
Refresh.Click += RefreshAction;
SelectByText.Click += SelectByTextAction;
- EliAlarms.Click += EliAlarmsClick;
- DownloadRequest.Click += RequestDownloadClick;
}
///
@@ -171,9 +165,7 @@ namespace Mesnac.Action.ChemicalWeighing.Report
///
private void EliAlarmsClick(object sender, EventArgs e)
{
- PlcConnect.Instance.Write("DB2107.10.7", true);
- Thread.Sleep(2000);
- PlcConnect.Instance.Write("DB2107.10.7", false);
+
}
///
diff --git a/Main/MCEdit/Data/MCProject/nodeForm/AutoControlC.xml b/Main/MCEdit/Data/MCProject/nodeForm/AutoControlC.xml
index 7ccbdba..5714949 100644
--- a/Main/MCEdit/Data/MCProject/nodeForm/AutoControlC.xml
+++ b/Main/MCEdit/Data/MCProject/nodeForm/AutoControlC.xml
@@ -1,5 +1,55 @@