|
|
@@ -127,36 +127,37 @@ public class JiaoYan_zdqx_fragment extends BaseFragment { |
|
|
|
@Override |
|
|
|
public void run() { |
|
|
|
try { |
|
|
|
ExecuteTheRecipe.WritePLC("管道自动排水完成",false,null); |
|
|
|
|
|
|
|
for (BPA_SUGAR item: |
|
|
|
DataBus.getInstance().zdqx) { |
|
|
|
ExecuteTheRecipe.WritePLC("自动清洗完成",false,null); |
|
|
|
Thread.sleep(100);//10 *6 |
|
|
|
item.exp="执行中"; |
|
|
|
DataBus.getInstance().zdqxchidAdapter.refresh(); |
|
|
|
|
|
|
|
final boolean[] IsStop = {false}; |
|
|
|
ExecuteTheRecipe.CleaningComplete=new IRun() { |
|
|
|
@Override |
|
|
|
public void Run() { |
|
|
|
IsStop[0] =true; |
|
|
|
} |
|
|
|
}; |
|
|
|
if(DataBus.getInstance().ZDQX_IsStart) |
|
|
|
{ |
|
|
|
ExecuteTheRecipe.WritePLC("管道自动排水完成",false,null); |
|
|
|
|
|
|
|
long a = System.currentTimeMillis(); |
|
|
|
while (DataBus.getInstance().ZDQX_IsStart && !IsStop[0]) { |
|
|
|
if ((System.currentTimeMillis() - a) > 1000 * 500) { |
|
|
|
break; |
|
|
|
} |
|
|
|
for (BPA_SUGAR item: |
|
|
|
DataBus.getInstance().zdqx) { |
|
|
|
ExecuteTheRecipe.WritePLC("自动清洗完成",false,null); |
|
|
|
Thread.sleep(100);//10 *6 |
|
|
|
if(DataBus.getInstance().ZDQX_IsStart) |
|
|
|
{ |
|
|
|
item.exp="执行中"; |
|
|
|
DataBus.getInstance().zdqxchidAdapter.refresh(); |
|
|
|
} |
|
|
|
final boolean[] IsStop = {false}; |
|
|
|
ExecuteTheRecipe.CleaningComplete=new IRun() { |
|
|
|
@Override |
|
|
|
public void Run() { |
|
|
|
IsStop[0] =true; |
|
|
|
} |
|
|
|
}; |
|
|
|
|
|
|
|
while (DataBus.getInstance().ZDQX_IsStart && !IsStop[0]) { |
|
|
|
Thread.sleep(100);//10 *6 |
|
|
|
} |
|
|
|
if(DataBus.getInstance().ZDQX_IsStart) |
|
|
|
{ |
|
|
|
item.exp="执行完成"; |
|
|
|
DataBus.getInstance().zdqxchidAdapter.refresh(); |
|
|
|
} |
|
|
|
} |
|
|
|
item.exp="执行完成"; |
|
|
|
DataBus.getInstance().zdqxchidAdapter.refresh(); |
|
|
|
} |
|
|
|
|
|
|
|
if(DataBus.getInstance().ZDQX_IsStart) |
|
|
|
{ |
|
|
|
ExecuteTheRecipe.WritePLC("管道自动排水",true,null); |
|
|
|
} |
|
|
|
|
|
|
|