|
|
@@ -114,7 +114,6 @@ namespace TeamAAS_VP.Core
|
|
|
/// 超时自动停止秒数
|
|
|
/// </summary>
|
|
|
private int _pressureMaxDurationSeconds = 30; //超时自动停止秒数
|
|
|
- Stopwatch swCT = new Stopwatch();
|
|
|
List<LockResult> lockResultsAll = new List<LockResult>();//一个产品的总结果
|
|
|
#endregion
|
|
|
|
|
|
@@ -1889,7 +1888,6 @@ namespace TeamAAS_VP.Core
|
|
|
//询问mes
|
|
|
if (state == 1)
|
|
|
{
|
|
|
- swCT.Restart();
|
|
|
//这里缺少从MES获取产品配方的内容,需要补充
|
|
|
|
|
|
_LastMesCheckTime[i] = DateTime.UtcNow;
|
|
|
@@ -1925,12 +1923,16 @@ namespace TeamAAS_VP.Core
|
|
|
|
|
|
//这里缺少上传MES的本站数据结果及开始和结束时间,需要补充
|
|
|
|
|
|
+ //if (i==0)
|
|
|
+ //{
|
|
|
+ CTtime= DateTime.UtcNow.Subtract(_LastMesCheckTime[i]).TotalSeconds;
|
|
|
+ //}
|
|
|
+
|
|
|
(bool isSuccess, string response) = await _mesService.SubmitGetAsync(code, true, _LastMesCheckTime[i], DateTime.UtcNow);
|
|
|
//假设上传成功,这里缺少上传失败的处理
|
|
|
|
|
|
await plc.WriteNodeAsync(string.Format(addressConfig.Out_MesStatus.Address, i), (Int16)3);
|
|
|
- swCT.Stop();
|
|
|
- CTtime = Math.Round(swCT.Elapsed.TotalSeconds, 3);
|
|
|
+
|
|
|
WriteProductLog(lockResultsAll, code, CTtime);
|
|
|
lockResultsAll.Clear();
|
|
|
}
|