|
|
@@ -1179,7 +1179,7 @@ namespace TeamAAS_VP.Core
|
|
|
/// <summary>
|
|
|
/// 复检结果
|
|
|
/// </summary>
|
|
|
- string gapString = "";
|
|
|
+ Dictionary<string, string> gapDict = new Dictionary<string, string>();
|
|
|
/// <summary>
|
|
|
/// 二次定位相机的工具坐标
|
|
|
/// </summary>
|
|
|
@@ -2229,7 +2229,12 @@ namespace TeamAAS_VP.Core
|
|
|
SendTaskMessage($"流程3结果:{visionResults[2].distance}", MessageLevel.Debug);
|
|
|
SendTaskMessage($"流程4结果:{visionResults[3].distance}", MessageLevel.Debug);
|
|
|
|
|
|
- gapString = $"{visionResults[0].distance.Split(',')[1]},{visionResults[1].distance.Split(',')[1]},{visionResults[2].distance.Split(',')[1]},{visionResults[3].distance.Split(',')[1]}";
|
|
|
+ gapDict.Clear();
|
|
|
+ gapDict.Add("Gap1", visionResults[0].distance.Split(',')[1]);
|
|
|
+ gapDict.Add("Gap2", visionResults[1].distance.Split(',')[1]);
|
|
|
+ gapDict.Add("Gap3", visionResults[2].distance.Split(',')[1]);
|
|
|
+ gapDict.Add("Gap4", visionResults[3].distance.Split(',')[1]);
|
|
|
+ //gapString = $"{visionResults[0].distance.Split(',')[1]},{visionResults[1].distance.Split(',')[1]},{visionResults[2].distance.Split(',')[1]},{visionResults[3].distance.Split(',')[1]}";
|
|
|
await plc.WriteNodeAsync(addressConfig.Out_FixedCameracheckStatus.Address, (Int16)1);
|
|
|
return;
|
|
|
}
|
|
|
@@ -2253,7 +2258,12 @@ namespace TeamAAS_VP.Core
|
|
|
res4 = visionResults[3].distance.Split(',')[1];
|
|
|
}
|
|
|
SendTaskMessage($"固定相机检测NG", MessageLevel.Error);
|
|
|
- gapString = $"{res1},{res2},{res3},{res4}";
|
|
|
+ gapDict.Clear();
|
|
|
+ gapDict.Add("Gap1", res1);
|
|
|
+ gapDict.Add("Gap2", res2);
|
|
|
+ gapDict.Add("Gap3", res3);
|
|
|
+ gapDict.Add("Gap4", res4);
|
|
|
+ //gapString = $"{res1},{res2},{res3},{res4}";
|
|
|
await plc.WriteNodeAsync(addressConfig.Out_FixedCameracheckStatus.Address, (Int16)2);
|
|
|
return;
|
|
|
}
|
|
|
@@ -2816,10 +2826,9 @@ namespace TeamAAS_VP.Core
|
|
|
|
|
|
Dictionary<string, string> data = new Dictionary<string, string>();
|
|
|
|
|
|
- string gap = ""; string press = ""; string presstime = ""; string assypress = "";
|
|
|
+ string press = ""; string presstime = ""; string assypress = "";
|
|
|
if (i == 0)
|
|
|
{
|
|
|
- gap = gapString;
|
|
|
try
|
|
|
{
|
|
|
assypress = currentPressure[0].ToString("F2");
|
|
|
@@ -2837,9 +2846,9 @@ namespace TeamAAS_VP.Core
|
|
|
assypress = "0";
|
|
|
resultIndex = 2;
|
|
|
}
|
|
|
- data.Add("Gap1", gap);
|
|
|
+ data = gapDict;
|
|
|
data.Add("AssyPressure1", assypress);
|
|
|
- SendTaskMessage($"gap:{gap},组装压力:{assypress}", MessageLevel.Info);
|
|
|
+ SendTaskMessage($"Gap1:{gapDict["Gap1"]},Gap2:{gapDict["Gap2"]},Gap3:{gapDict["Gap3"]},Gap4:{gapDict["Gap4"]},组装压力:{assypress}", MessageLevel.Info);
|
|
|
#region 数据
|
|
|
bool assyPresRes;
|
|
|
if (currentPressure[0] >= currentProduct.GlobalParamEx.AssemblyPressure.PressureDownLimit && currentPressure[0] <= currentProduct.GlobalParamEx.AssemblyPressure.PressureUpLimit)
|
|
|
@@ -2849,20 +2858,37 @@ namespace TeamAAS_VP.Core
|
|
|
else assyPresRes = false;
|
|
|
DFC.Clear();
|
|
|
|
|
|
- int itemIndex = 0;
|
|
|
- var gaps = gap.Split(',');
|
|
|
- foreach (var item in gaps)
|
|
|
+ foreach (var item in gapDict)
|
|
|
{
|
|
|
- itemIndex++;
|
|
|
+ string upLimitValue = "" ,downLimitValue = "";
|
|
|
+ switch (item.Key)
|
|
|
+ {
|
|
|
+ case "Gap1":
|
|
|
+ upLimitValue = currentProduct.GlobalParamEx.Gap1UpLimit.ToString("F3");
|
|
|
+ downLimitValue = currentProduct.GlobalParamEx.Gap1DownLimit.ToString("F3");
|
|
|
+ break;
|
|
|
+ case "Gap2":
|
|
|
+ upLimitValue = currentProduct.GlobalParamEx.Gap2UpLimit.ToString("F3");
|
|
|
+ downLimitValue = currentProduct.GlobalParamEx.Gap2DownLimit.ToString("F3");
|
|
|
+ break;
|
|
|
+ case "Gap3":
|
|
|
+ upLimitValue = currentProduct.GlobalParamEx.Gap3UpLimit.ToString("F3");
|
|
|
+ downLimitValue = currentProduct.GlobalParamEx.Gap3DownLimit.ToString("F3");
|
|
|
+ break;
|
|
|
+ case "Gap4":
|
|
|
+ upLimitValue = currentProduct.GlobalParamEx.Gap4UpLimit.ToString("F3");
|
|
|
+ downLimitValue = currentProduct.GlobalParamEx.Gap4DownLimit.ToString("F3");
|
|
|
+ break;
|
|
|
+ }
|
|
|
DFC.Add(new DataFormCtq
|
|
|
{
|
|
|
PPID = ProductMainSN[i],
|
|
|
PROCESS_NAME = stationConfig.DataInfo.PROCESS_NAME,
|
|
|
PROCESS_START_TIME = _LastMesCheckTime[i].ToString(),
|
|
|
- CTQ_NAME = $"Gap{itemIndex}",
|
|
|
- CTQ_VALUE = item,
|
|
|
- CTQ_LSL = "",
|
|
|
- CTQ_USL = "",
|
|
|
+ CTQ_NAME = item.Key,
|
|
|
+ CTQ_VALUE = item.Value,
|
|
|
+ CTQ_LSL = upLimitValue,
|
|
|
+ CTQ_USL = downLimitValue,
|
|
|
PROCESS_END_TIME = serverTimeResult.Now.ToString(),
|
|
|
SUPPLIER_NAME = stationConfig.DataInfo.SUPPLIER_NAME,
|
|
|
COMMODITY_TYPE = stationConfig.DataInfo.COMMODITY_TYPE,
|