Browse Source

5

燃气自翻炒锅
fyf 1 year ago
parent
commit
6725f20ce6
3 changed files with 32 additions and 13 deletions
  1. +26
    -7
      app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java
  2. +3
    -3
      app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java
  3. +3
    -3
      app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/WokSetGKCXFragment.java

+ 26
- 7
app/src/main/java/com/bonait/bnframework/business/ExecuteTheRecipe.java View File

@@ -427,7 +427,7 @@ public class ExecuteTheRecipe {
ExecuteCurrentOperation.Run("位置" + "|" + value);
}
//原点位,等待机器移动倒响应位置
BottomClick(value);
BottomClick1(value);
//一直等待机器移动到该位置,否则就一直等待 6s超时
String name = value + "反馈";
final boolean[] IsComplete = {false};
@@ -490,7 +490,7 @@ public class ExecuteTheRecipe {

if (ishand) {
if (ConfigName.getInstance().versionSelectionEnum.equals("大炒自动投料版本") || ConfigName.getInstance().versionSelectionEnum.equals("小炒版本")) {
ExecuteTheRecipe.BottomClick("平移-去1号位");
ExecuteTheRecipe.BottomClick1("平移-去1号位");
}
String name = "";
String zl = "";
@@ -559,7 +559,9 @@ public class ExecuteTheRecipe {


//1.去某一个位置
BottomClick("平移-去" + writeValue);
BottomClick1("平移-去" + writeValue);


Log.d("平移", "平移-去" + writeValue);
//一直等待机器移动到该位置,否则就一直等待 6s超时
String name = "平移轴在" + writeValue;
@@ -579,7 +581,7 @@ public class ExecuteTheRecipe {
Log.d("平移", name + "已经就位");

//2.给倒菜启动
BottomClick("主料");
BottomClick1("主料");
name = "倒菜完成";
IsComplete[0] = false;
a = System.currentTimeMillis();
@@ -602,7 +604,7 @@ public class ExecuteTheRecipe {

if (IsMoveYiHaoWei()) {
if (ConfigName.getInstance().versionSelectionEnum.equals("大炒自动投料版本") || ConfigName.getInstance().versionSelectionEnum.equals("小炒版本")) {
ExecuteTheRecipe.BottomClick("平移-去1号位");
ExecuteTheRecipe.BottomClick1("平移-去1号位");
Log.d("移动去", "1号位");
}
}
@@ -649,6 +651,23 @@ public class ExecuteTheRecipe {
}
}

/**
* 组断执行
* @param name
*/
public static void BottomClick1(String name) {
try {
Log.e("按钮按下", name);
WritePLC(name, true, null);
Thread.sleep(200);
WritePLC(name, false, null);
Log.e("按钮复位", name);
} catch (Exception ex) {
Log.e("按钮异常", name + ex.getMessage());
WritePLC(name, false, null);
}
}

private static Activity findActivity(@NonNull Context context) {
if (context instanceof Activity) {
return (Activity) context;
@@ -783,7 +802,7 @@ public class ExecuteTheRecipe {
}
}

BottomClick("出菜");
BottomClick1("出菜");

//一直等待机器移动到该位置,否则就一直等待 6s超时
String name = "出餐启动反馈";
@@ -826,7 +845,7 @@ public class ExecuteTheRecipe {
}
}

BottomClick("炒锅清洗");
BottomClick1("炒锅清洗");

//一直等待机器移动到该位置,否则就一直等待 6s超时
String name = "炒锅清洗反馈";


+ 3
- 3
app/src/main/java/com/bonait/bnframework/common/constant/ConfigName.java View File

@@ -347,7 +347,7 @@ public class ConfigName {
add(new Res_PLCADDRESS("炒锅清洗反馈", "M41.5", 1, 0));
add(new Res_PLCADDRESS("出餐启动反馈", "M41.6", 1, 0));
add(new Res_PLCADDRESS("炒锅倒菜减速位", "M41.7", 1, 0));
add(new Res_PLCADDRESS("心跳位", "M43.0", 1, 0));
add(new Res_PLCADDRESS("心跳位", "M53.0", 1, 0));


//检测信号
@@ -566,7 +566,7 @@ public class ConfigName {
add(new Res_PLCADDRESS("翻转轴在3号位", "M44.2", 1, 0));
add(new Res_PLCADDRESS("翻转轴在4号位", "M44.3", 1, 0));
add(new Res_PLCADDRESS("倒菜完成", "M44.4", 1, 0));
add(new Res_PLCADDRESS("心跳位", "M43.0", 1, 0));
add(new Res_PLCADDRESS("心跳位", "M53.0", 1, 0));


//检测信号
@@ -786,7 +786,7 @@ public class ConfigName {
add(new Res_PLCADDRESS("翻转轴在3号位", "M44.2", 1, 0));
add(new Res_PLCADDRESS("翻转轴在4号位", "M44.3", 1, 0));
add(new Res_PLCADDRESS("倒菜完成", "M44.4", 1, 0));
add(new Res_PLCADDRESS("心跳位", "M43.0", 1, 0));
add(new Res_PLCADDRESS("心跳位", "M53.0", 1, 0));

//检测信号
add(new Res_PLCADDRESS("监测信号", "-------------", 0, 0));


+ 3
- 3
app/src/main/java/com/bonait/bnframework/modules/home/fragment/from/fragment/WokSetGKCXFragment.java View File

@@ -280,13 +280,13 @@ public class WokSetGKCXFragment extends BaseFragment {
SaveValue("抽调料位置",edit_ctl1,edit_ctl2);
break;
case R.id.czw1_save:
SaveValue("1#炒制位置",edit_czw11,edit_czw11);
SaveValue("1#炒制位置",edit_czw11,edit_czw12);
break;
case R.id.czw2_save:
SaveValue("2#炒制位置",edit_czw21,edit_czw21);
SaveValue("2#炒制位置",edit_czw21,edit_czw22);
break;
case R.id.czw3_save:
SaveValue("3#炒制位置",edit_czw31,edit_czw31);
SaveValue("3#炒制位置",edit_czw31,edit_czw32);
break;
case R.id.gzfw_save:
SaveValue("炒锅工作范围",edit_gzfw1,edit_gzfw2);


Loading…
Cancel
Save