|
|
@@ -2273,17 +2273,17 @@ namespace TeamAAS_VP.Core
|
|
|
SendTaskMessage($"固定相机流程3结果:{visionResults[2].dis}", MessageLevel.Debug);
|
|
|
SendTaskMessage($"固定相机流程4结果:{visionResults[3].dis}", MessageLevel.Debug);
|
|
|
DISDict.Clear();
|
|
|
- DISDict.Add("DownDis1", visionResults[0].dis.Split(',')[1]);
|
|
|
- DISDict.Add("LeftDis1", visionResults[0].dis.Split(',')[2]);
|
|
|
+ //DISDict.Add("DownDis1", visionResults[0].dis.Split(',')[1]);
|
|
|
+ //DISDict.Add("LeftDis1", visionResults[0].dis.Split(',')[2]);
|
|
|
|
|
|
- DISDict.Add("LeftDis2", visionResults[1].dis.Split(',')[1]);
|
|
|
- DISDict.Add("UpDis1", visionResults[1].dis.Split(',')[2]);
|
|
|
+ //DISDict.Add("LeftDis2", visionResults[1].dis.Split(',')[1]);
|
|
|
+ //DISDict.Add("UpDis1", visionResults[1].dis.Split(',')[2]);
|
|
|
|
|
|
- DISDict.Add("DownDis2", visionResults[2].dis.Split(',')[1]);
|
|
|
- DISDict.Add("RightDis1", visionResults[2].dis.Split(',')[2]);
|
|
|
+ //DISDict.Add("DownDis2", visionResults[2].dis.Split(',')[1]);
|
|
|
+ //DISDict.Add("RightDis1", visionResults[2].dis.Split(',')[2]);
|
|
|
|
|
|
- DISDict.Add("UpDis2", visionResults[3].dis.Split(',')[1]);
|
|
|
- DISDict.Add("RightDis2", visionResults[3].dis.Split(',')[2]);
|
|
|
+ //DISDict.Add("UpDis2", visionResults[3].dis.Split(',')[1]);
|
|
|
+ //DISDict.Add("RightDis2", visionResults[3].dis.Split(',')[2]);
|
|
|
|
|
|
|
|
|
}
|
|
|
@@ -2295,17 +2295,17 @@ namespace TeamAAS_VP.Core
|
|
|
SendTaskMessage($"固定相机流程3结果:{visionResults[2].dis}", MessageLevel.Debug);
|
|
|
SendTaskMessage($"固定相机流程4结果:{visionResults[3].dis}", MessageLevel.Debug);
|
|
|
DISDict.Clear();
|
|
|
- DISDict.Add("DownDis1", visionResults[0].dis.Split(',')[1]);
|
|
|
- DISDict.Add("LeftDis1", visionResults[0].dis.Split(',')[2]);
|
|
|
+ //DISDict.Add("DownDis1", visionResults[0].dis.Split(',')[1]);
|
|
|
+ //DISDict.Add("LeftDis1", visionResults[0].dis.Split(',')[2]);
|
|
|
|
|
|
- DISDict.Add("LeftDis2", visionResults[1].dis.Split(',')[1]);
|
|
|
- DISDict.Add("UpDis1", visionResults[1].dis.Split(',')[2]);
|
|
|
+ //DISDict.Add("LeftDis2", visionResults[1].dis.Split(',')[1]);
|
|
|
+ //DISDict.Add("UpDis1", visionResults[1].dis.Split(',')[2]);
|
|
|
|
|
|
- DISDict.Add("DownDis2", visionResults[2].dis.Split(',')[1]);
|
|
|
- DISDict.Add("RightDis1", visionResults[2].dis.Split(',')[2]);
|
|
|
+ //DISDict.Add("DownDis2", visionResults[2].dis.Split(',')[1]);
|
|
|
+ //DISDict.Add("RightDis1", visionResults[2].dis.Split(',')[2]);
|
|
|
|
|
|
- DISDict.Add("UpDis2", visionResults[3].dis.Split(',')[1]);
|
|
|
- DISDict.Add("RightDis2", visionResults[3].dis.Split(',')[2]);
|
|
|
+ //DISDict.Add("UpDis2", visionResults[3].dis.Split(',')[1]);
|
|
|
+ //DISDict.Add("RightDis2", visionResults[3].dis.Split(',')[2]);
|
|
|
|
|
|
|
|
|
await plc.WriteNodeAsync(addressConfig.Out_FixedCameraPutStatus.Address, (Int16)2);
|
|
|
@@ -2394,8 +2394,8 @@ namespace TeamAAS_VP.Core
|
|
|
gapDict.Add("Gap2", visionResults[1].distance.Split(',')[1]);
|
|
|
gapDict.Add("Gap3", visionResults[2].distance.Split(',')[1]);
|
|
|
gapDict.Add("Gap4", visionResults[3].distance.Split(',')[1]);
|
|
|
- gapDict.Add("Gap5", visionResults[1].distance.Split(',')[2]);
|
|
|
- gapDict.Add("Gap6", visionResults[3].distance.Split(',')[2]);
|
|
|
+ //gapDict.Add("Gap5", visionResults[1].distance.Split(',')[2]);
|
|
|
+ //gapDict.Add("Gap6", visionResults[3].distance.Split(',')[2]);
|
|
|
//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;
|
|
|
@@ -2407,16 +2407,16 @@ namespace TeamAAS_VP.Core
|
|
|
res2 = visionResults[1].distance.Split(',')[1];
|
|
|
res3 = visionResults[2].distance.Split(',')[1];
|
|
|
res4 = visionResults[3].distance.Split(',')[1];
|
|
|
- res5 = visionResults[1].distance.Split(',')[2];
|
|
|
- res6 = visionResults[3].distance.Split(',')[2];
|
|
|
+ //res5 = visionResults[1].distance.Split(',')[2];
|
|
|
+ //res6 = visionResults[3].distance.Split(',')[2];
|
|
|
SendTaskMessage($"固定相机检测NG", MessageLevel.Error);
|
|
|
gapDict.Clear();
|
|
|
gapDict.Add("Gap1", res1);
|
|
|
gapDict.Add("Gap2", res2);
|
|
|
gapDict.Add("Gap3", res3);
|
|
|
gapDict.Add("Gap4", res4);
|
|
|
- gapDict.Add("Gap5", res5);
|
|
|
- gapDict.Add("Gap6", res6);
|
|
|
+ //gapDict.Add("Gap5", res5);
|
|
|
+ //gapDict.Add("Gap6", res6);
|
|
|
//gapString = $"{res1},{res2},{res3},{res4}";
|
|
|
await plc.WriteNodeAsync(addressConfig.Out_FixedCameracheckStatus.Address, (Int16)2);
|
|
|
return;
|
|
|
@@ -3096,7 +3096,7 @@ namespace TeamAAS_VP.Core
|
|
|
}
|
|
|
data = gapDict.Copy();
|
|
|
data.Add("AssyPressure1", assypress);
|
|
|
- SendTaskMessage($"Gap1:{gapDict["Gap1"]},Gap2:{gapDict["Gap2"]},Gap3:{gapDict["Gap3"]},Gap4:{gapDict["Gap4"]},Gap5:{gapDict["Gap5"]},Gap6:{gapDict["Gap6"]},组装压力:{assypress}", MessageLevel.Info);
|
|
|
+ SendTaskMessage($"Gap1:{gapDict["Gap1"]},Gap2:{gapDict["Gap2"]},Gap3:{gapDict["Gap3"]},Gap4:{gapDict["Gap4"]},组装压力:{assypress}", MessageLevel.Info);
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
@@ -3230,7 +3230,7 @@ namespace TeamAAS_VP.Core
|
|
|
|
|
|
try
|
|
|
{
|
|
|
- SendTaskMessage($"左1:{DISDict["LeftDis1"]},下1:{DISDict["DownDis1"]},左2:{DISDict["LeftDis2"]},上1:{DISDict["UpDis1"]},右1:{DISDict["RightDis1"]},下2:{DISDict["DownDis2"]},右2:{DISDict["RightDis2"]},上2:{DISDict["UpDis2"]}", MessageLevel.Info);
|
|
|
+ //SendTaskMessage($"左1:{DISDict["LeftDis1"]},下1:{DISDict["DownDis1"]},左2:{DISDict["LeftDis2"]},上1:{DISDict["UpDis1"]},右1:{DISDict["RightDis1"]},下2:{DISDict["DownDis2"]},右2:{DISDict["RightDis2"]},上2:{DISDict["UpDis2"]}", MessageLevel.Info);
|
|
|
if (i == 0)
|
|
|
{
|
|
|
DFC2.Add(new DataFormCtq
|
|
|
@@ -3250,14 +3250,14 @@ namespace TeamAAS_VP.Core
|
|
|
MFG_LOT = stationConfig.DataInfo.MFG_LOT,//
|
|
|
MFG_ASSY_LINE = stationConfig.DataInfo.MFG_ASSY_LINE,
|
|
|
PROCESS_OUTCOME = "Pass",
|
|
|
- PROCESS_MACHINE_ID = DISDict["LeftDis1"],//左1
|
|
|
- CTQ_UNIT_OF_MEASURE = DISDict["DownDis1"],//下1
|
|
|
- ERROR_MESSAGE = DISDict["LeftDis2"],///左2
|
|
|
- PD_ATTR_01 = DISDict["UpDis1"],//上1
|
|
|
- PD_ATTR_02 = DISDict["RightDis1"],//右1
|
|
|
- PD_ATTR_03 = DISDict["DownDis2"],//下2
|
|
|
- PD_ATTR_04 = DISDict["RightDis2"],//右2
|
|
|
- PD_ATTR_05 = DISDict["UpDis2"],//上2
|
|
|
+ //PROCESS_MACHINE_ID = DISDict["LeftDis1"],//左1
|
|
|
+ //CTQ_UNIT_OF_MEASURE = DISDict["DownDis1"],//下1
|
|
|
+ //ERROR_MESSAGE = DISDict["LeftDis2"],///左2
|
|
|
+ //PD_ATTR_01 = DISDict["UpDis1"],//上1
|
|
|
+ //PD_ATTR_02 = DISDict["RightDis1"],//右1
|
|
|
+ //PD_ATTR_03 = DISDict["DownDis2"],//下2
|
|
|
+ //PD_ATTR_04 = DISDict["RightDis2"],//右2
|
|
|
+ //PD_ATTR_05 = DISDict["UpDis2"],//上2
|
|
|
});
|
|
|
}
|
|
|
bool recordResult2 = RecordStationResult2(i, DFC2, ProductMainSN[i], serverTimeResult.Now.Subtract(_LastMesCheckTime[i]).TotalSeconds, _LastMesCheckTime[i], stationConfig.SaveCsvPath);
|
|
|
@@ -3879,12 +3879,26 @@ namespace TeamAAS_VP.Core
|
|
|
var currentproduct = _productService.GetCurrentProduct();
|
|
|
if (currentproduct == null) return;
|
|
|
TotalQuantity = await _systemDatabaseService.GetOverallProductionAsync(currentproduct.Name);
|
|
|
- TotalQuantityToday = await _systemDatabaseService.GetTodayProductionAsync(currentproduct.Name);
|
|
|
- CurrentUPH = await _systemDatabaseService.GetLastHourProductionAsync(currentproduct.Name);
|
|
|
- //
|
|
|
+ //TotalQuantityToday = await _systemDatabaseService.GetTodayProductionAsync(currentproduct.Name);
|
|
|
+ //CurrentUPH = await _systemDatabaseService.GetLastHourProductionAsync(currentproduct.Name);
|
|
|
+ ////
|
|
|
ThrowNumber = await _systemDatabaseService.GetThrowNumberAsync();
|
|
|
- NgNumber = await _systemDatabaseService.GetNGProductionAsync(currentproduct.Name);
|
|
|
- Yield = ((double)TotalQuantityToday - (double)NgNumber) / (double)TotalQuantityToday * 100;
|
|
|
+ //NgNumber = await _systemDatabaseService.GetNGProductionAsync(currentproduct.Name);
|
|
|
+ //Yield = ((double)TotalQuantityToday - (double)NgNumber) / (double)TotalQuantityToday * 100;
|
|
|
+
|
|
|
+ TotalQuantityToday = 0;
|
|
|
+ CurrentUPH = 0;
|
|
|
+ NgNumber = 0;
|
|
|
+ Yield = 0;
|
|
|
+ ObservableCollection<ProductModel> ProductList = new ObservableCollection<ProductModel>(_productService.GetAllProducts());
|
|
|
+ foreach (var product in ProductList)
|
|
|
+ {
|
|
|
+ //TotalQuantity += await _systemDatabaseService.GetOverallProductionAsync(product.Name);
|
|
|
+ TotalQuantityToday += await _systemDatabaseService.GetTodayProductionAsync(product.Name);
|
|
|
+ CurrentUPH += await _systemDatabaseService.GetLastHourProductionAsync(product.Name);
|
|
|
+ NgNumber += await _systemDatabaseService.GetNGProductionAsync(product.Name);
|
|
|
+ Yield += ((double)TotalQuantityToday - (double)NgNumber) / (double)TotalQuantityToday * 100;
|
|
|
+ }
|
|
|
}
|
|
|
catch (Exception)
|
|
|
{
|