|
|
@@ -3723,7 +3723,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
materialType = result.materialCollection[i], |
|
|
|
materialId = result.RecipeId |
|
|
|
}); |
|
|
|
RollerThreeDataWrite(i, result.materialCollection[i].MaterialLoc, (ushort)(result.materialCollection[i].MaterialWeight + RollerNetweight), result.materialCollection[i].MaterialOffset);//3号滚筒线桶号以及重量数据、偏差量下发 |
|
|
|
RollerThreeDataWrite(i, result.materialCollection[i].MaterialLoc, (ushort)(result.materialCollection[i].MaterialWeight + RollerNetweight), result.materialCollection[i].MaterialOffset * 10);//3号滚筒线桶号以及重量数据、偏差量下发 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -3930,7 +3930,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
materialType = result.materialCollection[i], |
|
|
|
materialId = result.RecipeId |
|
|
|
}); |
|
|
|
RollerTwoDataWrite(i, result.materialCollection[i].MaterialLoc, (ushort)(result.materialCollection[i].MaterialWeight + RollerNetweight), result.materialCollection[i].MaterialOffset);//2号滚筒线桶号以及重量、偏差量数据下发 |
|
|
|
RollerTwoDataWrite(i, result.materialCollection[i].MaterialLoc, (ushort)(result.materialCollection[i].MaterialWeight + RollerNetweight), result.materialCollection[i].MaterialOffset*10);//2号滚筒线桶号以及重量、偏差量数据下发 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -4156,7 +4156,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
materialType = result.materialCollection[i], |
|
|
|
materialId = result.RecipeId |
|
|
|
}); |
|
|
|
RollerOneDataWrite(i, result.materialCollection[i].MaterialLoc, (ushort)(result.materialCollection[i].MaterialWeight + RollerNetweight), result.materialCollection[i].MaterialOffset);//1号滚筒线桶号以及重量、偏差量数据下发 |
|
|
|
RollerOneDataWrite(i, result.materialCollection[i].MaterialLoc, (ushort)(result.materialCollection[i].MaterialWeight + RollerNetweight), result.materialCollection[i].MaterialOffset*10);//1号滚筒线桶号以及重量、偏差量数据下发 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -6382,23 +6382,23 @@ namespace FryPot_DosingSystem.Control |
|
|
|
DeviceOperate.GetInstance.WriteRealPlcData("D1244", 0.0F); |
|
|
|
DeviceOperate.GetInstance.WriteRealPlcData("D1246", 0.0F); |
|
|
|
} |
|
|
|
/// <summary> |
|
|
|
/// 累加重量计算 |
|
|
|
/// </summary> |
|
|
|
/// <param name="collect"></param> |
|
|
|
public ushort SumAllTargetWeight(ObservableCollection<FlowProcessModel> collect,int length) |
|
|
|
{ |
|
|
|
ushort total = 0; |
|
|
|
if (collect.Count >= length) |
|
|
|
{ |
|
|
|
for (int i = 0; i < length; i++) |
|
|
|
{ |
|
|
|
total += collect.ElementAt(i).TargeWeight; |
|
|
|
///// <summary> |
|
|
|
///// 累加重量计算 |
|
|
|
///// </summary> |
|
|
|
///// <param name="collect"></param> |
|
|
|
//public ushort SumAllTargetWeight(ObservableCollection<FlowProcessModel> collect,int length) |
|
|
|
//{ |
|
|
|
// ushort total = 0; |
|
|
|
// if (collect.Count >= length) |
|
|
|
// { |
|
|
|
// for (int i = 0; i < length; i++) |
|
|
|
// { |
|
|
|
// total += collect.ElementAt(i).TargeWeight; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
return total; |
|
|
|
} |
|
|
|
// } |
|
|
|
// } |
|
|
|
// return total; |
|
|
|
//} |
|
|
|
|
|
|
|
|
|
|
|
/// <summary> |
|
|
@@ -6414,6 +6414,8 @@ namespace FryPot_DosingSystem.Control |
|
|
|
#region 炒锅工艺下发 |
|
|
|
int length = 0; |
|
|
|
WritePotData(potNum,"D3920",Convert.ToUInt16(result.FlowProcess.targetWeightOffset*10));//目标重量偏差下发 |
|
|
|
|
|
|
|
WritePotData(potNum, "D3143", Convert.ToUInt16(result.FlowProcess.StirTime));//秘制配方搅拌时间下发 |
|
|
|
if (result.FlowProcess.fpModels.FirstOrDefault(p => p.FryMaterialNum == "清洗") != null) |
|
|
|
{ |
|
|
|
WritePotData(potNum, "D3120", Convert.ToUInt16(result.FlowProcess.fpModels.Count - 1));//工序数量 |
|
|
@@ -6421,7 +6423,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
{ |
|
|
|
length = result.FlowProcess.fpModels.Count - 1; |
|
|
|
WritePotData(potNum, "D3112", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(result.FlowProcess.fpModels.Count - 1).FryTemperature * 10)); |
|
|
|
WritePotData(potNum, "D3113", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(result.FlowProcess.fpModels.Count - 1).FryPeriodTime * 600)); |
|
|
|
WritePotData(potNum, "D3113", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(result.FlowProcess.fpModels.Count - 1).FryPeriodTime)); |
|
|
|
WritePotData(potNum, "D3114", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(result.FlowProcess.fpModels.Count - 1).FryWeight * 10));//炒制重量 |
|
|
|
WritePotData(potNum, "D3115", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(result.FlowProcess.fpModels.Count - 1).SmallFirePercent)); |
|
|
|
WritePotData(potNum, "D3116", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(result.FlowProcess.fpModels.Count - 1).MidFirePercent)); |
|
|
@@ -6476,7 +6478,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
} |
|
|
|
|
|
|
|
WritePotData(potNum, "D3002", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryTemperature * 10)); |
|
|
|
WritePotData(potNum, "D3003", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime * 600)); |
|
|
|
WritePotData(potNum, "D3003", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime)); |
|
|
|
WritePotData(potNum, "D3005", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).SmallFirePercent)); |
|
|
|
WritePotData(potNum, "D3006", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).MidFirePercent)); |
|
|
|
WritePotData(potNum, "D3007", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).BigFirePercent)); |
|
|
@@ -6515,7 +6517,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
} |
|
|
|
|
|
|
|
WritePotData(potNum, "D3012", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryTemperature * 10)); |
|
|
|
WritePotData(potNum, "D3013", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime * 600)); |
|
|
|
WritePotData(potNum, "D3013", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime)); |
|
|
|
WritePotData(potNum, "D3015", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).SmallFirePercent)); |
|
|
|
WritePotData(potNum, "D3016", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).MidFirePercent)); |
|
|
|
WritePotData(potNum, "D3017", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).BigFirePercent)); |
|
|
@@ -6554,7 +6556,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
} |
|
|
|
|
|
|
|
WritePotData(potNum, "D3022", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryTemperature * 10)); |
|
|
|
WritePotData(potNum, "D3023", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime * 600)); |
|
|
|
WritePotData(potNum, "D3023", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime)); |
|
|
|
WritePotData(potNum, "D3025", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).SmallFirePercent)); |
|
|
|
WritePotData(potNum, "D3026", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).MidFirePercent)); |
|
|
|
WritePotData(potNum, "D3027", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).BigFirePercent)); |
|
|
@@ -6593,7 +6595,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
} |
|
|
|
|
|
|
|
WritePotData(potNum, "D3032", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryTemperature * 10)); |
|
|
|
WritePotData(potNum, "D3033", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime * 600)); |
|
|
|
WritePotData(potNum, "D3033", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime)); |
|
|
|
WritePotData(potNum, "D3035", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).SmallFirePercent)); |
|
|
|
WritePotData(potNum, "D3036", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).MidFirePercent)); |
|
|
|
WritePotData(potNum, "D3037", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).BigFirePercent)); |
|
|
@@ -6632,7 +6634,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
} |
|
|
|
|
|
|
|
WritePotData(potNum, "D3042", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryTemperature * 10)); |
|
|
|
WritePotData(potNum, "D3043", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime * 600)); |
|
|
|
WritePotData(potNum, "D3043", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime)); |
|
|
|
WritePotData(potNum, "D3045", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).SmallFirePercent)); |
|
|
|
WritePotData(potNum, "D3046", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).MidFirePercent)); |
|
|
|
WritePotData(potNum, "D3047", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).BigFirePercent)); |
|
|
@@ -6671,7 +6673,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
} |
|
|
|
|
|
|
|
WritePotData(potNum, "D3052", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryTemperature * 10)); |
|
|
|
WritePotData(potNum, "D3053", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime * 600)); |
|
|
|
WritePotData(potNum, "D3053", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime)); |
|
|
|
WritePotData(potNum, "D3055", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).SmallFirePercent)); |
|
|
|
WritePotData(potNum, "D3056", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).MidFirePercent)); |
|
|
|
WritePotData(potNum, "D3057", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).BigFirePercent)); |
|
|
@@ -6710,7 +6712,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
} |
|
|
|
|
|
|
|
WritePotData(potNum, "D3062", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryTemperature * 10)); |
|
|
|
WritePotData(potNum, "D3063", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime * 600)); |
|
|
|
WritePotData(potNum, "D3063", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime)); |
|
|
|
WritePotData(potNum, "D3065", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).SmallFirePercent)); |
|
|
|
WritePotData(potNum, "D3066", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).MidFirePercent)); |
|
|
|
WritePotData(potNum, "D3067", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).BigFirePercent)); |
|
|
@@ -6749,7 +6751,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
} |
|
|
|
|
|
|
|
WritePotData(potNum, "D3072", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryTemperature * 10)); |
|
|
|
WritePotData(potNum, "D3073", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime * 600)); |
|
|
|
WritePotData(potNum, "D3073", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime)); |
|
|
|
WritePotData(potNum, "D3075", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).SmallFirePercent)); |
|
|
|
WritePotData(potNum, "D3076", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).MidFirePercent)); |
|
|
|
WritePotData(potNum, "D3077", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).BigFirePercent)); |
|
|
@@ -6788,7 +6790,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
} |
|
|
|
|
|
|
|
WritePotData(potNum, "D3082", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryTemperature * 10)); |
|
|
|
WritePotData(potNum, "D3083", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime * 600)); |
|
|
|
WritePotData(potNum, "D3083", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime)); |
|
|
|
WritePotData(potNum, "D3085", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).SmallFirePercent)); |
|
|
|
WritePotData(potNum, "D3086", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).MidFirePercent)); |
|
|
|
WritePotData(potNum, "D3087", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).BigFirePercent)); |
|
|
@@ -6826,7 +6828,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
} |
|
|
|
|
|
|
|
WritePotData(potNum, "D3092", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryTemperature * 10)); |
|
|
|
WritePotData(potNum, "D3093", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime * 600)); |
|
|
|
WritePotData(potNum, "D3093", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime)); |
|
|
|
WritePotData(potNum, "D3095", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).SmallFirePercent)); |
|
|
|
WritePotData(potNum, "D3096", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).MidFirePercent)); |
|
|
|
WritePotData(potNum, "D3097", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).BigFirePercent)); |
|
|
@@ -6865,7 +6867,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
} |
|
|
|
|
|
|
|
WritePotData(potNum, "D3102", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryTemperature * 10)); |
|
|
|
WritePotData(potNum, "D3103", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime * 600)); |
|
|
|
WritePotData(potNum, "D3103", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime)); |
|
|
|
|
|
|
|
WritePotData(potNum, "D3105", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).SmallFirePercent)); |
|
|
|
WritePotData(potNum, "D3106", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).MidFirePercent)); |
|
|
@@ -6905,7 +6907,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
if (result.FlowProcess.fpModels.ElementAt(i).FryMaterialNum == "清洗") |
|
|
|
{ |
|
|
|
WritePotData(potNum, "D3112", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryTemperature * 10)); |
|
|
|
WritePotData(potNum, "D3113", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime * 600)); |
|
|
|
WritePotData(potNum, "D3113", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryPeriodTime)); |
|
|
|
WritePotData(potNum, "D3114", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).FryWeight * 10));//炒制重量 |
|
|
|
WritePotData(potNum, "D3115", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).SmallFirePercent)); |
|
|
|
WritePotData(potNum, "D3116", Convert.ToUInt16(result.FlowProcess.fpModels.ElementAt(i).MidFirePercent)); |
|
|
@@ -6997,7 +6999,7 @@ namespace FryPot_DosingSystem.Control |
|
|
|
#endregion |
|
|
|
WritePotData(PotNum, "D3120", 0); |
|
|
|
WritePotData(PotNum,"D3920",0);//目标重量清零 |
|
|
|
|
|
|
|
WritePotData(PotNum, "D3143", 0);//秘制配方搅拌时间清零 |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|