|
|
@@ -119,14 +119,18 @@ namespace BPASmartClient.DosingSystem.ViewModel |
|
|
|
Stopwatch sw = new Stopwatch(); |
|
|
|
App.Current.Dispatcher.Invoke(() => { recipeProcesses.Add(Recipes.ElementAt(index)); }); |
|
|
|
sw.Restart(); |
|
|
|
while (!GlobalDevice.PlcData.ResComplete) |
|
|
|
while (true) |
|
|
|
{ |
|
|
|
if (sw.ElapsedMilliseconds >= 3000) |
|
|
|
if (sw.ElapsedMilliseconds >= 3000 && !GlobalDevice.PlcData.ResComplete) |
|
|
|
{ |
|
|
|
MessageNotify.GetInstance.ShowRunLog("获取配方下发反馈超时"); |
|
|
|
break; |
|
|
|
} |
|
|
|
if (GlobalDevice.PlcData.ResComplete) SiemensDevice.GetInstance.MySiemens.Write("DB3.DBX0.1", false); |
|
|
|
if (GlobalDevice.PlcData.ResComplete) |
|
|
|
{ |
|
|
|
SiemensDevice.GetInstance.MySiemens.Write("DB3.DBX0.1", false); |
|
|
|
break; |
|
|
|
} |
|
|
|
Thread.Sleep(100); |
|
|
|
} |
|
|
|
#endregion |
|
|
|