wangsr
wangsr 1 year ago
parent 9b31b74429
commit 732fd48f6e

@ -2,7 +2,9 @@
using DataBlockHelper.Entity.DB2104Entity;
using DataBlockHelper.Entity.DB2106Entity;
using Mesnac.Action.Base;
using Mesnac.Action.ChemicalWeighing.AutoControl.DB;
using Mesnac.Action.ChemicalWeighing.AutoControl.Entity;
using Mesnac.Action.ChemicalWeighing.LjMixManager;
using Mesnac.Controls.Base;
using Mesnac.Core.Service;
using System;
@ -25,9 +27,9 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
McControls = GetAllControls();
ControlImport();
BottomSelect(runtime);
}
@ -75,6 +77,9 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
}
}
/// <summary>
/// 控件导入
/// </summary>
private void ControlImport()
{
ControlsEntity.Line1 = GetBaseControl("Line1");
@ -120,37 +125,93 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
if (ControlsEntity.Download == runtime.Sender)
{
WaterEntity HotA = new WaterEntity();
WaterEntity ColdA = new WaterEntity();
WaterEntity HotB = new WaterEntity();
WaterEntity ColdB = new WaterEntity();
List<RecipePlcView> recipes = new List<RecipePlcView>();
RecipePlcView recipe1 = new RecipePlcView()
{
};
RecipePlcView recipe2 = new RecipePlcView()
{
};
recipes.Add(recipe1);
recipes.Add(recipe2);
List<Step> steps = new List<Step>();
Step step1 = new Step()
{
};
Step step2 = new Step()
{
};
Step step3 = new Step()
{
};
Step step4 = new Step()
{
};
Step step5 = new Step()
{
};
Step step6 = new Step()
{
};
Step step7 = new Step()
{
float hotASet, hotBSet, coldASet, coldBSet, hotATol, hotBTol, coldATol, coldBTol;
};
Step step8 = new Step()
{
};
steps.Add(step1);
steps.Add(step2);
steps.Add(step3);
steps.Add(step4);
steps.Add(step5);
steps.Add(step6);
steps.Add(step7);
steps.Add(step8);
if (float.TryParse(Convert.ToString(ControlsEntity.ChooseMaterial1.MCValue), out hotASet) &&
)
List<MixStep> mixSteps = new List<MixStep>();
MixStep mixStep1 = new MixStep()
{
HotA.Set = hotASet;
HotB.Set = hotBSet;
ColdA.Set = coldASet;
ColdB.Set = coldBSet;
HotA.TolErance = hotATol;
HotB.TolErance = hotBTol;
ColdA.TolErance = coldATol;
ColdB.TolErance = coldBTol;
Db2104WriteHelper.WriteAHostWater(HotA);
Db2104WriteHelper.WriteBHostWater(HotB);
Db2104WriteHelper.WriteAColWater(ColdA);
Db2104WriteHelper.WriteBColWater(ColdB);
MesnacServiceManager.Instance.LoggingService.Info("水称数据下发成功!");
MessageBox.Show("水称数据下发成功");
}
else
};
MixStep mixStep2 = new MixStep()
{
MesnacServiceManager.Instance.LoggingService.Info("输入数值的格式有误");
MessageBox.Show("输入数值的格式有误!");
return;
}
};
MixStep mixStep3 = new MixStep()
{
};
MixStep mixStep4 = new MixStep()
{
};
MixStep mixStep5 = new MixStep()
{
};
mixSteps.Add(mixStep1);
mixSteps.Add(mixStep2);
mixSteps.Add(mixStep3);
mixSteps.Add(mixStep4);
mixSteps.Add(mixStep5);
}
if (ControlsEntity.LineStart == runtime.Sender)

Loading…
Cancel
Save