|
|
@@ -380,7 +380,7 @@ namespace BPASmartClient.DosingSystem |
|
|
|
|
|
|
|
int dd = 0; |
|
|
|
|
|
|
|
public async Task ShutDownHandler() |
|
|
|
public void ShutDownHandler() |
|
|
|
{ |
|
|
|
TaskManage.GetInstance.StopTask("设备下发配方"); |
|
|
|
TaskManage.GetInstance.StopTask("下发设备参数"); |
|
|
@@ -392,7 +392,7 @@ namespace BPASmartClient.DosingSystem |
|
|
|
{ |
|
|
|
tasks.Add( item.modbusTcp.WriteAsync<ushort>(DeviceAddress.TranspportSwitch.ToAdd(), 0)); |
|
|
|
} |
|
|
|
await Task.WhenAll(tasks); |
|
|
|
Task.WaitAll(tasks.ToArray(),TimeSpan.FromSeconds(5)); |
|
|
|
} |
|
|
|
private void MatchRun() |
|
|
|
{ |
|
|
@@ -419,9 +419,10 @@ namespace BPASmartClient.DosingSystem |
|
|
|
{ |
|
|
|
int index = 0; |
|
|
|
int recipeNameNum = doDeviceCount[DeviceInquire.GetInstance.devices[i].IpAddress]; |
|
|
|
//设备已执行的配方必须小于已经下发的配方。所以每次开启软件时 必须清零设备上的数据。 |
|
|
|
if (recipeNameNum == DeviceInquire.GetInstance.DeviceLists[DeviceInquire.GetInstance.devices[i].IpAddress].deviceStatus.DoRecipeCount && recipeNameNum < RecipeNames.Count) |
|
|
|
{ |
|
|
|
//查找 |
|
|
|
//查找配方。根据名称查找。 |
|
|
|
index = Array.FindIndex(Recipes.ToArray(), p => p.RecipeName == RecipeNames.ElementAt(recipeNameNum)); |
|
|
|
if (index >= 0 && index < Recipes.Count) |
|
|
|
{ |
|
|
|