using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Mesnac.Action.ChemicalWeighing.LjMixManager
{
public class LjMixManagerPlc
{
///
/// 干混机1
///
///
///
public static void DownD1Recipe(List recipePlcViews, List 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 recipePlcViews, List 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 recipePlcViews, List 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 recipePlcViews, List 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 recipePlcViews,List reShui,List 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.WaterSCRecip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCRecip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCRecip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCRecip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCRecip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCRecip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep0_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep0_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep0_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep0_mixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep1_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep1_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep1_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep1_mixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep2_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep2_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep2_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep2_mixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep3_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep3_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep3_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep3_mixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep4_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep4_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep4_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep4_mixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep5_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep5_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep5_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep5_mixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep6_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep6_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep6_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep6_mixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep7_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep7_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep7_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep7_mixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep8_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep8_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep8_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep8_mixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep9_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSCStep9_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep9_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSCStep9_mixSpeed, view.MixSpeed);
}
}
}
public static void DownG2Recipe(List recipePlcViews, List reShui,
List 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.WaterSC_B_Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step0_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step0_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step0_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step0_mixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step1_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step1_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step1_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step1_mixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step2_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step2_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step2_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step2_mixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step3_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step3_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step3_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step3_mixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step4_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step4_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step4_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step4_mixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step5_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step5_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step5_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step5_mixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step6_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step6_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step6_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step6_mixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step7_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step7_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step7_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step7_mixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step8_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step8_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step8_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step8_mixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step9_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_B_Step9_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step9_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_B_Step9_mixSpeed, view.MixSpeed);
}
}
}
public static void DownG3Recipe(List recipePlcViews, List reShui,
List recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelat_G3Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G3Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G3Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelat_G3Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G3Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G3Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < reShui.Count(); i++)
{
var view = reShui[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step0_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step0_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step0_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step0_mixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step1_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step1_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step1_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step1_mixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step2_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step2_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step2_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step2_mixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step3_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step3_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step3_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step3_mixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step4_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step4_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step4_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step4_mixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step5_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step5_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step5_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step5_mixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step6_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step6_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step6_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step6_mixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step7_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step7_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step7_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step7_mixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step8_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step8_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step8_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step8_mixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step9_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_C_Step9_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step9_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_C_Step9_mixSpeed, view.MixSpeed);
}
}
}
public static void DownG4Recipe(List recipePlcViews, List reShui,
List recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelat_G4Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G4Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G4Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelat_G4Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G4Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G4Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < reShui.Count(); i++)
{
var view = reShui[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step0_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step0_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step0_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step0_mixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step1_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step1_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step1_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step1_mixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step2_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step2_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step2_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step2_mixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step3_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step3_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step3_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step3_mixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step4_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step4_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step4_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step4_mixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step5_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step5_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step5_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step5_mixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step6_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step6_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step6_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step6_mixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step7_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step7_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step7_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step7_mixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step8_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step8_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step8_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step8_mixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step9_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_D_Step9_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step9_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_D_Step9_mixSpeed, view.MixSpeed);
}
}
}
public static void DownG5Recipe(List recipePlcViews, List reShui,
List recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelat_G5Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G5Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G5Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelat_G5Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G5Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G5Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < reShui.Count(); i++)
{
var view = reShui[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step0_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step0_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step0_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step0_mixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step1_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step1_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step1_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step1_mixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step2_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step2_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step2_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step2_mixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step3_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step3_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step3_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step3_mixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step4_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step4_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step4_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step4_mixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step5_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step5_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step5_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step5_mixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step6_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step6_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step6_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step6_mixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step7_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step7_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step7_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step7_mixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step8_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step8_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step8_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step8_mixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step9_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G5_RD_Step9_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step9_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G5_RD_Step9_mixSpeed, view.MixSpeed);
}
}
}
public static void DownG6Recipe(List recipePlcViews, List reShui,
List recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelat_G6Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G6Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G6Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelat_G6Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G6Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G6Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < reShui.Count(); i++)
{
var view = reShui[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step0_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step0_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step0_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step0_mixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step1_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step1_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step1_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step1_mixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step2_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step2_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step2_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step2_mixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step3_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step3_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step3_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step3_mixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step4_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step4_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step4_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step4_mixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step5_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step5_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step5_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step5_mixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step6_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step6_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step6_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step6_mixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step7_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step7_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step7_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step7_mixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step8_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step8_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step8_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step8_mixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step9_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G6_RD_Step9_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step9_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G6_RD_Step9_mixSpeed, view.MixSpeed);
}
}
}
public static void DownG7Recipe(List recipePlcViews, List reShui,
List recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelat_G7Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G7Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G7Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelat_G7Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G7Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G7Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < reShui.Count(); i++)
{
var view = reShui[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step0_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step0_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step0_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step0_mixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step1_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step1_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step1_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step1_mixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step2_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step2_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step2_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step2_mixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step3_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step3_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step3_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step3_mixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step4_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step4_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step4_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step4_mixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step5_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step5_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step5_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step5_mixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step6_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step6_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step6_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step6_mixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step7_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step7_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step7_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step7_mixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step8_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step8_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step8_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step8_mixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step9_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G7_RD_Step9_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step9_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G7_RD_Step9_mixSpeed, view.MixSpeed);
}
}
}
public static void DownG8Recipe(List recipePlcViews, List reShui,
List recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipePlcViews.Count(); i++)
{
var view = recipePlcViews[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelat_G8Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G8Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G8Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Gelat_G8Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G8Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Gelat_G8Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < reShui.Count(); i++)
{
var view = reShui[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Recip0_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Recip0_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Recip0_Tolerance, view.TolErance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Recip1_Bin, new object[]
{
view.Bin
});
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Recip1_Set,
view.Set);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Recip1_Tolerance, view.TolErance);
}
}
for (int i = 0; i < recipeSteps.Count(); i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step0_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step0_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step0_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step0_mixSpeed, view.MixSpeed);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step1_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step1_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step1_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step1_mixSpeed, view.MixSpeed);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step2_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step2_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step2_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step2_mixSpeed, view.MixSpeed);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step3_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step3_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step3_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step3_mixSpeed, view.MixSpeed);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step4_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step4_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step4_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step4_mixSpeed, view.MixSpeed);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step5_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step5_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step5_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step5_mixSpeed, view.MixSpeed);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step6_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step6_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step6_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step6_mixSpeed, view.MixSpeed);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step7_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step7_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step7_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step7_mixSpeed, view.MixSpeed);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step8_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step8_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step8_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step8_mixSpeed, view.MixSpeed);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step9_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.WaterSC_G8_RD_Step9_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step9_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.WaterSC_G8_RD_Step9_mixSpeed, view.MixSpeed);
}
}
}
public static void DownM1Recipe(List recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipeSteps.Count; i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step0_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step0_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step0_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step0_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step0_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step0_tolerance, view.Tolerance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step1_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step1_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step1_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step1_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step1_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step1_tolerance, view.Tolerance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step2_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step2_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step2_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step2_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step2_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step2_tolerance, view.Tolerance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step3_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step3_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step3_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step3_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step3_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step3_tolerance, view.Tolerance);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step4_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step4_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step4_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step4_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step4_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step4_tolerance, view.Tolerance);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step5_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step5_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step5_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step5_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step5_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step5_tolerance, view.Tolerance);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step6_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step6_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step6_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step6_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step6_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step6_tolerance, view.Tolerance);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step7_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step7_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step7_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step7_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step7_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step7_tolerance, view.Tolerance);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step8_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step8_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step8_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step8_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step8_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step8_tolerance, view.Tolerance);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step9_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M1Step9_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step9_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step9_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step9_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M1Step9_tolerance, view.Tolerance);
}
}
}
public static void DownM2Recipe(List recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipeSteps.Count; i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step0_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step0_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step0_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step0_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step0_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step0_tolerance, view.Tolerance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step1_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step1_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step1_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step1_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step1_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step1_tolerance, view.Tolerance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step2_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step2_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step2_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step2_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step2_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step2_tolerance, view.Tolerance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step3_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step3_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step3_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step3_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step3_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step3_tolerance, view.Tolerance);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step4_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step4_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step4_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step4_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step4_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step4_tolerance, view.Tolerance);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step5_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step5_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step5_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step5_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step5_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step5_tolerance, view.Tolerance);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step6_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step6_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step6_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step6_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step6_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step6_tolerance, view.Tolerance);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step7_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step7_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step7_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step7_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step7_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step7_tolerance, view.Tolerance);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step8_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step8_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step8_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step8_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step8_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step8_tolerance, view.Tolerance);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step9_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M2Step9_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step9_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step9_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step9_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M2Step9_tolerance, view.Tolerance);
}
}
}
public static void DownM3Recipe(List recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipeSteps.Count; i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step0_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step0_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step0_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step0_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step0_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step0_tolerance, view.Tolerance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step1_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step1_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step1_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step1_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step1_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step1_tolerance, view.Tolerance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step2_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step2_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step2_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step2_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step2_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step2_tolerance, view.Tolerance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step3_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step3_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step3_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step3_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step3_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step3_tolerance, view.Tolerance);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step4_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step4_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step4_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step4_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step4_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step4_tolerance, view.Tolerance);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step5_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step5_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step5_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step5_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step5_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step5_tolerance, view.Tolerance);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step6_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step6_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step6_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step6_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step6_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step6_tolerance, view.Tolerance);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step7_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step7_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step7_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step7_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step7_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step7_tolerance, view.Tolerance);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step8_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step8_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step8_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step8_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step8_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step8_tolerance, view.Tolerance);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step9_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M3Step9_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step9_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step9_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step9_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M3Step9_tolerance, view.Tolerance);
}
}
}
public static void DownM4Recipe(List recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipeSteps.Count; i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step0_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step0_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step0_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step0_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step0_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step0_tolerance, view.Tolerance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step1_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step1_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step1_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step1_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step1_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step1_tolerance, view.Tolerance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step2_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step2_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step2_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step2_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step2_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step2_tolerance, view.Tolerance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step3_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step3_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step3_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step3_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step3_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step3_tolerance, view.Tolerance);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step4_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step4_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step4_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step4_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step4_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step4_tolerance, view.Tolerance);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step5_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step5_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step5_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step5_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step5_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step5_tolerance, view.Tolerance);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step6_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step6_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step6_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step6_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step6_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step6_tolerance, view.Tolerance);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step7_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step7_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step7_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step7_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step7_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step7_tolerance, view.Tolerance);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step8_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step8_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step8_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step8_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step8_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step8_tolerance, view.Tolerance);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step9_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M4Step9_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step9_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step9_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step9_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M4Step9_tolerance, view.Tolerance);
}
}
}
public static void DownM5Recipe(List recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipeSteps.Count; i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step0_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step0_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step0_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step0_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step0_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step0_tolerance, view.Tolerance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step1_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step1_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step1_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step1_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step1_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step1_tolerance, view.Tolerance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step2_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step2_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step2_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step2_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step2_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step2_tolerance, view.Tolerance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step3_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step3_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step3_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step3_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step3_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step3_tolerance, view.Tolerance);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step4_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step4_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step4_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step4_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step4_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step4_tolerance, view.Tolerance);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step5_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step5_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step5_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step5_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step5_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step5_tolerance, view.Tolerance);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step6_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step6_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step6_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step6_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step6_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step6_tolerance, view.Tolerance);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step7_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step7_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step7_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step7_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step7_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step7_tolerance, view.Tolerance);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step8_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step8_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step8_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step8_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step8_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step8_tolerance, view.Tolerance);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step9_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M5Step9_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step9_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step9_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step9_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M5Step9_tolerance, view.Tolerance);
}
}
}
public static void DownM6Recipe(List recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipeSteps.Count; i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step0_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step0_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step0_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step0_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step0_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step0_tolerance, view.Tolerance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step1_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step1_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step1_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step1_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step1_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step1_tolerance, view.Tolerance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step2_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step2_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step2_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step2_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step2_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step2_tolerance, view.Tolerance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step3_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step3_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step3_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step3_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step3_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step3_tolerance, view.Tolerance);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step4_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step4_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step4_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step4_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step4_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step4_tolerance, view.Tolerance);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step5_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step5_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step5_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step5_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step5_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step5_tolerance, view.Tolerance);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step6_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step6_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step6_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step6_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step6_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step6_tolerance, view.Tolerance);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step7_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step7_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step7_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step7_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step7_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step7_tolerance, view.Tolerance);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step8_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step8_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step8_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step8_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step8_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step8_tolerance, view.Tolerance);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step9_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M6Step9_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step9_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step9_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step9_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M6Step9_tolerance, view.Tolerance);
}
}
}
public static void DownM7Recipe(List recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipeSteps.Count; i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step0_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step0_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step0_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step0_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step0_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step0_tolerance, view.Tolerance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step1_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step1_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step1_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step1_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step1_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step1_tolerance, view.Tolerance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step2_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step2_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step2_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step2_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step2_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step2_tolerance, view.Tolerance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step3_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step3_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step3_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step3_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step3_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step3_tolerance, view.Tolerance);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step4_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step4_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step4_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step4_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step4_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step4_tolerance, view.Tolerance);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step5_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step5_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step5_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step5_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step5_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step5_tolerance, view.Tolerance);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step6_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step6_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step6_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step6_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step6_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step6_tolerance, view.Tolerance);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step7_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step7_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step7_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step7_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step7_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step7_tolerance, view.Tolerance);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step8_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step8_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step8_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step8_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step8_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step8_tolerance, view.Tolerance);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step9_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M7Step9_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step9_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step9_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step9_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M7Step9_tolerance, view.Tolerance);
}
}
}
public static void DownM8Recipe(List recipeSteps)
{
var basePlcHelper = BasePlcHelper.Instance;
for (int i = 0; i < recipeSteps.Count; i++)
{
var view = recipeSteps[i];
if (i == 0)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step0_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step0_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step0_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step0_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step0_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step0_tolerance, view.Tolerance);
}
if (i == 1)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step1_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step1_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step1_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step1_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step1_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step1_tolerance, view.Tolerance);
}
if (i == 2)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step2_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step2_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step2_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step2_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step2_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step2_tolerance, view.Tolerance);
}
if (i == 3)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step3_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step3_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step3_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step3_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step3_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step3_tolerance, view.Tolerance);
}
if (i == 4)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step4_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step4_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step4_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step4_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step4_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step4_tolerance, view.Tolerance);
}
if (i == 5)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step5_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step5_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step5_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step5_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step5_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step5_tolerance, view.Tolerance);
}
if (i == 6)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step6_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step6_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step6_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step6_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step6_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step6_tolerance, view.Tolerance);
}
if (i == 7)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step7_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step7_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step7_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step7_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step7_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step7_tolerance, view.Tolerance);
}
if (i == 8)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step8_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step8_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step8_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step8_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step8_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step8_tolerance, view.Tolerance);
}
if (i == 9)
{
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step9_mixCode,
new object[] { view.MixCode });
basePlcHelper.PlcWriteByDataKey(basePlcHelper.Weter_M8Step9_mixTime,
new object[] { view.MixTime });
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step9_mixTemp, view.MixTemp);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step9_mixSpeed, view.MixSpeed);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step9_setValue, view.SetValue);
basePlcHelper.PlcWriteFloatByDataKey(basePlcHelper.Weter_M8Step9_tolerance, view.Tolerance);
}
}
}
}
}