自动控制添加日志

wangsr
wangsr 1 year ago
parent 25ac863d22
commit 4ef5cc7372

@ -0,0 +1,99 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
// Website: http://www.freesql.net
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using FreeSql.DataAnnotations;
namespace Mesnac.Action.ChemicalWeighing.AutoControl.DB
{
public partial class Auto_Log
{
[Column(IsPrimary = true, IsIdentity = true)]
public int ID { get; set; }
[Column(DbType = "varchar(255)")]
public string ActionKind { get; set; } = string.Empty;
public double? GelCloseHeatTime { get; set; }
public double? GelNagTimeB { get; set; }
public double? GelOutDelayTime { get; set; }
public double? GelPosTimeA { get; set; }
public double? GelPosTimeC { get; set; }
public double? GelSpeedSet { get; set; }
public double? GelWaitTime { get; set; }
public double? GelWaterTime { get; set; }
public int LineNo { get; set; }
public DateTime LogTime { get; set; }
public double? ManualTolerance { get; set; }
public double? ManualWeight { get; set; }
public int? MaterialBin1 { get; set; }
public int? MaterialBin2 { get; set; }
public double? MaterialTolerance1 { get; set; }
public double? MaterialTolerance2 { get; set; }
public double? MaterialWeight1 { get; set; }
public double? MaterialWeight2 { get; set; }
[Column(DbType = "varchar(255)")]
public string UserID { get; set; } = string.Empty;
public double? WetDryWeight { get; set; }
public double? WetMixTime { get; set; }
public double? WetOutDelayTime { get; set; }
}
}

