|
|
@ -44,7 +44,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
|
|
recipePlcViews = recipePlcViews.Where(x => x.Bin != -1).ToList();
|
|
|
|
recipePlcViews = recipePlcViews.Where(x => x.Bin != -1).ToList();
|
|
|
|
int begin = 58;
|
|
|
|
int begin = 128;
|
|
|
|
DownCleanD1Recipe(begin);
|
|
|
|
DownCleanD1Recipe(begin);
|
|
|
|
for (int i = 0; i < recipePlcViews.Count(); i++)
|
|
|
|
for (int i = 0; i < recipePlcViews.Count(); i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -54,7 +54,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
begin = 178;
|
|
|
|
begin = 278;
|
|
|
|
for (int i = 0; i < recipeSteps.Count(); i++)
|
|
|
|
for (int i = 0; i < recipeSteps.Count(); i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var view = recipeSteps[i];
|
|
|
|
var view = recipeSteps[i];
|
|
|
@ -72,7 +72,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
|
|
|
|
public static void DownD2Recipe(List<RecipePlcView> recipePlcViews, List<Step> recipeSteps)
|
|
|
|
public static void DownD2Recipe(List<RecipePlcView> recipePlcViews, List<Step> recipeSteps)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
recipePlcViews = recipePlcViews.Where(x => x.Bin != -1).ToList();
|
|
|
|
recipePlcViews = recipePlcViews.Where(x => x.Bin != -1).ToList();
|
|
|
|
int begin = 298;
|
|
|
|
int begin = 398;
|
|
|
|
DownCleanD1Recipe(begin);
|
|
|
|
DownCleanD1Recipe(begin);
|
|
|
|
for (int i = 0; i < recipePlcViews.Count(); i++)
|
|
|
|
for (int i = 0; i < recipePlcViews.Count(); i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -82,7 +82,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
begin = 418;
|
|
|
|
begin = 548;
|
|
|
|
for (int i = 0; i < recipeSteps.Count(); i++)
|
|
|
|
for (int i = 0; i < recipeSteps.Count(); i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var view = recipeSteps[i];
|
|
|
|
var view = recipeSteps[i];
|
|
|
@ -99,7 +99,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
|
|
|
|
public static void DownD3Recipe(List<RecipePlcView> recipePlcViews, List<Step> recipeSteps)
|
|
|
|
public static void DownD3Recipe(List<RecipePlcView> recipePlcViews, List<Step> recipeSteps)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
recipePlcViews = recipePlcViews.Where(x => x.Bin != -1).ToList();
|
|
|
|
recipePlcViews = recipePlcViews.Where(x => x.Bin != -1).ToList();
|
|
|
|
int begin = 538;
|
|
|
|
int begin = 668;
|
|
|
|
DownCleanD1Recipe(begin);
|
|
|
|
DownCleanD1Recipe(begin);
|
|
|
|
for (int i = 0; i < recipePlcViews.Count(); i++)
|
|
|
|
for (int i = 0; i < recipePlcViews.Count(); i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -109,7 +109,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
begin = 658;
|
|
|
|
begin = 818;
|
|
|
|
for (int i = 0; i < recipeSteps.Count(); i++)
|
|
|
|
for (int i = 0; i < recipeSteps.Count(); i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var view = recipeSteps[i];
|
|
|
|
var view = recipeSteps[i];
|
|
|
@ -124,7 +124,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
|
|
|
|
public static void DownD4Recipe(List<RecipePlcView> recipePlcViews, List<Step> recipeSteps)
|
|
|
|
public static void DownD4Recipe(List<RecipePlcView> recipePlcViews, List<Step> recipeSteps)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
recipePlcViews = recipePlcViews.Where(x => x.Bin != -1).ToList();
|
|
|
|
recipePlcViews = recipePlcViews.Where(x => x.Bin != -1).ToList();
|
|
|
|
int begin = 778;
|
|
|
|
int begin = 938;
|
|
|
|
DownCleanD1Recipe(begin);
|
|
|
|
DownCleanD1Recipe(begin);
|
|
|
|
for (int i = 0; i < recipePlcViews.Count(); i++)
|
|
|
|
for (int i = 0; i < recipePlcViews.Count(); i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -134,7 +134,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
begin = 898;
|
|
|
|
begin = 1088;
|
|
|
|
for (int i = 0; i < recipeSteps.Count(); i++)
|
|
|
|
for (int i = 0; i < recipeSteps.Count(); i++)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
var view = recipeSteps[i];
|
|
|
|
var view = recipeSteps[i];
|
|
|
@ -610,7 +610,7 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
|
|
|
|
}
|
|
|
|
}
|
|
|
|
private static void DownCleanD1Recipe(int begin)
|
|
|
|
private static void DownCleanD1Recipe(int begin)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
List<RecipePlcView> recipePlcViews = GetClean(12);
|
|
|
|
List<RecipePlcView> recipePlcViews = GetClean(15);
|
|
|
|
List<Step> recipeSteps = GetCleanStep(10);
|
|
|
|
List<Step> recipeSteps = GetCleanStep(10);
|
|
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < recipePlcViews.Count(); i++)
|
|
|
|
for (int i = 0; i < recipePlcViews.Count(); i++)
|
|
|
@ -674,26 +674,26 @@ namespace Mesnac.Action.ChemicalWeighing.LjPlanning
|
|
|
|
private static void Dowd(int start, RecipePlcView view)
|
|
|
|
private static void Dowd(int start, RecipePlcView view)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int bin = start;
|
|
|
|
int bin = start;
|
|
|
|
PlcConnect.Instance.Write($"DB2104.{bin}.0", view.Bin);
|
|
|
|
PlcConnect.Instance.Write($"DB2108.{bin}.0", view.Bin);
|
|
|
|
int set = start + 2;
|
|
|
|
int set = start + 2;
|
|
|
|
PlcConnect.Instance.Write($"DB2104.{set}.0", view.Set);
|
|
|
|
PlcConnect.Instance.Write($"DB2108.{set}.0", view.Set);
|
|
|
|
int tolerance = start + 6;
|
|
|
|
int tolerance = start + 6;
|
|
|
|
PlcConnect.Instance.Write($"DB2104.{tolerance}.0", view.Tolerance);
|
|
|
|
PlcConnect.Instance.Write($"DB2108.{tolerance}.0", view.Tolerance);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static void DowSteps(int start, Step step)
|
|
|
|
private static void DowSteps(int start, Step step)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
int mixCode = start;
|
|
|
|
int mixCode = start;
|
|
|
|
var info= PlcConnect.Instance.Write($"DB2104.{mixCode}.0", step.MixCode);
|
|
|
|
var info= PlcConnect.Instance.Write($"DB2108.{mixCode}.0", step.MixCode);
|
|
|
|
int mixTime = start + 2;
|
|
|
|
int mixTime = start + 2;
|
|
|
|
PlcConnect.Instance.Write($"DB2104.{mixTime}.0", step.MixTime);
|
|
|
|
PlcConnect.Instance.Write($"DB2108.{mixTime}.0", step.MixTime);
|
|
|
|
|
|
|
|
|
|
|
|
int mixTemp = start + 4;
|
|
|
|
int mixTemp = start + 4;
|
|
|
|
PlcConnect.Instance.Write($"DB2104.{mixTemp}.0", step.MixTemp);
|
|
|
|
PlcConnect.Instance.Write($"DB2108.{mixTemp}.0", step.MixTemp);
|
|
|
|
int mixSpeed = start + 8;
|
|
|
|
int mixSpeed = start + 8;
|
|
|
|
|
|
|
|
|
|
|
|
PlcConnect.Instance.Write($"DB2104.{mixSpeed}.0", step.MixSpeed);
|
|
|
|
PlcConnect.Instance.Write($"DB2108.{mixSpeed}.0", step.MixSpeed);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|