wangsr
nodyang 1 year ago
parent 27ab6500c7
commit fa35c70ad8

@ -59,18 +59,20 @@ namespace Mesnac.Action.ChemicalWeighing.AutoControl
ControlsEntity.ChooseMaterial2.SelectedIndex = -1;
}
ControlsEntity.MaterialWeight1.MCValue = LjPlanningPlcHelp.GetGelatG1.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = LjPlanningPlcHelp.GetGelatG1.RecipePlcViews[1].Set;
ControlsEntity.MaterialTolerance1.MCValue = LjPlanningPlcHelp.GetGelatG1.RecipePlcViews[0].Tolerance;
ControlsEntity.MaterialTolerance2.MCValue = LjPlanningPlcHelp.GetGelatG1.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = LjPlanningPlcHelp.GetGelatG1.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = LjPlanningPlcHelp.GetGelatG1.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = LjPlanningPlcHelp.GetGelatG1.RecipeSteps[2].MixSpeed;
ControlsEntity.GelPosTimeC.MCValue = LjPlanningPlcHelp.GetGelatG1.RecipeSteps[2].MixTime;
ControlsEntity.GelWaterTime.MCValue = LjPlanningPlcHelp.GetGelatG1.RecipeSteps[4].MixTime;
ControlsEntity.GelWaitTime.MCValue = LjPlanningPlcHelp.GetGelatG1.RecipeSteps[6].MixTime;
ControlsEntity.GelCloseHeatTime.MCValue = LjPlanningPlcHelp.GetGelatG1.RecipeSteps[7].MixTime;
ControlsEntity.GelOutDelayTime.MCValue = LjPlanningPlcHelp.GetGelatG1.RecipeSteps[7].MixTemp;
var dryerView = LjPlanningPlcHelp.GetGelatG1;
ControlsEntity.MaterialWeight1.MCValue = dryerView.RecipePlcViews[0].Set;
ControlsEntity.MaterialWeight2.MCValue = dryerView.RecipePlcViews[1].Set;
ControlsEntity.MaterialTolerance1.MCValue = dryerView.RecipePlcViews[0].Tolerance;
ControlsEntity.MaterialTolerance2.MCValue = dryerView.RecipePlcViews[1].Tolerance;
ControlsEntity.GelSpeedSet.MCValue = dryerView.RecipeSteps[0].MixSpeed;
ControlsEntity.GelPosTimeA.MCValue = dryerView.RecipeSteps[2].MixTemp;
ControlsEntity.GelNagTimeB.MCValue = dryerView.RecipeSteps[2].MixSpeed;
ControlsEntity.GelPosTimeC.MCValue = dryerView.RecipeSteps[2].MixTime;
ControlsEntity.GelWaterTime.MCValue = dryerView.RecipeSteps[4].MixTime;
ControlsEntity.GelWaitTime.MCValue = dryerView.RecipeSteps[6].MixTime;
ControlsEntity.GelCloseHeatTime.MCValue = dryerView.RecipeSteps[7].MixTime;
ControlsEntity.GelOutDelayTime.MCValue = dryerView.RecipeSteps[7].MixTemp;
ControlsEntity.WetDryWeight.MCValue = LjPlanningPlcHelp.GetWeterM1[1].SetValue;
ControlsEntity.WetMixTime.MCValue = LjPlanningPlcHelp.GetWeterM1[2].MixTime;
ControlsEntity.WetOutDelayTime.MCValue = LjPlanningPlcHelp.GetWeterM1[4].MixTime;

