优化调整
This commit is contained in:
@@ -72,9 +72,9 @@ public class PlcDdj1Read extends Thread {
|
||||
msgDdj.setYxxf(ParseUtil.optInt(24, ddsx));
|
||||
msgDdj.setXtxh(ParseUtil.optInt(26, ddsx));
|
||||
|
||||
msgDdj.setCurrentRow(ParseUtil.optInt(26, ddsx));
|
||||
msgDdj.setCurrentColumn(ParseUtil.optInt(26, ddsx));
|
||||
msgDdj.setCurrentFloor(ParseUtil.optInt(26, ddsx));
|
||||
msgDdj.setCurrentRow(ParseUtil.optInt(18, ddsx));
|
||||
msgDdj.setCurrentColumn(ParseUtil.optInt(18, ddsx));
|
||||
msgDdj.setCurrentFloor(ParseUtil.optInt(18, ddsx));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,8 @@ public class PlcDdj1Read extends Thread {
|
||||
|
||||
void closeServer() {
|
||||
if (readWriteNet != null) {
|
||||
readWriteNet.ConnectClose();
|
||||
// readWriteNet.ConnectClose();
|
||||
siemensS7Net.ConnectClose();
|
||||
}
|
||||
setIsConnect(false);
|
||||
}
|
||||
|
||||
@@ -119,7 +119,8 @@ public class PlcDdj2Read extends Thread {
|
||||
|
||||
void closeServer() {
|
||||
if (readWriteNet != null) {
|
||||
readWriteNet.ConnectClose();
|
||||
// readWriteNet.ConnectClose();
|
||||
siemensS7Net.ConnectClose();
|
||||
}
|
||||
setIsConnect(false);
|
||||
}
|
||||
|
||||
@@ -108,9 +108,10 @@ public class PlcSsjRead implements Runnable {
|
||||
ssjDevice.setTaskNo(ParseUtil.optDInt(4, ddsx1));
|
||||
ssjDevice.setSszt(ParseUtil.optInt(8, ddsx1));
|
||||
ssjDevice.setRkqq(ParseUtil.optInt(10, ddsx1));
|
||||
ssjDevice.setTraySize(ParseUtil.optInt(12, ddsx1));
|
||||
ssjDevice.setHeight(ParseUtil.optInt(12, ddsx1));
|
||||
ssjDevice.setTrayCode(ParseUtil.optString(14, ddsx1));
|
||||
ssjDevice.setMode(ParseUtil.optInt(24, ddsx1));//todo 输送机操作模式
|
||||
ssjDevice.setException(ParseUtil.optInt(28, ddsx1));
|
||||
ssjDevice.setMode(ParseUtil.optInt(30, ddsx1));//todo 输送机操作模式
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,7 +247,8 @@ public class PlcSsjRead implements Runnable {
|
||||
|
||||
void closeServer() {
|
||||
if (readWriteNet != null) {
|
||||
readWriteNet.ConnectClose();
|
||||
// readWriteNet.ConnectClose();
|
||||
siemensS7Net.ConnectClose();
|
||||
}
|
||||
setIsConnect(false);
|
||||
}
|
||||
@@ -254,9 +256,13 @@ public class PlcSsjRead implements Runnable {
|
||||
public static int writeToSsj(String address, String taskNo, int qx , int completed) {
|
||||
|
||||
int jym = Tools.getJYM(Integer.parseInt(taskNo), qx);
|
||||
//任务号
|
||||
SendData taskNoSendData = new SendData(Tools.DINT, taskNo);
|
||||
//去向
|
||||
SendData qxSendData = new SendData(Tools.INT, qx);
|
||||
//下发完成
|
||||
SendData completedSendData = new SendData(Tools.INT, completed);
|
||||
//校验码
|
||||
SendData jymSendData = new SendData(Tools.INT, jym);
|
||||
byte[] bytes = Tools.sendData(taskNoSendData, qxSendData, completedSendData, jymSendData);
|
||||
return PlcSsjRead.WriteToSSJ(address, bytes);
|
||||
|
||||
Reference in New Issue
Block a user