@@ -820,7 +820,8 @@ public class ExecuteTheRecipe { | |||
k++; | |||
} | |||
if (kkkkkk.size() <= 0) { | |||
if (kkkkkk.size() <= 0 && all_list.size()>0) { | |||
IsMove = true; | |||
} | |||
@@ -515,29 +515,30 @@ public class HomeFragmentSBKZ extends BaseFragment { | |||
* @param num | |||
*/ | |||
public void MainDish(int num) { | |||
Object sb = ExecuteTheRecipe.ReadPLC("平移轴在1号位"); | |||
if (sb != null) { | |||
if ((boolean) (sb)) { | |||
if (isMake == false) { | |||
isMake = true; | |||
new Thread(new Runnable() { | |||
@Override | |||
public void run() { | |||
BPA_GOODSRECIPE data1 = Get位置("最高", "炒菜位1"); | |||
ExecuteTheRecipe.ExecuteOperationSteps(data1.processname, data1.processvalue); | |||
BPA_GOODSRECIPE data = Get主料(num); | |||
ExecuteTheRecipe.ExecuteOperationSteps(data.processname, data.processvalue); | |||
ToastUtils.warning("主料:" + num + "号仓投放"); | |||
isMake = false; | |||
} | |||
}).start(); | |||
// Object sb = ExecuteTheRecipe.ReadPLC("平移轴在1号位"); | |||
// if (sb != null) { | |||
// if ((boolean) (sb)) { | |||
// | |||
// } else { | |||
// ToastUtils.warning("平移轴未复位!!!"); | |||
// } | |||
// } else { | |||
// ToastUtils.warning("PLC未连接!!!"); | |||
// } | |||
if (isMake == false) { | |||
isMake = true; | |||
new Thread(new Runnable() { | |||
@Override | |||
public void run() { | |||
BPA_GOODSRECIPE data1 = Get位置("最高", "炒菜位1"); | |||
ExecuteTheRecipe.ExecuteOperationSteps(data1.processname, data1.processvalue); | |||
BPA_GOODSRECIPE data = Get主料(num); | |||
ExecuteTheRecipe.ExecuteOperationSteps(data.processname, data.processvalue); | |||
ToastUtils.warning("主料:" + num + "号仓投放"); | |||
isMake = false; | |||
} | |||
} else { | |||
ToastUtils.warning("平移轴未复位!!!"); | |||
} | |||
} else { | |||
ToastUtils.warning("PLC未连接!!!"); | |||
}).start(); | |||
} | |||
} | |||
@@ -849,47 +849,49 @@ public class DishTestActivity extends BaseActivity { | |||
* @param num | |||
*/ | |||
public void MainDish(int num) { | |||
Object sb = ExecuteTheRecipe.ReadPLC("平移轴在1号位"); | |||
if (sb != null) { | |||
if ((boolean) (sb)) { | |||
SetZhiXingZhong(true); | |||
int time = (int) ((SystemClock.elapsedRealtime() - runtime.getBase()) / 1000);//当前点击多少秒 | |||
int time_c = time - ClikTime; | |||
new Thread(new Runnable() { | |||
@Override | |||
public void run() { | |||
// Object sb = ExecuteTheRecipe.ReadPLC("平移轴在1号位"); | |||
// if (sb != null) { | |||
// if ((boolean) (sb)) { | |||
// | |||
// } else { | |||
// ToastUtils.warning("平移轴未复位!!!"); | |||
// } | |||
// } else { | |||
// ToastUtils.warning("PLC未连接!!!"); | |||
// } | |||
BPA_GOODSRECIPE data1 = Get位置("最高", "炒菜位1"); | |||
//DataBus.getInstance().bpa_goodsrecipes.add(data1); | |||
ExecuteTheRecipe.ExecuteOperationSteps(data1.processname, data1.processvalue); | |||
SetZhiXingZhong(true); | |||
BPA_GOODSRECIPE data = Get主料(num); | |||
int time = (int) ((SystemClock.elapsedRealtime() - runtime.getBase()) / 1000);//当前点击多少秒 | |||
int time_c = time - ClikTime; | |||
new Thread(new Runnable() { | |||
@Override | |||
public void run() { | |||
ExecuteTheRecipe.ExecuteOperationSteps(data.processname, data.processvalue); | |||
BPA_GOODSRECIPE data1 = Get位置("最高", "炒菜位1"); | |||
//DataBus.getInstance().bpa_goodsrecipes.add(data1); | |||
ExecuteTheRecipe.ExecuteOperationSteps(data1.processname, data1.processvalue); | |||
runOnUiThread(new Runnable() { | |||
@Override | |||
public void run() { | |||
if (time_c > 0)//如果大于0,那么加一个延迟 | |||
{ | |||
DataBus.getInstance().bpa_goodsrecipes.add(Get延迟(time_c)); | |||
} | |||
DataBus.getInstance().bpa_goodsrecipes.add(data); | |||
ToastUtils.warning("主料:" + num + "号仓投放"); | |||
SetZhiXingZhong(false); | |||
//刷新工序 | |||
RefreshProcedure(); | |||
} | |||
}); | |||
BPA_GOODSRECIPE data = Get主料(num); | |||
ExecuteTheRecipe.ExecuteOperationSteps(data.processname, data.processvalue); | |||
runOnUiThread(new Runnable() { | |||
@Override | |||
public void run() { | |||
if (time_c > 0)//如果大于0,那么加一个延迟 | |||
{ | |||
DataBus.getInstance().bpa_goodsrecipes.add(Get延迟(time_c)); | |||
} | |||
DataBus.getInstance().bpa_goodsrecipes.add(data); | |||
ToastUtils.warning("主料:" + num + "号仓投放"); | |||
SetZhiXingZhong(false); | |||
//刷新工序 | |||
RefreshProcedure(); | |||
} | |||
}).start(); | |||
} else { | |||
ToastUtils.warning("平移轴未复位!!!"); | |||
}); | |||
} | |||
} else { | |||
ToastUtils.warning("PLC未连接!!!"); | |||
} | |||
}).start(); | |||
} | |||
@@ -335,30 +335,32 @@ public class DiyMemoryActivity extends BaseActivity { | |||
} | |||
public void ClickZL(int time,int time_c,int num) | |||
{ | |||
Object sb = ExecuteTheRecipe.ReadPLC("平移轴在1号位"); | |||
if (sb != null) { | |||
if ((boolean) (sb)) { | |||
if(isRunClick()) | |||
{ | |||
if(time_c>0)//如果大于0,那么加一个延迟 | |||
{ | |||
DataBus.getInstance().bpa_goodsrecipes.add(Get延迟(time_c)); | |||
} | |||
//控制去炒菜位 | |||
BPA_GOODSRECIPE data1=Get位置("最高","炒菜位1"); | |||
DataBus.getInstance().bpa_goodsrecipes.add(data1); | |||
// Object sb = ExecuteTheRecipe.ReadPLC("平移轴在1号位"); | |||
// if (sb != null) { | |||
// if ((boolean) (sb)) { | |||
// | |||
// } else { | |||
// ToastUtils.warning("平移轴未复位!!!"); | |||
// } | |||
// } else { | |||
// ToastUtils.warning("PLC未连接!!!"); | |||
// } | |||
BPA_GOODSRECIPE data=Get主料(num); | |||
DataBus.getInstance().bpa_goodsrecipes.add(data); | |||
MakeRecipe(data);//执行主料 | |||
ClikTime=time; | |||
} | |||
} else { | |||
ToastUtils.warning("平移轴未复位!!!"); | |||
if(isRunClick()) | |||
{ | |||
if(time_c>0)//如果大于0,那么加一个延迟 | |||
{ | |||
DataBus.getInstance().bpa_goodsrecipes.add(Get延迟(time_c)); | |||
} | |||
} else { | |||
ToastUtils.warning("PLC未连接!!!"); | |||
//控制去炒菜位 | |||
BPA_GOODSRECIPE data1=Get位置("最高","炒菜位1"); | |||
DataBus.getInstance().bpa_goodsrecipes.add(data1); | |||
BPA_GOODSRECIPE data=Get主料(num); | |||
DataBus.getInstance().bpa_goodsrecipes.add(data); | |||
MakeRecipe(data);//执行主料 | |||
ClikTime=time; | |||
} | |||
} | |||