|
@@ -87,7 +87,7 @@ public class PlcUtil {
|
|
|
}
|
|
}
|
|
|
}else if(MesClient.tjFlaga == 2){ // 运行中
|
|
}else if(MesClient.tjFlaga == 2){ // 运行中
|
|
|
MesClient.batch_scan_1.setEnabled(false);
|
|
MesClient.batch_scan_1.setEnabled(false);
|
|
|
- Boolean starta = s7PLC.readBoolean("DB1.2.5"); //A焊接完成
|
|
|
|
|
|
|
+ Boolean starta = s7PLC.readBoolean("DB1.2.4"); //A焊接完成
|
|
|
Boolean startb = s7PLC.readBoolean("DB1.2.3"); //B启动中
|
|
Boolean startb = s7PLC.readBoolean("DB1.2.3"); //B启动中
|
|
|
if(starta || startb){ // B启动中,A当做完成
|
|
if(starta || startb){ // B启动中,A当做完成
|
|
|
MesClient.tjFlaga = 3;
|
|
MesClient.tjFlaga = 3;
|
|
@@ -148,7 +148,7 @@ public class PlcUtil {
|
|
|
}
|
|
}
|
|
|
}else if(MesClient.tjFlagb == 2){ // 运行中
|
|
}else if(MesClient.tjFlagb == 2){ // 运行中
|
|
|
MesClient.batch_scan_2.setEnabled(false);
|
|
MesClient.batch_scan_2.setEnabled(false);
|
|
|
- Boolean starta = s7PLC.readBoolean("DB1.2.7"); //B焊接完成
|
|
|
|
|
|
|
+ Boolean starta = s7PLC.readBoolean("DB1.2.5"); //B焊接完成
|
|
|
Boolean startb = s7PLC.readBoolean("DB1.2.2"); //A启动中
|
|
Boolean startb = s7PLC.readBoolean("DB1.2.2"); //A启动中
|
|
|
if(starta || startb){
|
|
if(starta || startb){
|
|
|
MesClient.tjFlagb = 3;
|
|
MesClient.tjFlagb = 3;
|
|
@@ -237,11 +237,11 @@ public class PlcUtil {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 获取A的结束状态
|
|
|
|
|
|
|
+ // 获取A的结束状态:A焊接完成 或 B启动中
|
|
|
public static Boolean getAFinish(S7PLC s7PLC){
|
|
public static Boolean getAFinish(S7PLC s7PLC){
|
|
|
try{
|
|
try{
|
|
|
- boolean a = s7PLC.readBoolean("DB1.2.5");
|
|
|
|
|
- boolean b = s7PLC.readBoolean("DB1.2.6");
|
|
|
|
|
|
|
+ boolean a = s7PLC.readBoolean("DB1.2.4"); //A焊接完成
|
|
|
|
|
+ boolean b = s7PLC.readBoolean("DB1.2.3"); //B启动中
|
|
|
return a || b;
|
|
return a || b;
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
@@ -252,18 +252,18 @@ public class PlcUtil {
|
|
|
// 获取B启动状态
|
|
// 获取B启动状态
|
|
|
public static Boolean getBStart(S7PLC s7PLC){
|
|
public static Boolean getBStart(S7PLC s7PLC){
|
|
|
try{
|
|
try{
|
|
|
- return s7PLC.readBoolean("DB1.2.6");
|
|
|
|
|
|
|
+ return s7PLC.readBoolean("DB1.2.3"); //B启动中
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
return false;
|
|
return false;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- // 获取B的结束状态
|
|
|
|
|
|
|
+ // 获取B的结束状态:B焊接完成 或 A启动中
|
|
|
public static Boolean getBFinish(S7PLC s7PLC){
|
|
public static Boolean getBFinish(S7PLC s7PLC){
|
|
|
try{
|
|
try{
|
|
|
- boolean a = s7PLC.readBoolean("DB1.2.7");
|
|
|
|
|
- boolean b = s7PLC.readBoolean("DB1.2.4");
|
|
|
|
|
|
|
+ boolean a = s7PLC.readBoolean("DB1.2.5"); //B焊接完成
|
|
|
|
|
+ boolean b = s7PLC.readBoolean("DB1.2.2"); //A启动中
|
|
|
return a || b;
|
|
return a || b;
|
|
|
}catch (Exception e){
|
|
}catch (Exception e){
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|