@@ -373,7 +373,7 @@ public class ConfigName { | |||
add(new Res_PLCADDRESS("深度清洗功能", "-------------", 0, 0)); | |||
add(new Res_PLCADDRESS("清洗抽水量", "VW122", 1, 1)); | |||
add(new Res_PLCADDRESS("清洗时间", "VW1150", 1, 1)); | |||
add(new Res_PLCADDRESS("倒水减速角度", "VW1152", 1, 1)); | |||
add(new Res_PLCADDRESS("倒水减速角度", "VD1152", 1, 1)); | |||
add(new Res_PLCADDRESS("深度清洗", "M13.6", 0, 1)); | |||
add(new Res_PLCADDRESS("编码器复位", "M13.7", 0, 1)); | |||
@@ -558,7 +558,7 @@ public class ConfigName { | |||
add(new Res_PLCADDRESS("深度清洗功能", "-------------", 0, 0)); | |||
add(new Res_PLCADDRESS("清洗抽水量", "VW122", 1, 1)); | |||
add(new Res_PLCADDRESS("清洗时间", "VW1150", 1, 1)); | |||
add(new Res_PLCADDRESS("倒水减速角度", "VW1152", 1, 1)); | |||
add(new Res_PLCADDRESS("倒水减速角度", "VD1152", 1, 1)); | |||
add(new Res_PLCADDRESS("深度清洗", "M13.6", 0, 1)); | |||
add(new Res_PLCADDRESS("编码器复位", "M13.7", 0, 1)); | |||
@@ -807,7 +807,7 @@ public class ConfigName { | |||
add(new Res_PLCADDRESS("深度清洗功能", "-------------", 0, 0)); | |||
add(new Res_PLCADDRESS("清洗抽水量", "VW122", 1, 1)); | |||
add(new Res_PLCADDRESS("清洗时间", "VW1150", 1, 1)); | |||
add(new Res_PLCADDRESS("倒水减速角度", "VW1152", 1, 1)); | |||
add(new Res_PLCADDRESS("倒水减速角度", "VD1152", 1, 1)); | |||
add(new Res_PLCADDRESS("深度清洗", "M13.6", 0, 1)); | |||
add(new Res_PLCADDRESS("编码器复位", "M13.7", 0, 1)); | |||
@@ -1222,7 +1222,7 @@ public class ConfigName { | |||
add(new Res_PLCADDRESS("深度清洗功能", "-------------", 0, 0)); | |||
add(new Res_PLCADDRESS("清洗抽水量", "VW122", 1, 1)); | |||
add(new Res_PLCADDRESS("清洗时间", "VW1150", 1, 1)); | |||
add(new Res_PLCADDRESS("倒水减速角度", "VW1152", 1, 1)); | |||
add(new Res_PLCADDRESS("倒水减速角度", "VD1152", 1, 1)); | |||
add(new Res_PLCADDRESS("深度清洗", "M13.6", 0, 1)); | |||
add(new Res_PLCADDRESS("编码器复位", "M13.7", 0, 1)); | |||
@@ -1488,7 +1488,7 @@ public class ConfigName { | |||
add(new Res_PLCADDRESS("深度清洗功能", "-------------", 0, 0)); | |||
add(new Res_PLCADDRESS("清洗抽水量", "VW122", 1, 1)); | |||
add(new Res_PLCADDRESS("清洗时间", "VW1150", 1, 1)); | |||
add(new Res_PLCADDRESS("倒水减速角度", "VW1152", 1, 1)); | |||
add(new Res_PLCADDRESS("倒水减速角度", "VD1152", 1, 1)); | |||
add(new Res_PLCADDRESS("深度清洗", "M13.6", 0, 1)); | |||
add(new Res_PLCADDRESS("编码器复位", "M13.7", 0, 1)); | |||
@@ -201,14 +201,14 @@ public class fragment_plc_control extends LinearLayout { | |||
control_botton.setOnClickListener(new OnClickListener() { | |||
@Override | |||
public void onClick(View view) { | |||
ExecuteTheRecipe.WritePLC(model.name,true,null); | |||
new Handler().postDelayed(new Runnable() { | |||
@Override | |||
public void run() { | |||
ExecuteTheRecipe.WritePLC(model.name, false, null); | |||
} | |||
}, 500); | |||
ExecuteTheRecipe.WritePLC(model.name,true,null); | |||
new Handler().postDelayed(new Runnable() { | |||
@Override | |||
public void run() { | |||
ExecuteTheRecipe.WritePLC(model.name, false, null); | |||
} | |||
}, 500); | |||
ToastUtils.info(model.name+"执行成功!","Executed successfully!"); | |||
} | |||
}); | |||
@@ -227,12 +227,22 @@ public class fragment_plc_control extends LinearLayout { | |||
if(model.address.startsWith("VW")) | |||
{ | |||
Short val=Short.parseShort(text); | |||
ExecuteTheRecipe.WritePLC(model.name,val,null); | |||
try{ | |||
Short val=Short.parseShort(text); | |||
ExecuteTheRecipe.WritePLC(model.name,val,null); | |||
}catch (Exception e){ | |||
ToastUtils.warning("输入数据不合法!"); | |||
return; | |||
} | |||
}else if(model.address.startsWith("VD")) | |||
{ | |||
int val=Integer.parseInt(text); | |||
ExecuteTheRecipe.WritePLC(model.name,val,null); | |||
try{ | |||
int val=Integer.parseInt(text); | |||
ExecuteTheRecipe.WritePLC(model.name,val,null); | |||
}catch (Exception e){ | |||
ToastUtils.warning("输入数据不合法!"); | |||
return; | |||
} | |||
} | |||
else if(model.address.startsWith("VR")) | |||
{ | |||
@@ -248,8 +258,13 @@ public class fragment_plc_control extends LinearLayout { | |||
ExecuteTheRecipe.WritePLC(model.name,val,null); | |||
}else | |||
{ | |||
Short val=Short.parseShort(text); | |||
ExecuteTheRecipe.WritePLC(model.name,val,null); | |||
try{ | |||
Short val=Short.parseShort(text); | |||
ExecuteTheRecipe.WritePLC(model.name,val,null); | |||
}catch (Exception e){ | |||
ToastUtils.warning("输入数据不合法!"); | |||
return; | |||
} | |||
} | |||
ToastUtils.info("写入地址:"+model.address+"成功!","Write address:"+model.address+"successfully!"); | |||
break; | |||
@@ -92,7 +92,7 @@ | |||
</RelativeLayout> | |||
<LinearLayout | |||
android:visibility="gone" | |||
android:visibility="visible" | |||
android:layout_width="wrap_content" | |||
android:layout_height="wrap_content"> | |||
<TextView | |||