@ -13,6 +13,9 @@ using System.Linq;
using System.Windows.Forms; using System.Windows.Forms;
using Button = System.Windows.Forms.Button; using Button = System.Windows.Forms.Button;
using Mesnac.Action.ChemicalWeighing.LjPlanning; using Mesnac.Action.ChemicalWeighing.LjPlanning;
using System.Diagnostics.SymbolStore;
using Mesnac.Basic;
using Mesnac.Action.ChemicalWeighing.FreeDb;
namespace Mesnac.Action.ChemicalWeighing.AutoControl namespace Mesnac.Action.ChemicalWeighing.AutoControl
{ {
@ -55,17 +58,32 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
return; return;
} }
int bin1 = Convert.ToInt32(ControlsEntity.ChooseMaterial1.MCValue.ToString()); int b1 = Convert.ToInt32(ControlsEntity.ChooseMaterial1.MCValue.ToString());
int bin2 = Convert.ToInt32(ControlsEntity.ChooseMaterial2.MCValue.ToString()); int b2 = Convert.ToInt32(ControlsEntity.ChooseMaterial2.MCValue.ToString());
List<RecipePlcView> recipes = new List<RecipePlcView>(); short bin1 = (short)StockMaterrialDbHelp.GetCodeById(b1);
short bin2 = (short)StockMaterrialDbHelp.GetCodeById(b2);
float MatTol1 = Convert.ToSingle(ControlsEntity.MaterialTolerance1.MCValue.ToString());
float MatTol2 = Convert.ToSingle(ControlsEntity.MaterialTolerance2.MCValue.ToString());
float MatWei1 = Convert.ToSingle(ControlsEntity.MaterialWeight1.MCValue.ToString());
float MatWei2 = Convert.ToSingle(ControlsEntity.MaterialWeight2.MCValue.ToString());
float t1 = Convert.ToSingle(ControlsEntity.MaterialTolerance1.MCValue.ToString()); float GelSpeed = Convert.ToSingle(ControlsEntity.GelSpeedSet.MCValue.ToString());
float t2 = Convert.ToSingle(ControlsEntity.MaterialTolerance2.MCValue.ToString());
if(bin2 == -1) float GelPosA = Convert.ToSingle(ControlsEntity.GelPosTimeA.MCValue.ToString());
float GelNagB = Convert.ToSingle(ControlsEntity.GelNagTimeB.MCValue.ToString());
short GelPosC = Convert.ToInt16(ControlsEntity.GelPosTimeC.MCValue.ToString());
short GelWater = Convert.ToInt16(ControlsEntity.GelWaterTime.MCValue.ToString());
short GelWait = Convert.ToInt16(ControlsEntity.GelWaitTime.MCValue.ToString());
short GelCloseHeat = Convert.ToInt16(ControlsEntity.GelCloseHeatTime.MCValue.ToString());
float GelDelayTime = Convert.ToSingle(ControlsEntity.GelOutDelayTime.MCValue.ToString());
if (b2 == -1)
{ {
if (t1 < 0.1) if (MatTol1 < 0.1)
{ {
MessageBox.Show("公差不能小于0.1"); MessageBox.Show("公差不能小于0.1");
return; return;
@ -73,24 +91,26 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
} }
else else
{ {
if (t1 < 0.1 || t2 < 0.1) if (MatTol1 < 0.1 || MatTol2 < 0.1)
{ {
MessageBox.Show("公差不能小于0.1"); MessageBox.Show("公差不能小于0.1");
return; return;
} }
} }
List<RecipePlcView> recipes = new List<RecipePlcView>();
RecipePlcView recipe1 = new RecipePlcView() RecipePlcView recipe1 = new RecipePlcView()
{ {
Bin = (short)StockMaterrialDbHelp.GetCodeById(bin1), Bin = bin1,
Set = Convert.ToSingle(ControlsEntity.MaterialWeight1.MCValue.ToString()), Set = MatWei1,
Tolerance = t1, Tolerance = MatTol1,
}; };
RecipePlcView recipe2 = new RecipePlcView() RecipePlcView recipe2 = new RecipePlcView()
{ {
Bin = (short)StockMaterrialDbHelp.GetCodeById(bin2), Bin = bin2,
Set = Convert.ToSingle(ControlsEntity.MaterialWeight2.MCValue.ToString()), Set = MatWei2,
Tolerance = t2, Tolerance = MatTol2,
}; };
recipes.Add(recipe1); recipes.Add(recipe1);
@ -101,7 +121,7 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
Step step1 = new Step() Step step1 = new Step()
{ {
MixCode = 1, MixCode = 1,
MixSpeed = Convert.ToSingle(ControlsEntity.GelSpeedSet.MCValue.ToString()) MixSpeed = GelSpeed
}; };
Step step2 = new Step() Step step2 = new Step()
{ {
@ -110,9 +130,9 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
Step step3 = new Step() Step step3 = new Step()
{ {
MixCode = 3, MixCode = 3,
MixTime = Convert.ToInt16(ControlsEntity.GelPosTimeC.MCValue.ToString()), MixTime = GelPosC,
MixTemp = Convert.ToSingle(ControlsEntity.GelPosTimeA.MCValue.ToString()), MixTemp = GelPosA,
MixSpeed = Convert.ToSingle(ControlsEntity.GelNagTimeB.MCValue.ToString()) MixSpeed = GelNagB
}; };
Step step4 = new Step() Step step4 = new Step()
{ {
@ -121,7 +141,7 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
Step step5 = new Step() Step step5 = new Step()
{ {
MixCode = 5, MixCode = 5,
MixTime = Convert.ToInt16(ControlsEntity.GelWaterTime.MCValue.ToString()) MixTime = GelWater
}; };
Step step6 = new Step() Step step6 = new Step()
{ {
@ -130,13 +150,13 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
Step step7 = new Step() Step step7 = new Step()
{ {
MixCode = 5, MixCode = 5,
MixTime = Convert.ToInt16(ControlsEntity.GelWaitTime.MCValue.ToString()) MixTime = GelWait
}; };
Step step8 = new Step() Step step8 = new Step()
{ {
MixCode = 7, MixCode = 7,
MixTime = Convert.ToInt16(ControlsEntity.GelCloseHeatTime.MCValue.ToString()), MixTime = GelCloseHeat,
MixTemp = Convert.ToSingle(ControlsEntity.GelOutDelayTime.MCValue.ToString()) MixTemp = GelDelayTime
}; };
steps.Add(step1); steps.Add(step1);
@ -148,6 +168,10 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
steps.Add(step7); steps.Add(step7);
steps.Add(step8); steps.Add(step8);
float WetDryWei = Convert.ToSingle(ControlsEntity.WetDryWeight.MCValue.ToString());
short WetMix = Convert.ToInt16(ControlsEntity.WetMixTime.MCValue.ToString());
short WetOutDelay = Convert.ToInt16(ControlsEntity.WetOutDelayTime.MCValue.ToString());
List<MixStep> mixSteps = new List<MixStep>(); List<MixStep> mixSteps = new List<MixStep>();
MixStep mixStep1 = new MixStep() MixStep mixStep1 = new MixStep()
@ -157,12 +181,12 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
MixStep mixStep2 = new MixStep() MixStep mixStep2 = new MixStep()
{ {
MixCode = 2, MixCode = 2,
SetValue = Convert.ToSingle(ControlsEntity.WetDryWeight.MCValue.ToString()) SetValue = WetDryWei
}; };
MixStep mixStep3 = new MixStep() MixStep mixStep3 = new MixStep()
{ {
MixCode = 3, MixCode = 3,
MixTime = Convert.ToInt16(ControlsEntity.WetMixTime.MCValue.ToString()) MixTime = WetMix
}; };
MixStep mixStep4 = new MixStep() MixStep mixStep4 = new MixStep()
{ {
@ -171,7 +195,7 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
MixStep mixStep5 = new MixStep() MixStep mixStep5 = new MixStep()
{ {
MixCode = 5, MixCode = 5,
MixTime = Convert.ToInt16(ControlsEntity.WetOutDelayTime.MCValue.ToString()), MixTime = WetOutDelay
}; };
mixSteps.Add(mixStep1); mixSteps.Add(mixStep1);
@ -185,16 +209,16 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
DeviceMaterrial deviceMaterial1 = new DeviceMaterrial() DeviceMaterrial deviceMaterial1 = new DeviceMaterrial()
{ {
DeviceId = SingleSelect(), DeviceId = SingleSelect(),
MaterrialId = bin1, MaterrialId = b1,
Type = 2, Type = 2,
Code = StockMaterrialDbHelp.GetCodeById(bin1) Code = StockMaterrialDbHelp.GetCodeById(b1)
}; };
DeviceMaterrial deviceMaterial2 = new DeviceMaterrial() DeviceMaterrial deviceMaterial2 = new DeviceMaterrial()
{ {
DeviceId = SingleSelect(), DeviceId = SingleSelect(),
MaterrialId = bin2, MaterrialId = b2,
Type = 2, Type = 2,
Code = StockMaterrialDbHelp.GetCodeById(bin2) Code = StockMaterrialDbHelp.GetCodeById(b2)
}; };
materials.Add(deviceMaterial1); materials.Add(deviceMaterial1);
@ -247,6 +271,33 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
return; return;
} }
Auto_Log log = new Auto_Log()
{
ActionKind = "糊化湿混数据下传",
LogTime = DateTime.Now,
UserID = string.IsNullOrWhiteSpace(UserInfo.Instance.UserName) ? "Edit" : UserInfo.Instance.UserName,
LineNo = SingleSelect(),
MaterialBin1 = bin1,
MaterialBin2 = bin2,
MaterialWeight1 = MatWei1,
MaterialWeight2 = MatWei2,
MaterialTolerance1 = MatTol1,
MaterialTolerance2 = MatTol2,
GelSpeedSet = GelSpeed,
GelPosTimeA = GelPosA,
GelNagTimeB = GelNagB,
GelPosTimeC = GelPosC,
GelWaterTime = GelWater,
GelWaitTime = GelWait,
GelCloseHeatTime = GelCloseHeat,
GelOutDelayTime = GelDelayTime,
WetDryWeight = WetDryWei,
WetMixTime = WetMix,
WetOutDelayTime = WetOutDelay
};
FreeSqlUnit.Instance.Insert(log).ExecuteIdentity();
MessageBox.Show("数据下传成功!"); MessageBox.Show("数据下传成功!");
} }
@ -301,6 +352,16 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
} }
else else
{ {
Auto_Log log = new Auto_Log()
{
ActionKind = "手动下粉料",
LogTime = DateTime.Now,
LineNo = SingleSelect(),
UserID = string.IsNullOrWhiteSpace(UserInfo.Instance.UserName) ? "Edit" : UserInfo.Instance.UserName,
};
FreeSqlUnit.Instance.Insert(log).ExecuteIdentity();
MessageBox.Show("信号下达成功!"); MessageBox.Show("信号下达成功!");
} }
} }
@ -351,6 +412,16 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
} }
else else
{ {
Auto_Log log = new Auto_Log()
{
ActionKind = "手动下冷水",
LogTime = DateTime.Now,
LineNo = SingleSelect(),
UserID = string.IsNullOrWhiteSpace(UserInfo.Instance.UserName) ? "Edit" : UserInfo.Instance.UserName,
};
FreeSqlUnit.Instance.Insert(log).ExecuteIdentity();
MessageBox.Show("信号下达成功!"); MessageBox.Show("信号下达成功!");
} }
@ -403,6 +474,16 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
} }
else else
{ {
Auto_Log log = new Auto_Log()
{
ActionKind = "手动下热水",
LogTime = DateTime.Now,
LineNo = SingleSelect(),
UserID = string.IsNullOrWhiteSpace(UserInfo.Instance.UserName) ? "Edit" : UserInfo.Instance.UserName,
};
FreeSqlUnit.Instance.Insert(log).ExecuteIdentity();
MessageBox.Show("信号下达成功!"); MessageBox.Show("信号下达成功!");
} }
} }
@ -454,6 +535,16 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
} }
else else
{ {
Auto_Log log = new Auto_Log()
{
ActionKind = "手动下糊化料",
LogTime = DateTime.Now,
LineNo = SingleSelect(),
UserID = string.IsNullOrWhiteSpace(UserInfo.Instance.UserName) ? "Edit" : UserInfo.Instance.UserName,
};
FreeSqlUnit.Instance.Insert(log).ExecuteIdentity();
MessageBox.Show("信号下达成功!"); MessageBox.Show("信号下达成功!");
} }
} }
@ -466,7 +557,7 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
} }
float t = Convert.ToSingle(ControlsEntity.ManualTolerance.MCValue.ToString()); float t = Convert.ToSingle(ControlsEntity.ManualTolerance.MCValue.ToString());
float w = Convert.ToSingle(ControlsEntity.ManualWeight.MCValue.ToString());
if (t < 0.1) if (t < 0.1)
{ {
MessageBox.Show("公差不能小于0.1"); MessageBox.Show("公差不能小于0.1");
@ -475,7 +566,7 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
SetValue value = new SetValue() SetValue value = new SetValue()
{ {
Value = Convert.ToSingle(ControlsEntity.ManualWeight.MCValue.ToString()), Value = w,
Toterance = t Toterance = t
}; };
@ -519,6 +610,18 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
return; return;
} }
Auto_Log log = new Auto_Log()
{
ActionKind = "手动下黑粉",
LogTime = DateTime.Now,
UserID = string.IsNullOrWhiteSpace(UserInfo.Instance.UserName) ? "Edit" : UserInfo.Instance.UserName,
ManualTolerance = t,
LineNo = SingleSelect(),
ManualWeight = w,
};
FreeSqlUnit.Instance.Insert(log).ExecuteIdentity();
MessageBox.Show("数据下传成功!"); MessageBox.Show("数据下传成功!");
} }
@ -565,6 +668,16 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
return; return;
} }
Auto_Log log = new Auto_Log()
{
ActionKind = "产线启动",
LogTime = DateTime.Now,
LineNo = SingleSelect(),
UserID = string.IsNullOrWhiteSpace(UserInfo.Instance.UserName) ? "Edit" : UserInfo.Instance.UserName,
};
FreeSqlUnit.Instance.Insert(log).ExecuteIdentity();
MessageBox.Show("产线已启动!"); MessageBox.Show("产线已启动!");
} }
@ -602,6 +715,16 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
return; return;
} }
Auto_Log log = new Auto_Log()
{
ActionKind = "产线停止",
LogTime = DateTime.Now,
LineNo = SingleSelect(),
UserID = string.IsNullOrWhiteSpace(UserInfo.Instance.UserName) ? "Edit" : UserInfo.Instance.UserName,
};
FreeSqlUnit.Instance.Insert(log).ExecuteIdentity();
MessageBox.Show("已经停止生产"); MessageBox.Show("已经停止生产");
} }
@ -622,7 +745,19 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
} }
Db3000Helper.WriteModel(SingleSelect(), true); Db3000Helper.WriteModel(SingleSelect(), true);
ControlsEntity.RepairState.MCValue = "开"; ControlsEntity.RepairState.MCValue = "开";
Auto_Log log = new Auto_Log()
{
ActionKind = "维修模式开启",
LogTime = DateTime.Now,
LineNo = SingleSelect(),
UserID = string.IsNullOrWhiteSpace(UserInfo.Instance.UserName) ? "Edit" : UserInfo.Instance.UserName,
};
FreeSqlUnit.Instance.Insert(log).ExecuteIdentity();
MessageBox.Show("维修模式已开启"); MessageBox.Show("维修模式已开启");
} }
else else
{ {
@ -634,7 +769,19 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
} }
Db3000Helper.WriteModel(SingleSelect(), false); Db3000Helper.WriteModel(SingleSelect(), false);
ControlsEntity.RepairState.MCValue = "关"; ControlsEntity.RepairState.MCValue = "关";
Auto_Log log = new Auto_Log()
{
ActionKind = "维修模式关闭",
LogTime = DateTime.Now,
LineNo = SingleSelect(),
UserID = string.IsNullOrWhiteSpace(UserInfo.Instance.UserName) ? "Edit" : UserInfo.Instance.UserName,
};
FreeSqlUnit.Instance.Insert(log).ExecuteIdentity();
MessageBox.Show("维修模式已关闭"); MessageBox.Show("维修模式已关闭");
} }
} }

