|
|
|
@ -5,6 +5,8 @@ using log4net;
|
|
|
|
|
using log4net.Config;
|
|
|
|
|
using Mesnac.Action.Base;
|
|
|
|
|
using Mesnac.Action.ChemicalWeighing.FreeDb;
|
|
|
|
|
using Mesnac.Action.ChemicalWeighing.InterfaceDocking;
|
|
|
|
|
using Mesnac.Action.ChemicalWeighing.InterfaceDocking.DockingEntity;
|
|
|
|
|
using Mesnac.Action.ChemicalWeighing.LjMaterial;
|
|
|
|
|
using Mesnac.Basic;
|
|
|
|
|
using Mesnac.Controls.Base;
|
|
|
|
@ -143,8 +145,38 @@ namespace Mesnac.Action.ChemicalWeighing.ManualControl
|
|
|
|
|
timer.Tick += new EventHandler(ReadFromPlc);//添加事件
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void Timer1_Tick()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void Time(int deviceNo,string statu)
|
|
|
|
|
{
|
|
|
|
|
TankIsDischargedSyncEntity tankIsDischargedSyncEntity = new TankIsDischargedSyncEntity()
|
|
|
|
|
{
|
|
|
|
|
reqCode = System.Guid.NewGuid().ToString(),
|
|
|
|
|
reqTime = DateTime.Now,
|
|
|
|
|
deviceNo = deviceNo.ToString(),
|
|
|
|
|
state = statu.ToString(),
|
|
|
|
|
};
|
|
|
|
|
HttpResponse httpResponse = new HttpResponse();
|
|
|
|
|
ManualLogControl("湿混机1下发请求");
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("湿混机1下发请求");
|
|
|
|
|
string returnTest = httpResponse.PostResponse(tankIsDischargedSyncEntity);
|
|
|
|
|
ManualLogControl("湿混机1返回数据 " + returnTest);
|
|
|
|
|
MesnacServiceManager.Instance.LoggingService.Info("湿混机1返回数据" + returnTest);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private void ReadFromPlc(object sender, EventArgs e)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
Timer1_Tick();
|
|
|
|
|
|
|
|
|
|
flag += 1;
|
|
|
|
|
if (flag > 10)
|
|
|
|
|
{
|
|
|
|
|