@ -23,14 +23,14 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
public static DryerView GetGelatG7 => GetGelatView(1858);
public static DryerView GetGelatG8 => GetGelatView(1998);
public static List<MixStep> GetWeterM1 = GetWeterView(2138);
public static List<MixStep> GetWeterM2 = GetWeterView(2338);
public static List<MixStep> GetWeterM3 = GetWeterView(2538);
public static List<MixStep> GetWeterM4 = GetWeterView(2738);
public static List<MixStep> GetWeterM5 = GetWeterView(2938);
public static List<MixStep> GetWeterM6 = GetWeterView(3138);
public static List<MixStep> GetWeterM7 = GetWeterView(3338);
public static List<MixStep> GetWeterM8 = GetWeterView(3538);
public static List<MixStep> GetWeterM1 => GetWeterView(2138);
public static List<MixStep> GetWeterM2 => GetWeterView(2338);
public static List<MixStep> GetWeterM3 => GetWeterView(2538);
public static List<MixStep> GetWeterM4 => GetWeterView(2738);
public static List<MixStep> GetWeterM5 => GetWeterView(2938);
public static List<MixStep> GetWeterM6 => GetWeterView(3138);
public static List<MixStep> GetWeterM7 => GetWeterView(3338);
public static List<MixStep> GetWeterM8 => GetWeterView(3538);
/// <summary>
/// 干混机1
@ -41,7 +41,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
{
int begin = 58;
DownCleanD1Recipe(begin);
//DownCleanD1Recipe(begin);
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
@ -69,7 +69,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
{
int begin = 298;
DownCleanD1Recipe(begin);
//DownCleanD1Recipe(begin);
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
@ -96,7 +96,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
{
int begin = 538;
DownCleanD1Recipe(begin);
//DownCleanD1Recipe(begin);
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
@ -120,7 +120,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
public static void DownD4Recipe(List<RecipePlcView> recipePlcViews, List<Step> recipeSteps)
{
int begin = 778;
DownCleanD1Recipe(begin);
//DownCleanD1Recipe(begin);
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
@ -149,7 +149,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
{
int begin = 1018;
DownCleanG1Recipe(begin);
//DownCleanG1Recipe(begin);
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
@ -173,7 +173,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
public static void DownG2Recipe(List<RecipePlcView> recipePlcViews, List<Step> recipeSteps)
{
int begin = 1158;
DownCleanG1Recipe(begin);
//DownCleanG1Recipe(begin);
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
@ -199,7 +199,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
public static void DownG3Recipe(List<RecipePlcView> recipePlcViews, List<Step> recipeSteps)
{
int begin = 1298;
DownCleanG1Recipe(begin);
//DownCleanG1Recipe(begin);
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
@ -224,7 +224,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
public static void DownG4Recipe(List<RecipePlcView> recipePlcViews, List<Step> recipeSteps)
{
int begin = 1438;
DownCleanG1Recipe(begin);
//DownCleanG1Recipe(begin);
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
@ -250,7 +250,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
public static void DownG5Recipe(List<RecipePlcView> recipePlcViews, List<Step> recipeSteps)
{
int begin = 1578;
DownCleanG1Recipe(begin);
//DownCleanG1Recipe(begin);
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
@ -276,7 +276,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
{
int begin =1718;
DownCleanG1Recipe(begin);
//DownCleanG1Recipe(begin);
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
@ -303,7 +303,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
{
int begin =1858;
DownCleanG1Recipe(begin);
//DownCleanG1Recipe(begin);
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
@ -330,7 +330,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
int begin =1998;
DownCleanG1Recipe(begin);
//DownCleanG1Recipe(begin);
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
@ -355,7 +355,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
{
int begin = 2138;
DownM1CleanRecipe(begin);
//DownM1CleanRecipe(begin);
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
@ -373,7 +373,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
public static void DownM2Recipe(List<MixStep> recipeSteps)
{
int begin = 2338;
DownM1CleanRecipe(begin);
//DownM1CleanRecipe(begin);
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
@ -387,7 +387,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
public static void DownM3Recipe(List<MixStep> recipeSteps)
{
int begin = 2538;
DownM1CleanRecipe(begin);
//DownM1CleanRecipe(begin);
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
@ -401,7 +401,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
public static void DownM4Recipe(List<MixStep> recipeSteps)
{
int begin = 2738;
DownM1CleanRecipe(begin);
//DownM1CleanRecipe(begin);
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
@ -415,7 +415,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
public static void DownM5Recipe(List<MixStep> recipeSteps)
{
int begin = 2938;
DownM1CleanRecipe(begin);
//DownM1CleanRecipe(begin);
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
@ -429,7 +429,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
public static void DownM6Recipe(List<MixStep> recipeSteps)
{
int begin = 2978;
DownM1CleanRecipe(begin);
//DownM1CleanRecipe(begin);
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
@ -442,7 +442,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
public static void DownM7Recipe(List<MixStep> recipeSteps)
{
int begin = 3138;
DownM1CleanRecipe(begin);
//DownM1CleanRecipe(begin);
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
@ -455,7 +455,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
public static void DownM8Recipe(List<MixStep> recipeSteps)
{
int begin = 3338;
DownM1CleanRecipe(begin);
//DownM1CleanRecipe(begin);
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
@ -570,7 +570,6 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
private static List<MixStep> GetWeterView(int start)
{
var byteTransform = PlcConnect.Instance.ByteTransform;
List<MixStep> ls = new List<MixStep>();
var operateResult = PlcConnect.Instance.Read($"DB2104.{start}.0", 200);
List<MixStep> lsSteps = new List<MixStep>();
if (operateResult.IsSuccess)
@ -600,67 +599,67 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
return lsSteps;
}
private static void DownCleanD1Recipe(int begin)
{
List<RecipePlcView> recipePlcViews = GetClean(12);
List<Step> recipeSteps = GetCleanStep(10);
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
Dowd(begin, view);
begin += 10;
}
begin += 120;
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
DowSteps(begin, view);
begin += 12;
}
}
private static void DownCleanG1Recipe(int begin)
{
List<RecipePlcView> recipePlcViews = GetClean(2);
List<Step> recipeSteps = GetCleanStep(10);
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
Dowd(begin, view);
begin += 10;
}
begin += 20;
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
DowSteps(begin, view);
begin += 12;
}
}
private static void DownM1CleanRecipe(int begin)
{
List<MixStep> recipeSteps = GetCleanMixStep(10);
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
DowMSteps(begin, view);
begin += 20;
}
}
// private static void DownCleanD1Recipe(int begin)
// {
// List<RecipePlcView> recipePlcViews = GetClean(12);
// List<Step> recipeSteps = GetCleanStep(10);
//
// for (int i = 0; i < recipePlcViews.Count(); i++)
// {
// var view = recipePlcViews[i];
// Dowd(begin, view);
// begin += 10;
// }
//
// begin += 120;
// for (int i = 0; i < recipeSteps.Count(); i++)
// {
// var view = recipeSteps[i];
// DowSteps(begin, view);
// begin += 12;
//
// }
//
// }
// private static void DownCleanG1Recipe(int begin)
// {
// List<RecipePlcView> recipePlcViews = GetClean(2);
// List<Step> recipeSteps = GetCleanStep(10);
//
// for (int i = 0; i < recipePlcViews.Count(); i++)
// {
// var view = recipePlcViews[i];
// Dowd(begin, view);
// begin += 10;
// }
//
// begin += 20;
// for (int i = 0; i < recipeSteps.Count(); i++)
// {
// var view = recipeSteps[i];
// DowSteps(begin, view);
// begin += 12;
//
// }
//
// }
// private static void DownM1CleanRecipe(int begin)
// {
//
// List<MixStep> recipeSteps = GetCleanMixStep(10);
//
// for (int i = 0; i < recipeSteps.Count(); i++)
// {
// var view = recipeSteps[i];
// DowMSteps(begin, view);
// begin += 20;
//
// }
//
// }
private static void Dowd(int start, RecipePlcView view)
@ -692,7 +691,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
private static void DowMSteps(int start, MixStep step)
{
int mixCode = start;
PlcConnect.Instance.Write($"DB2104.{mixCode}.0", step.MixCode);
var s= PlcConnect.Instance.Write($"DB2104.{mixCode}.0", step.MixCode);
int mixTime = start + 2;
PlcConnect.Instance.Write($"DB2104.{mixTime}.0", step.MixTime);

Loading…
Cancel
Save