@ -36,7 +36,7 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
ControlImport(); ControlImport();
ControlsEntity.Line1.MCValue = true; ControlsEntity.Line1.MCValue = true;
ControlsEntity.Line1.BackColor = System.Drawing.Color.LightGreen; ControlsEntity.Line1.BackColor = System.Drawing.Color.LightSkyBlue;
ControlsEntity.Line1.CheckedChanged += Mcradion_CheckedChanged; ControlsEntity.Line1.CheckedChanged += Mcradion_CheckedChanged;
ControlsEntity.Line2.CheckedChanged += Mcradion_CheckedChanged; ControlsEntity.Line2.CheckedChanged += Mcradion_CheckedChanged;
@ -167,8 +167,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
ControlsEntity.MaterialWeight1.MCValue = getGelatG1.RecipePlcViews[0].Set; ControlsEntity.MaterialWeight1.MCValue = getGelatG1.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG1.RecipePlcViews[1].Set; ControlsEntity.MaterialWeight2.MCValue = getGelatG1.RecipePlcViews[1].Set;
ControlsEntity.MaterialTolerance1.MCValue = getGelatG1.RecipePlcViews[0].Tolerance; //ControlsEntity.MaterialTolerance1.MCValue = getGelatG1.RecipePlcViews[0].Tolerance;
ControlsEntity.MaterialTolerance2.MCValue = getGelatG1.RecipePlcViews[1].Tolerance; //ControlsEntity.MaterialTolerance2.MCValue = getGelatG1.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG1.RecipeSteps[0].MixSpeed; ControlsEntity.GelSpeedSet.MCValue = getGelatG1.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG1.RecipeSteps[2].MixTemp; ControlsEntity.GelPosTimeA.MCValue = getGelatG1.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG1.RecipeSteps[2].MixSpeed; ControlsEntity.GelNagTimeB.MCValue = getGelatG1.RecipeSteps[2].MixSpeed;

