|
|
@@ -21,7 +21,6 @@ import com.bonait.bnframework.modbus.ModbusCenter; |
|
|
|
import com.bonait.bnframework.modbus.RackModbusTcpServer; |
|
|
|
import com.bonait.bnframework.modbus.RobotModbusTcpServer; |
|
|
|
import com.bonait.bnframework.modbus.Wok2ModbusTcpServer; |
|
|
|
import com.bonait.bnframework.modbus.Wok2ModbusTcpServer; |
|
|
|
import com.bonait.bnframework.newui.widget.NewToastUtil; |
|
|
|
|
|
|
|
import org.greenrobot.eventbus.EventBus; |
|
|
@@ -36,7 +35,7 @@ import java.util.Map; |
|
|
|
*/ |
|
|
|
public class ExecuteTheRecipe2 { |
|
|
|
|
|
|
|
private static final String TAG = "ExecuteTheRecipe2==>"; |
|
|
|
private static final String TAG = "ExecuteTheRecipe==>"; |
|
|
|
|
|
|
|
private static int deviceNum = 2; |
|
|
|
/** |
|
|
@@ -61,6 +60,11 @@ public class ExecuteTheRecipe2 { |
|
|
|
*/ |
|
|
|
public static boolean IsPause = false; |
|
|
|
|
|
|
|
/** |
|
|
|
* 是否在投料 |
|
|
|
*/ |
|
|
|
public static boolean RobotIsWorking = false; |
|
|
|
|
|
|
|
public static void reset1(){ |
|
|
|
IsForcedEnd = false; |
|
|
|
IsPause = false; |
|
|
@@ -345,6 +349,21 @@ public class ExecuteTheRecipe2 { |
|
|
|
//endregion |
|
|
|
//写入PLC |
|
|
|
if (formulation.size() > 0) { |
|
|
|
switch (processname){ |
|
|
|
case "主料": |
|
|
|
case "辅料": |
|
|
|
case "出菜": |
|
|
|
while (!IsForcedEnd && !ExecuteTheRecipe2.RobotIsWorking) { |
|
|
|
try { |
|
|
|
Thread.sleep(200); |
|
|
|
} catch (InterruptedException e) { |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
} |
|
|
|
if(IsForcedEnd){ |
|
|
|
return; |
|
|
|
} |
|
|
|
switch (processname) { |
|
|
|
case "搅拌": |
|
|
|
Write_PLC_Stir(formulation); |
|
|
@@ -356,10 +375,14 @@ public class ExecuteTheRecipe2 { |
|
|
|
Write_PLC_Heating(formulation); |
|
|
|
break; |
|
|
|
case "主料": |
|
|
|
RobotIsWorking = true; |
|
|
|
Write_PLC_MainIngredients(formulation); |
|
|
|
RobotIsWorking = false; |
|
|
|
break; |
|
|
|
case "辅料": |
|
|
|
RobotIsWorking = true; |
|
|
|
Write_PLC_MainAccessory(formulation); |
|
|
|
RobotIsWorking = false; |
|
|
|
break; |
|
|
|
case "并行出料": |
|
|
|
Write_PLC_ParallelDischarge(formulation); |
|
|
@@ -368,7 +391,9 @@ public class ExecuteTheRecipe2 { |
|
|
|
Write_PLC_Delay(formulation); |
|
|
|
break; |
|
|
|
case "出菜": |
|
|
|
RobotIsWorking = true; |
|
|
|
Write_PLC_MainOutdishes(formulation); |
|
|
|
RobotIsWorking = false; |
|
|
|
break; |
|
|
|
case "清洗": |
|
|
|
Write_PLC_CleanPan(formulation); |
|
|
|