You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lj_plc/Actions/ChemicalWeighing/Mesnac.Action.ChemicalWeighing/LjMixManager/LjMixManagerPlc.cs

3450 lines
168 KiB
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Mesnac.Action.ChemicalWeighing.LjMixManager
{
public class LjMixManagerPlc
{
/// <summary>
/// 干混机1
/// </summary>
/// <param name="recipePlcViews"></param>
/// <param name="recipeSteps"></param>
public static void DownD1Recipe(List<RecipePlcView> recipePlcViews, List<Step> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Recip0_Bin,
new object[] { view.Bin });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Recip1_Bin,
new object[] { view.Bin });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip1_Tolerance, view.TolErance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Recip2_Bin,
new object[] { view.Bin });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip2_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip2_Tolerance, view.TolErance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Recip3_Bin,
new object[] { view.Bin });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip3_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip3_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step0_MixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step1_MixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step2_MixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step3_MixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step4_MixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step5_MixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step6_MixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step7_MixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step8_MixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Step9_MixSpeed, view.MixSpeed);
}
}
}
public static void DownD2Recipe(List<RecipePlcView> recipePlcViews, List<Step> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Recip0_Bin,
new object[] { view.Bin });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Recip0_Tolerance, view.TolErance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Recip2_Bin,
new object[] { view.Bin });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Recip2_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Recip2_Tolerance, view.TolErance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Recip2_Bin,
new object[] { view.Bin });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Recip2_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Recip2_Tolerance, view.TolErance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Recip3_Bin,
new object[] { view.Bin });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Recip3_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Recip3_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step0_MixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step2_MixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step2_MixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step3_MixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step4_MixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step5_MixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step6_MixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step7_MixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step8_MixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step9_MixSpeed, view.MixSpeed);
}
}
}
public static void DownD3Recipe(List<RecipePlcView> recipePlcViews, List<Step> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Recip0_Bin,
new object[] { view.Bin });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Recip1_Bin,
new object[] { view.Bin });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip1_Tolerance, view.TolErance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Recip2_Bin,
new object[] { view.Bin });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip2_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip2_Tolerance, view.TolErance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Recip3_Bin,
new object[] { view.Bin });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip3_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip3_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step0_MixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step1_MixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step2_MixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step3_MixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step4_MixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step5_MixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step6_MixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step7_MixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step8_MixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step9_MixSpeed, view.MixSpeed);
}
}
}
public static void DownD4Recipe(List<RecipePlcView> recipePlcViews, List<Step> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Recip0_Bin,
new object[] { view.Bin });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Recip1_Bin,
new object[] { view.Bin });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip1_Tolerance, view.TolErance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Recip2_Bin,
new object[] { view.Bin });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip2_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip2_Tolerance, view.TolErance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD1Recip3_Bin,
new object[] { view.Bin });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip3_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD1Recip3_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step0_MixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step1_MixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step2_MixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step3_MixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step4_MixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step5_MixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step6_MixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step7_MixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step8_MixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.DryerD2Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.DryerD2Step9_MixSpeed, view.MixSpeed);
}
}
}
public static void DownG1Recipe(List<RecipePlcView> recipePlcViews,List<RecipePlcView> reShui,List<Step> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.GelatG1Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG1Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG1Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.GelatG1Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG1Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG1Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < reShui.Count(); i++)
{
var view = reShui[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step0_MixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step1_MixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step2_MixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step3_MixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step4_MixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step5_MixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step6_MixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step7_MixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step8_MixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG1Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG1Step9_MixSpeed, view.MixSpeed);
}
}
}
public static void DownG2Recipe(List<RecipePlcView> recipePlcViews, List<RecipePlcView> reShui,
List<Step> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.GelatG2Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG2Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG2Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.GelatG2Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG2Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG2Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < reShui.Count(); i++)
{
var view = reShui[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step0_MixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step1_MixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step2_MixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step3_MixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step4_MixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step5_MixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step6_MixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step7_MixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step8_MixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG2Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG2Step9_MixSpeed, view.MixSpeed);
}
}
}
public static void DownG3Recipe(List<RecipePlcView> recipePlcViews, List<RecipePlcView> reShui,
List<Step> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.GelatG3Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG3Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG3Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.GelatG3Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG3Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG3Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < reShui.Count(); i++)
{
var view = reShui[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step0_MixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step1_MixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step2_MixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step3_MixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step4_MixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step5_MixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step6_MixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step7_MixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step8_MixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG3Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG3Step9_MixSpeed, view.MixSpeed);
}
}
}
public static void DownG4Recipe(List<RecipePlcView> recipePlcViews, List<RecipePlcView> reShui,
List<Step> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.GelatG4Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG4Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG4Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.GelatG4Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG4Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG4Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < reShui.Count(); i++)
{
var view = reShui[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step0_MixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step1_MixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step2_MixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step3_MixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step4_MixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step5_MixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step6_MixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step7_MixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step8_MixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG4Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG4Step9_MixSpeed, view.MixSpeed);
}
}
}
public static void DownG5Recipe(List<RecipePlcView> recipePlcViews, List<RecipePlcView> reShui,
List<Step> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.GelatG5Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG5Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG5Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.GelatG5Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG5Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG5Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < reShui.Count(); i++)
{
var view = reShui[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step0_MixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step1_MixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step2_MixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step3_MixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step4_MixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step5_MixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step6_MixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step7_MixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step8_MixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG5Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG5Step9_MixSpeed, view.MixSpeed);
}
}
}
public static void DownG6Recipe(List<RecipePlcView> recipePlcViews, List<RecipePlcView> reShui,
List<Step> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.GelatG6Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG6Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG6Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.GelatG6Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG6Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG6Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < reShui.Count(); i++)
{
var view = reShui[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step0_MixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step1_MixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step2_MixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step3_MixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step4_MixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step5_MixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step6_MixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step7_MixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step8_MixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG6Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG6Step9_MixSpeed, view.MixSpeed);
}
}
}
public static void DownG7Recipe(List<RecipePlcView> recipePlcViews, List<RecipePlcView> reShui,
List<Step> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.GelatG7Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG7Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG7Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.GelatG7Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG7Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG7Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < reShui.Count(); i++)
{
var view = reShui[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step0_MixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step1_MixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step2_MixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step3_MixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step4_MixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step5_MixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step6_MixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step7_MixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step8_MixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG7Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG7Step9_MixSpeed, view.MixSpeed);
}
}
}
public static void DownG8Recipe(List<RecipePlcView> recipePlcViews, List<RecipePlcView> reShui,
List<Step> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.GelatG8Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG8Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG8Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.GelatG8Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG8Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.GelatG8Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < reShui.Count(); i++)
{
var view = reShui[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step0_MixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step1_MixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step2_MixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step3_MixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step4_MixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step5_MixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step6_MixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step7_MixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step8_MixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCG8Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCG8Step9_MixSpeed, view.MixSpeed);
}
}
}
public static void DownM1Recipe(List<MixStep> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipeSteps.Count; i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step0_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step0_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step0_Tolerance, view.Tolerance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step1_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step1_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step1_Tolerance, view.Tolerance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step2_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step2_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step2_Tolerance, view.Tolerance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step3_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step3_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step3_Tolerance, view.Tolerance);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step4_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step4_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step4_Tolerance, view.Tolerance);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step5_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step5_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step5_Tolerance, view.Tolerance);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step6_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step6_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step6_Tolerance, view.Tolerance);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step7_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step7_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step7_Tolerance, view.Tolerance);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step8_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step8_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step8_Tolerance, view.Tolerance);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM1Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step9_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step9_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM1Step9_Tolerance, view.Tolerance);
}
}
}
public static void DownM2Recipe(List<MixStep> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipeSteps.Count; i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step0_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step0_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step0_Tolerance, view.Tolerance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step1_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step1_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step1_Tolerance, view.Tolerance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step2_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step2_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step2_Tolerance, view.Tolerance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step3_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step3_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step3_Tolerance, view.Tolerance);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step4_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step4_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step4_Tolerance, view.Tolerance);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step5_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step5_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step5_Tolerance, view.Tolerance);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step6_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step6_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step6_Tolerance, view.Tolerance);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step7_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step7_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step7_Tolerance, view.Tolerance);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step8_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step8_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step8_Tolerance, view.Tolerance);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM2Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step9_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step9_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM2Step9_Tolerance, view.Tolerance);
}
}
}
public static void DownM3Recipe(List<MixStep> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipeSteps.Count; i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step0_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step0_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step0_Tolerance, view.Tolerance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step1_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step1_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step1_Tolerance, view.Tolerance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step2_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step2_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step2_Tolerance, view.Tolerance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step3_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step3_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step3_Tolerance, view.Tolerance);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step4_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step4_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step4_Tolerance, view.Tolerance);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step5_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step5_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step5_Tolerance, view.Tolerance);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step6_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step6_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step6_Tolerance, view.Tolerance);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step7_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step7_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step7_Tolerance, view.Tolerance);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step8_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step8_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step8_Tolerance, view.Tolerance);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM3Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step9_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step9_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM3Step9_Tolerance, view.Tolerance);
}
}
}
public static void DownM4Recipe(List<MixStep> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipeSteps.Count; i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step0_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step0_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step0_Tolerance, view.Tolerance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step1_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step1_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step1_Tolerance, view.Tolerance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step2_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step2_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step2_Tolerance, view.Tolerance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step3_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step3_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step3_Tolerance, view.Tolerance);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step4_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step4_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step4_Tolerance, view.Tolerance);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step5_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step5_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step5_Tolerance, view.Tolerance);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step6_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step6_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step6_Tolerance, view.Tolerance);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step7_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step7_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step7_Tolerance, view.Tolerance);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step8_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step8_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step8_Tolerance, view.Tolerance);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM4Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step9_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step9_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM4Step9_Tolerance, view.Tolerance);
}
}
}
public static void DownM5Recipe(List<MixStep> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipeSteps.Count; i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step0_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step0_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step0_Tolerance, view.Tolerance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step1_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step1_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step1_Tolerance, view.Tolerance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step2_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step2_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step2_Tolerance, view.Tolerance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step3_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step3_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step3_Tolerance, view.Tolerance);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step4_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step4_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step4_Tolerance, view.Tolerance);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step5_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step5_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step5_Tolerance, view.Tolerance);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step6_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step6_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step6_Tolerance, view.Tolerance);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step7_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step7_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step7_Tolerance, view.Tolerance);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step8_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step8_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step8_Tolerance, view.Tolerance);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM5Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step9_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step9_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM5Step9_Tolerance, view.Tolerance);
}
}
}
public static void DownM6Recipe(List<MixStep> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipeSteps.Count; i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step0_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step0_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step0_Tolerance, view.Tolerance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step1_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step1_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step1_Tolerance, view.Tolerance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step2_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step2_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step2_Tolerance, view.Tolerance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step3_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step3_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step3_Tolerance, view.Tolerance);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step4_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step4_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step4_Tolerance, view.Tolerance);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step5_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step5_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step5_Tolerance, view.Tolerance);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step6_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step6_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step6_Tolerance, view.Tolerance);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step7_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step7_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step7_Tolerance, view.Tolerance);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step8_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step8_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step8_Tolerance, view.Tolerance);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM6Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step9_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step9_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM6Step9_Tolerance, view.Tolerance);
}
}
}
public static void DownM7Recipe(List<MixStep> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipeSteps.Count; i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step0_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step0_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step0_Tolerance, view.Tolerance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step1_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step1_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step1_Tolerance, view.Tolerance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step2_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step2_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step2_Tolerance, view.Tolerance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step3_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step3_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step3_Tolerance, view.Tolerance);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step4_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step4_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step4_Tolerance, view.Tolerance);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step5_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step5_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step5_Tolerance, view.Tolerance);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step6_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step6_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step6_Tolerance, view.Tolerance);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step7_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step7_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step7_Tolerance, view.Tolerance);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step8_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step8_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step8_Tolerance, view.Tolerance);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM7Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step9_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step9_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM7Step9_Tolerance, view.Tolerance);
}
}
}
public static void DownM8Recipe(List<MixStep> recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipeSteps.Count; i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step0_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step0_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step0_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step0_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step0_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step0_Tolerance, view.Tolerance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step1_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step1_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step1_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step1_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step1_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step1_Tolerance, view.Tolerance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step2_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step2_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step2_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step2_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step2_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step2_Tolerance, view.Tolerance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step3_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step3_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step3_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step3_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step3_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step3_Tolerance, view.Tolerance);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step4_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step4_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step4_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step4_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step4_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step4_Tolerance, view.Tolerance);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step5_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step5_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step5_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step5_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step5_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step5_Tolerance, view.Tolerance);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step6_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step6_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step6_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step6_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step6_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step6_Tolerance, view.Tolerance);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step7_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step7_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step7_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step7_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step7_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step7_Tolerance, view.Tolerance);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step8_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step8_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step8_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step8_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step8_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step8_Tolerance, view.Tolerance);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step9_MixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WeterM8Step9_MixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step9_MixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step9_MixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step9_SetValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WeterM8Step9_Tolerance, view.Tolerance);
}
}
}
}
}