@ -87,8 +87,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
case 1: case 1:
ControlsEntity.MaterialWeight1.MCValue = getGelatG1.RecipePlcViews[0].Set; ControlsEntity.MaterialWeight1.MCValue = getGelatG1.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG1.RecipePlcViews[1].Set; ControlsEntity.MaterialWeight2.MCValue = getGelatG1.RecipePlcViews[1].Set;
ControlsEntity.MaterialTolerance1.MCValue = getGelatG1.RecipePlcViews[0].Tolerance; //ControlsEntity.MaterialTolerance1.MCValue = getGelatG1.RecipePlcViews[0].Tolerance;
ControlsEntity.MaterialTolerance2.MCValue = getGelatG1.RecipePlcViews[1].Tolerance; //ControlsEntity.MaterialTolerance2.MCValue = getGelatG1.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG1.RecipeSteps[0].MixSpeed; ControlsEntity.GelSpeedSet.MCValue = getGelatG1.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG1.RecipeSteps[2].MixTemp; ControlsEntity.GelPosTimeA.MCValue = getGelatG1.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG1.RecipeSteps[2].MixSpeed; ControlsEntity.GelNagTimeB.MCValue = getGelatG1.RecipeSteps[2].MixSpeed;
@ -104,8 +104,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
case 2: case 2:
ControlsEntity.MaterialWeight1.MCValue = getGelatG2.RecipePlcViews[0].Set; ControlsEntity.MaterialWeight1.MCValue = getGelatG2.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG2.RecipePlcViews[1].Set; ControlsEntity.MaterialWeight2.MCValue = getGelatG2.RecipePlcViews[1].Set;
ControlsEntity.MaterialTolerance1.MCValue = getGelatG2.RecipePlcViews[0].Tolerance; //ControlsEntity.MaterialTolerance1.MCValue = getGelatG2.RecipePlcViews[0].Tolerance;
ControlsEntity.MaterialTolerance2.MCValue = getGelatG2.RecipePlcViews[1].Tolerance; //ControlsEntity.MaterialTolerance2.MCValue = getGelatG2.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG2.RecipeSteps[0].MixSpeed; ControlsEntity.GelSpeedSet.MCValue = getGelatG2.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG2.RecipeSteps[2].MixTemp; ControlsEntity.GelPosTimeA.MCValue = getGelatG2.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG2.RecipeSteps[2].MixSpeed; ControlsEntity.GelNagTimeB.MCValue = getGelatG2.RecipeSteps[2].MixSpeed;
@ -121,8 +121,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
case 3: case 3:
ControlsEntity.MaterialWeight1.MCValue = getGelatG3.RecipePlcViews[0].Set; ControlsEntity.MaterialWeight1.MCValue = getGelatG3.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG3.RecipePlcViews[1].Set; ControlsEntity.MaterialWeight2.MCValue = getGelatG3.RecipePlcViews[1].Set;
ControlsEntity.MaterialTolerance1.MCValue = getGelatG3.RecipePlcViews[0].Tolerance; //ControlsEntity.MaterialTolerance1.MCValue = getGelatG3.RecipePlcViews[0].Tolerance;
ControlsEntity.MaterialTolerance2.MCValue = getGelatG3.RecipePlcViews[1].Tolerance; //ControlsEntity.MaterialTolerance2.MCValue = getGelatG3.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG3.RecipeSteps[0].MixSpeed; ControlsEntity.GelSpeedSet.MCValue = getGelatG3.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG3.RecipeSteps[2].MixTemp; ControlsEntity.GelPosTimeA.MCValue = getGelatG3.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG3.RecipeSteps[2].MixSpeed; ControlsEntity.GelNagTimeB.MCValue = getGelatG3.RecipeSteps[2].MixSpeed;
@ -138,8 +138,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
case 4: case 4:
ControlsEntity.MaterialWeight1.MCValue = getGelatG4.RecipePlcViews[0].Set; ControlsEntity.MaterialWeight1.MCValue = getGelatG4.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG4.RecipePlcViews[1].Set; ControlsEntity.MaterialWeight2.MCValue = getGelatG4.RecipePlcViews[1].Set;
ControlsEntity.MaterialTolerance1.MCValue = getGelatG4.RecipePlcViews[0].Tolerance; //ControlsEntity.MaterialTolerance1.MCValue = getGelatG4.RecipePlcViews[0].Tolerance;
ControlsEntity.MaterialTolerance2.MCValue = getGelatG4.RecipePlcViews[1].Tolerance; //ControlsEntity.MaterialTolerance2.MCValue = getGelatG4.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG4.RecipeSteps[0].MixSpeed; ControlsEntity.GelSpeedSet.MCValue = getGelatG4.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG4.RecipeSteps[2].MixTemp; ControlsEntity.GelPosTimeA.MCValue = getGelatG4.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG4.RecipeSteps[2].MixSpeed; ControlsEntity.GelNagTimeB.MCValue = getGelatG4.RecipeSteps[2].MixSpeed;
@ -155,8 +155,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
case 5: case 5:
ControlsEntity.MaterialWeight1.MCValue = getGelatG5.RecipePlcViews[0].Set; ControlsEntity.MaterialWeight1.MCValue = getGelatG5.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG5.RecipePlcViews[1].Set; ControlsEntity.MaterialWeight2.MCValue = getGelatG5.RecipePlcViews[1].Set;
ControlsEntity.MaterialTolerance1.MCValue = getGelatG5.RecipePlcViews[0].Tolerance; //ControlsEntity.MaterialTolerance1.MCValue = getGelatG5.RecipePlcViews[0].Tolerance;
ControlsEntity.MaterialTolerance2.MCValue = getGelatG5.RecipePlcViews[1].Tolerance; //ControlsEntity.MaterialTolerance2.MCValue = getGelatG5.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG5.RecipeSteps[0].MixSpeed; ControlsEntity.GelSpeedSet.MCValue = getGelatG5.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG5.RecipeSteps[2].MixTemp; ControlsEntity.GelPosTimeA.MCValue = getGelatG5.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG5.RecipeSteps[2].MixSpeed; ControlsEntity.GelNagTimeB.MCValue = getGelatG5.RecipeSteps[2].MixSpeed;
@ -172,8 +172,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
case 6: case 6:
ControlsEntity.MaterialWeight1.MCValue = getGelatG6.RecipePlcViews[0].Set; ControlsEntity.MaterialWeight1.MCValue = getGelatG6.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG6.RecipePlcViews[1].Set; ControlsEntity.MaterialWeight2.MCValue = getGelatG6.RecipePlcViews[1].Set;
ControlsEntity.MaterialTolerance1.MCValue = getGelatG6.RecipePlcViews[0].Tolerance; //ControlsEntity.MaterialTolerance1.MCValue = getGelatG6.RecipePlcViews[0].Tolerance;
ControlsEntity.MaterialTolerance2.MCValue = getGelatG6.RecipePlcViews[1].Tolerance; //ControlsEntity.MaterialTolerance2.MCValue = getGelatG6.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG6.RecipeSteps[0].MixSpeed; ControlsEntity.GelSpeedSet.MCValue = getGelatG6.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG6.RecipeSteps[2].MixTemp; ControlsEntity.GelPosTimeA.MCValue = getGelatG6.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG6.RecipeSteps[2].MixSpeed; ControlsEntity.GelNagTimeB.MCValue = getGelatG6.RecipeSteps[2].MixSpeed;
@ -189,8 +189,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
case 7: case 7:
ControlsEntity.MaterialWeight1.MCValue = getGelatG7.RecipePlcViews[0].Set; ControlsEntity.MaterialWeight1.MCValue = getGelatG7.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG7.RecipePlcViews[1].Set; ControlsEntity.MaterialWeight2.MCValue = getGelatG7.RecipePlcViews[1].Set;
ControlsEntity.MaterialTolerance1.MCValue = getGelatG7.RecipePlcViews[0].Tolerance; //ControlsEntity.MaterialTolerance1.MCValue = getGelatG7.RecipePlcViews[0].Tolerance;
ControlsEntity.MaterialTolerance2.MCValue = getGelatG7.RecipePlcViews[1].Tolerance; //ControlsEntity.MaterialTolerance2.MCValue = getGelatG7.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG7.RecipeSteps[0].MixSpeed; ControlsEntity.GelSpeedSet.MCValue = getGelatG7.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG7.RecipeSteps[2].MixTemp; ControlsEntity.GelPosTimeA.MCValue = getGelatG7.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG7.RecipeSteps[2].MixSpeed; ControlsEntity.GelNagTimeB.MCValue = getGelatG7.RecipeSteps[2].MixSpeed;
@ -206,8 +206,8 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
case 8: case 8:
ControlsEntity.MaterialWeight1.MCValue = getGelatG8.RecipePlcViews[0].Set; ControlsEntity.MaterialWeight1.MCValue = getGelatG8.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = getGelatG8.RecipePlcViews[1].Set; ControlsEntity.MaterialWeight2.MCValue = getGelatG8.RecipePlcViews[1].Set;
ControlsEntity.MaterialTolerance1.MCValue = getGelatG8.RecipePlcViews[0].Tolerance; //ControlsEntity.MaterialTolerance1.MCValue = getGelatG8.RecipePlcViews[0].Tolerance;
ControlsEntity.MaterialTolerance2.MCValue = getGelatG8.RecipePlcViews[1].Tolerance; //ControlsEntity.MaterialTolerance2.MCValue = getGelatG8.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = getGelatG8.RecipeSteps[0].MixSpeed; ControlsEntity.GelSpeedSet.MCValue = getGelatG8.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = getGelatG8.RecipeSteps[2].MixTemp; ControlsEntity.GelPosTimeA.MCValue = getGelatG8.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = getGelatG8.RecipeSteps[2].MixSpeed; ControlsEntity.GelNagTimeB.MCValue = getGelatG8.RecipeSteps[2].MixSpeed;

