|
|
@@ -204,6 +204,35 @@ namespace TeamAAS_VP.Core
|
|
|
get { return _dfc; }
|
|
|
set { SetProperty(ref _dfc, value); }
|
|
|
}
|
|
|
+ private Int64 _ThrowNumber;
|
|
|
+ /// <summary>
|
|
|
+ /// 抛料数
|
|
|
+ /// </summary>
|
|
|
+ public Int64 ThrowNumber
|
|
|
+ {
|
|
|
+ get { return _ThrowNumber; }
|
|
|
+ set { SetProperty(ref _ThrowNumber, value); }
|
|
|
+ }
|
|
|
+
|
|
|
+ private Int64 _NgNumber;
|
|
|
+ /// <summary>
|
|
|
+ /// ng数量
|
|
|
+ /// </summary>
|
|
|
+ public Int64 NgNumber
|
|
|
+ {
|
|
|
+ get { return _NgNumber; }
|
|
|
+ set { SetProperty(ref _NgNumber, value); }
|
|
|
+ }
|
|
|
+
|
|
|
+ private double _Yield;
|
|
|
+ /// <summary>
|
|
|
+ /// 良率
|
|
|
+ /// </summary>
|
|
|
+ public double Yield
|
|
|
+ {
|
|
|
+ get { return _Yield; }
|
|
|
+ set { SetProperty(ref _Yield, value); }
|
|
|
+ }
|
|
|
#endregion
|
|
|
|
|
|
#region 命令
|
|
|
@@ -1098,6 +1127,7 @@ namespace TeamAAS_VP.Core
|
|
|
addressConfig.In_RequestPosition.Address,
|
|
|
addressConfig.In_ScrewTeachExe.Address,
|
|
|
addressConfig.In_PickINC.Address,
|
|
|
+ addressConfig.In_Throw.Address,
|
|
|
};
|
|
|
for (int i = 0; i < 10; i++)
|
|
|
{
|
|
|
@@ -1254,6 +1284,7 @@ namespace TeamAAS_VP.Core
|
|
|
bool _LastFixedCameraPickExe = false;
|
|
|
bool _LastFixedCameraPutExe = false;
|
|
|
bool _LastFixedCameracheckExe = false;
|
|
|
+ bool _LastThrowExe = false;
|
|
|
Int16 _LastQrCodePhotoRequest = 0;
|
|
|
Int16[] _LastWorkStart = new Int16[7];
|
|
|
Int16[] _LastWorkDone = new Int16[7];
|
|
|
@@ -2201,6 +2232,30 @@ namespace TeamAAS_VP.Core
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ // 抛料计数
|
|
|
+ else if (addressConfig.In_Throw.Address.Contains(tuple.nodeId))
|
|
|
+ {
|
|
|
+ if (tuple.value is bool state)
|
|
|
+ {
|
|
|
+ if (_LastThrowExe != state)
|
|
|
+ {
|
|
|
+ _LastThrowExe = state;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (state)
|
|
|
+ {
|
|
|
+ SendTaskMessage("收到抛料信号", MessageLevel.Info);
|
|
|
+ await _systemDatabaseService.RecordThrowNumberAsync(new ThrowRecord()
|
|
|
+ {
|
|
|
+ DayTime = DateTime.Now,
|
|
|
+ ThrowCount = 1
|
|
|
+ });
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
else
|
|
|
{
|
|
|
// 过站检查
|
|
|
@@ -2871,6 +2926,10 @@ namespace TeamAAS_VP.Core
|
|
|
TotalQuantity = await _systemDatabaseService.GetOverallProductionAsync(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 = (TotalQuantityToday - NgNumber) / TotalQuantityToday * 100;
|
|
|
}
|
|
|
catch (Exception)
|
|
|
{
|