其它入库 退货入库逻辑修改
This commit is contained in:
@@ -100,7 +100,7 @@ public class PlcSsjRead implements Runnable {
|
||||
}
|
||||
|
||||
/**
|
||||
* 入库输送机
|
||||
* 巷道输送机
|
||||
*
|
||||
* @param ssjDevice
|
||||
*/
|
||||
@@ -117,7 +117,7 @@ public class PlcSsjRead implements Runnable {
|
||||
}
|
||||
|
||||
/**
|
||||
* 拣选口输送机
|
||||
* 入出库输送机
|
||||
*
|
||||
* @param ssjDevice
|
||||
*/
|
||||
@@ -136,7 +136,7 @@ public class PlcSsjRead implements Runnable {
|
||||
}
|
||||
|
||||
/**
|
||||
* 出库输送机
|
||||
* 产线输送机
|
||||
*
|
||||
* @param ssjDevice
|
||||
*/
|
||||
@@ -151,8 +151,19 @@ public class PlcSsjRead implements Runnable {
|
||||
ssjDevice.setTraySize(ParseUtil.optInt(6, ddsx1));
|
||||
ssjDevice.setTaskNo(ParseUtil.optDInt(8, ddsx1));
|
||||
|
||||
|
||||
OperateResultExOne<byte[]> trayCodeRead = readWriteNet.Read("DB502.0", Short.parseShort("220"));
|
||||
String trayCodeReadAddress="";
|
||||
switch (ssjDevice.getDeviceCode()){
|
||||
case "G1005":
|
||||
trayCodeReadAddress = "DB502.0";
|
||||
break;
|
||||
case "L2012":
|
||||
trayCodeReadAddress = "DB503.0";
|
||||
break;
|
||||
case "L2013":
|
||||
trayCodeReadAddress = "DB504.0";
|
||||
break;
|
||||
}
|
||||
OperateResultExOne<byte[]> trayCodeRead = readWriteNet.Read(trayCodeReadAddress, Short.parseShort("220"));
|
||||
if (trayCodeRead.IsSuccess){
|
||||
byte[] content = trayCodeRead.Content;
|
||||
//去除bytes中
|
||||
@@ -208,12 +219,12 @@ public class PlcSsjRead implements Runnable {
|
||||
setIsConnect(false);
|
||||
}
|
||||
|
||||
public static int writeToSsj(String address, String taskNo, int qx) {
|
||||
public static int writeToSsj(String address, String taskNo, int qx , int completed) {
|
||||
|
||||
int jym = Tools.getJYM(Integer.parseInt(taskNo), qx, 1);
|
||||
int jym = Tools.getJYM(Integer.parseInt(taskNo), qx, completed);
|
||||
SendData taskNoSendData = new SendData(Tools.INT, taskNo);
|
||||
SendData qxSendData = new SendData(Tools.INT, qx);
|
||||
SendData completedSendData = new SendData(Tools.INT, 1);
|
||||
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