@ -175,8 +175,6 @@ namespace Mesnac.Action.ChemicalWeighing.MainDetailControl
stopwatch.Stop(); stopwatch.Stop();
var send = stopwatch.ElapsedMilliseconds; var send = stopwatch.ElapsedMilliseconds;
MesnacServiceManager.Instance.LoggingService.Info("结束" + send);
} }
else else

@ -219,6 +219,7 @@
<Compile Include="Alarm\PmtAlarm\InsertAction.cs" /> <Compile Include="Alarm\PmtAlarm\InsertAction.cs" />
<Compile Include="Alarm\PmtAlarm\ModifyAction.cs" /> <Compile Include="Alarm\PmtAlarm\ModifyAction.cs" />
<Compile Include="Alarm\PmtAlarm\SelectAction.cs" /> <Compile Include="Alarm\PmtAlarm\SelectAction.cs" />
<Compile Include="AutoControl\DB\Auto_Log.cs" />
<Compile Include="AutoControl\DB\DeviceMaterrial.cs" /> <Compile Include="AutoControl\DB\DeviceMaterrial.cs" />
<Compile Include="AutoControl\DB\DeviceMaterrialService.cs" /> <Compile Include="AutoControl\DB\DeviceMaterrialService.cs" />
<Compile Include="AutoControl\DB\StockMaterrialDBHelp.cs" /> <Compile Include="AutoControl\DB\StockMaterrialDBHelp.cs" />

@ -694,6 +694,7 @@
<Property name="MCVisible">True</Property> <Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property> <Property name="MCEnabled">True</Property>
<Property name="TextName" /> <Property name="TextName" />
<Property name="Text">0.2</Property>
<Property name="Location">83, 77</Property> <Property name="Location">83, 77</Property>
<Property name="Name">ManualTolerance</Property> <Property name="Name">ManualTolerance</Property>
<Property name="Size">80, 21</Property> <Property name="Size">80, 21</Property>
@ -908,6 +909,7 @@
<Property name="MCVisible">True</Property> <Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property> <Property name="MCEnabled">True</Property>
<Property name="TextName" /> <Property name="TextName" />
<Property name="Text">0.2</Property>
<Property name="Location">407, 54</Property> <Property name="Location">407, 54</Property>
<Property name="Name">MaterialTolerance2</Property> <Property name="Name">MaterialTolerance2</Property>
<Property name="Size">80, 26</Property> <Property name="Size">80, 26</Property>
@ -1396,6 +1398,7 @@
<Property name="MCVisible">True</Property> <Property name="MCVisible">True</Property>
<Property name="MCEnabled">True</Property> <Property name="MCEnabled">True</Property>
<Property name="TextName" /> <Property name="TextName" />
<Property name="Text">0.2</Property>
<Property name="Location">407, 24</Property> <Property name="Location">407, 24</Property>
<Property name="Name">MaterialTolerance1</Property> <Property name="Name">MaterialTolerance1</Property>
<Property name="Size">80, 26</Property> <Property name="Size">80, 26</Property>

Loading…
Cancel
Save