From f884d266dce2295e75462e931f7fb60eb2c23c80 Mon Sep 17 00:00:00 2001
From: whycq <10027870+whycq@user.noreply.gitee.com>
Date: 星期日, 30 六月 2024 10:25:21 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/sxjzwcs' into sxjzwcs
---
src/main/java/com/zy/common/model/MatDto.java | 2
src/main/java/com/zy/core/thread/SiemensCrnThread.java | 87 ++++++++++++++
src/main/java/com/zy/core/thread/LedThread.java | 74 +++++++++---
src/main/webapp/static/images/zy-logo.png | 0
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java | 146 ++++++++++++++++++-----
src/main/java/com/zy/core/MainProcess.java | 3
src/main/resources/application.yml | 4
7 files changed, 262 insertions(+), 54 deletions(-)
diff --git a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
index 6b6667f..68c88ca 100644
--- a/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
+++ b/src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -96,7 +96,7 @@
* 缁勬墭
* 鍏ュ簱绔欙紝鏍规嵁鏉$爜鎵弿鐢熸垚鍏ュ簱宸ヤ綔妗o紝宸ヤ綔鐘舵�� 2
*/
- public synchronized void generateStoreWrkFile(Integer mark) {
+ public synchronized void generateStoreWrkFile(Integer mark) throws InterruptedException {
// 鏍规嵁杈撻�佺嚎plc閬嶅巻
for (DevpSlave devp : slaveProperties.getDevp()) { //閬嶅巻杈撻�佺嚎
// 閬嶅巻鍏ュ簱鍙�
@@ -125,10 +125,7 @@
鏄�2鍙疯緭閫佺嚎9995鎷f枡浠诲姟
*/
String barcode = barcodeThread.getBarcode();
- if (Cools.isEmpty(barcode) || !staProtocol.isInEnable() || staProtocol.isEmptyMk()
- || !staProtocol.isFullPlt() || (staProtocol.getWorkNo() == 9995 && devp.getId() == 2)) {
- continue;
- }
+
// 灏哄妫�娴嬪紓甯�
boolean back = false;
@@ -192,6 +189,12 @@
devpThread.setPakMk(staProtocol.getSiteId(), false);
MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, errMsg));
+ Thread.sleep(500);
+ }
+
+ if (Cools.isEmpty(barcode) || !staProtocol.isInEnable() || staProtocol.isEmptyMk()
+ || !staProtocol.isFullPlt() || (staProtocol.getWorkNo() <= 9000 && devp.getId() == 2)) {
+ continue;
}
if (staProtocol.isAutoing() && staProtocol.isInEnable()
@@ -206,21 +209,23 @@
continue;
}
}
- if (wrkMast != null && devp.getId() == 2) {
- News.warn(""+mark+" - 4"+" - 宸ヤ綔妗d腑宸插瓨鍦ㄨ绔欑姸鎬佷负锛� 2.璁惧涓婅蛋 锛夌殑鏁版嵁,宸ヤ綔鍙�={}", wrkMast.getWrkNo());
- staProtocol.setWorkNo((short)9999);
- staProtocol.setStaNo(inSta.getBackSta().shortValue());
- devpThread.setPakMk(staProtocol.getSiteId(), false);
- boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
- if (!result) {
- throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触");
- }
-
- // led 寮傚父鏄剧ず
- if (ledThread != null) {
- String errorMsg = "宸ヤ綔妗e凡瀛樺湪璇ユ潯鐮佸彿===>>" + barcode;
- MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, errorMsg));
- }
+ if (wrkMast != null) {
+// News.warn(""+mark+" - 4"+" - 宸ヤ綔妗d腑宸插瓨鍦ㄨ绔欑姸鎬佷负锛� 2.璁惧涓婅蛋 锛夌殑鏁版嵁,宸ヤ綔鍙�={}", wrkMast.getWrkNo());
+// if (devp.getId() == 2) {
+// staProtocol.setWorkNo((short)9999);
+// staProtocol.setStaNo(inSta.getBackSta().shortValue());
+// devpThread.setPakMk(staProtocol.getSiteId(), false);
+// boolean result = MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
+// if (!result) {
+// throw new CoolException("鏇存柊plc绔欑偣淇℃伅澶辫触");
+// }
+// }
+//
+// // led 寮傚父鏄剧ず
+// if (ledThread != null) {
+// String errorMsg = "宸ヤ綔妗e凡瀛樺湪璇ユ潯鐮佸彿===>>" + barcode;
+// MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(5, errorMsg));
+// }
continue;
}
@@ -262,9 +267,22 @@
ledCommand.setTitle("鍏ㄦ澘鍏ュ簱");
ledCommand.setLocNo(dto.getLocNo());
ledCommand.setStaNo(dto.getStaNo());
+ ArrayList<MatDto> matDtos = new ArrayList<>();
+ MatDto matDto = new MatDto();
+ matDto.setLocNo(dto.getLocNo());
+ matDtos.add(matDto);
+ ledCommand.setMatDtos(matDtos);
ledCommand.setBarcode(barcode);
commands.add(ledCommand);
- MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, commands));
+ if (devp.getId() == 1) {
+ if (MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(1, commands))){
+ ledThread.setLedMk(false);
+ }
+ } else {
+ if (MessageQueue.offer(SlaveType.Led, inSta.getLed(), new Task(3, commands))){
+ ledThread.setLedMk(false);
+ }
+ }
// ledThread.errorReset();
}
} else {
@@ -445,14 +463,17 @@
.eq("stn_no", stnNo) // 浣滀笟绔欑偣 = 鎷f枡鍑哄簱鐨勭洰鏍囩珯
.eq("crn_no", wrkMast.getCrnNo()); // 鍫嗗灈鏈哄彿
StaDesc staDesc = staDescService.selectOne(wrapper);
+ //LED
+ LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, pickSta.getLed());
if (Cools.isEmpty(staDesc)) {
News.error(""+mark+" - 2"+" - 鍏ュ簱璺緞涓嶅瓨鍦紒type_no={},stn_no={},crn_no={}", wrkMast.getIoType(), pickSta.getStaNo(), wrkMast.getCrnNo());
- staProtocol.setWorkNo((short) 9999);
- staProtocol.setStaNo(pickSta.getBackSta().shortValue());
- devpThread.setPakMk(staProtocol.getSiteId(), false);
- MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
- //LED
- LedThread ledThread = (LedThread) SlaveConnection.get(SlaveType.Led, pickSta.getLed());
+ if (devp.getId() == 2) {
+ staProtocol.setWorkNo((short) 9999);
+ staProtocol.setStaNo(pickSta.getBackSta().shortValue());
+ devpThread.setPakMk(staProtocol.getSiteId(), false);
+ MessageQueue.offer(SlaveType.Devp, devp.getId(), new Task(2, staProtocol));
+ }
+
// led 寮傚父鏄剧ず
if (ledThread != null) {
String errorMsg = "姝や负鎷f枡銆佸苟鏉裤�佺洏鐐瑰啀鍏ュ簱.璇锋斁鍦�"+pickSta.getBackSta().shortValue()+"绔欑偣";
@@ -499,6 +520,29 @@
e.printStackTrace();
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
continue;
+ }
+ List<LedCommand> commands = new ArrayList<>();
+ LedCommand ledCommand = new LedCommand();
+ ledCommand.setWorkNo(wrkMast.getWrkNo());
+ ledCommand.setIoType(wrkMast.getIoType());
+ ledCommand.setTitle(wrkMast.getIoType() == 53 ? "鎷f枡鍐嶅叆搴�" : "鐩樼偣鍐嶅叆搴�");
+ ledCommand.setLocNo(wrkMast.getLocNo());
+ ledCommand.setStaNo(wrkMast.getStaNo());
+ ledCommand.setBarcode(barcode);
+ ArrayList<MatDto> matDtos = new ArrayList<>();
+ MatDto matDto = new MatDto();
+ matDto.setLocNo(wrkMast.getLocNo());
+ matDtos.add(matDto);
+ ledCommand.setMatDtos(matDtos);
+ commands.add(ledCommand);
+ if (devp.getId() == 1) {
+ if (MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(1, commands))) {
+ ledThread.setLedMk(false);
+ }
+ } else {
+ if (MessageQueue.offer(SlaveType.Led, pickSta.getLed(), new Task(3, commands))){
+ ledThread.setLedMk(false);
+ }
}
// 鏇存柊绔欑偣淇℃伅 涓� 涓嬪彂plc鍛戒护
@@ -1546,12 +1590,22 @@
// 缁勮鍛戒护
LedCommand ledCommand = new LedCommand();
ledCommand.setWorkNo(dto.getWorkNo());
- ledCommand.setIoType(1);
- ledCommand.setTitle("鍏ㄦ澘鍏ュ簱");
+ ledCommand.setIoType(10);
+ ledCommand.setTitle("绌烘澘鍏ュ簱");
ledCommand.setLocNo(dto.getLocNo());
ledCommand.setStaNo(dto.getStaNo());
+ ledCommand.setBarcode("");
+ ArrayList<MatDto> matDtos = new ArrayList<>();
+ MatDto matDto = new MatDto();
+ matDto.setLocNo(dto.getLocNo());
+ matDtos.add(matDto);
+ ledCommand.setMatDtos(matDtos);
commands.add(ledCommand);
- MessageQueue.offer(SlaveType.Led, emptyInSta.getLed(), new Task(3, commands));
+ if (devp.getId() == 1) {
+ MessageQueue.offer(SlaveType.Led, emptyInSta.getLed(), new Task(1, commands));
+ } else {
+ MessageQueue.offer(SlaveType.Led, emptyInSta.getLed(), new Task(3, commands));
+ }
// ledThread.errorReset();
}
} else {
@@ -1600,6 +1654,9 @@
// 宸ヤ綔妗i泦鍚�
List<WrkMast> wrkMasts = new ArrayList<>();
for (Integer staNo : led.getStaArr()) {
+ if (staNo == 104 || staNo == 204 || staNo == 304) {
+ continue;
+ }
// 鑾峰彇鍙夎溅绔欑偣
StaProtocol staProtocol = devpThread.getStation().get(staNo);
if (null == staProtocol || null == staProtocol.getWorkNo() || 0 == staProtocol.getWorkNo() || !staProtocol.isLoading()) {
@@ -1674,7 +1731,7 @@
} else {
ledThread.setLedMk(false);
}
- } else {
+ } else if(led.getId() == 1 || led.getId() == 2){
if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(1, commands))) {
News.error(""+mark+" - 3"+" - {}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort());
continue;
@@ -1745,11 +1802,20 @@
// led鏄剧ず榛樿鍐呭
if (reset && !ledThread.isLedMk()) {
ledThread.setLedMk(true);
- if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(4, new ArrayList<>()))) {
- News.error(""+mark+" - 1"+" - {}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort());
- } else {
+ if (led.getId() <=2 ) {
+ if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(2, new ArrayList<>()))) {
+ News.error(""+mark+" - 1"+" - {}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort());
+ } else {
+ }
+ } else {
+ if (!MessageQueue.offer(SlaveType.Led, led.getId(), new Task(4, new ArrayList<>()))) {
+ News.error(""+mark+" - 1"+" - {}鍙稬ED鍛戒护涓嬪彂澶辫触锛侊紒锛乕ip锛歿}] [port锛歿}]", led.getId(), led.getIp(), led.getPort());
+ } else {
+
+ }
}
+
}
}
News.infoNoLog(""+mark+" - 0"+" - 鎵ц瀹屾垚锛氬叾浠� ===>> LED鏄剧ず鍣ㄥ浣嶏紝鏄剧ず榛樿淇℃伅");
@@ -2325,4 +2391,16 @@
}
}
+ public void resetOneLed() {
+ // 鏍规嵁杈撻�佺嚎plc閬嶅巻
+ for (DevpSlave devp : slaveProperties.getDevp()) { //閬嶅巻杈撻�佺嚎
+ if (devp.getId() == 1) {
+ // 閬嶅巻鍏ュ簱鍙�
+ for (DevpSlave.Sta inSta : devp.getInSta()) { // 閬嶅巻鍏ュ簱鍙�
+ SiemensDevpThread devpThread = (SiemensDevpThread) SlaveConnection.get(SlaveType.Devp, devp.getId());
+ StaProtocol staProtocol = devpThread.getStation().get(inSta.getStaNo());
+ }
+ }
+ }
+ }
}
diff --git a/src/main/java/com/zy/common/model/MatDto.java b/src/main/java/com/zy/common/model/MatDto.java
index 6c20f86..900c637 100644
--- a/src/main/java/com/zy/common/model/MatDto.java
+++ b/src/main/java/com/zy/common/model/MatDto.java
@@ -27,6 +27,8 @@
// 鎵规
private String batch;
+ private String locNo;
+
public MatDto() {
}
diff --git a/src/main/java/com/zy/core/MainProcess.java b/src/main/java/com/zy/core/MainProcess.java
index b5c9937..bb6bfe2 100644
--- a/src/main/java/com/zy/core/MainProcess.java
+++ b/src/main/java/com/zy/core/MainProcess.java
@@ -70,6 +70,9 @@
mainService.outOfDevp(11);
+ // 澶嶄綅涓�鏈焞ed鍏ュ簱鍚庢樉绀洪粯璁や俊鎭�
+// mainService.resetOneLed();
+
//mainService.DevpCallThePolice(12);
diff --git a/src/main/java/com/zy/core/thread/LedThread.java b/src/main/java/com/zy/core/thread/LedThread.java
index 75a0f53..259ef47 100644
--- a/src/main/java/com/zy/core/thread/LedThread.java
+++ b/src/main/java/com/zy/core/thread/LedThread.java
@@ -113,25 +113,31 @@
// 鍒涘缓涓�涓暟鎹〉
TextBxPage page = new TextBxPage();
for (LedCommand command : list) {
- page.newLine(command.getTitle() +"锛�"+command.getWorkNo()+")");
- if (!command.isEmptyMk()) {
- for (MatDto matDto : command.getMatDtos()) {
- //鍘绘帀灏忔暟鐐�
- String strQty = matDto.getCount().toString();
- int idx = strQty.lastIndexOf(".");
- if(idx >= 0){
- strQty = strQty.substring(0,idx);
- }
- page.newLine(matDto.getMatnr());
- page.newLine(matDto.getMaknx());
- page.newLine("[鏁伴噺锛�" + strQty + "/" + matDto.getTotal().intValue()+"]");
+ if (command.getIoType() < 100) {
+ page.newLine(command.getTitle());
+ page.newLine("浠诲姟鍙凤細" + command.getWorkNo());
+ page.newLine("搴撲綅鍙凤細" + command.getLocNo());
+ page.newLine("鏉$爜锛�" + command.getBarcode());
+ } else {
+ page.newLine(command.getTitle() + "(" + command.getWorkNo() + ")");
+ if (!command.isEmptyMk()) {
+ for (MatDto matDto : command.getMatDtos()) {
+ //鍘绘帀灏忔暟鐐�
+ String strQty = matDto.getCount().toString();
+ int idx = strQty.lastIndexOf(".");
+ if (idx >= 0) {
+ strQty = strQty.substring(0, idx);
+ }
+ page.newLine(matDto.getMatnr());
+ page.newLine(matDto.getMaknx());
+ page.newLine("[鏁伴噺锛�" + strQty + "/" + matDto.getTotal().intValue() + "]");
// page.newLine(matDto.getMaknx() + "[鏁伴噺" + strQty +"]");
// page.newLine(matDto.getMaknx() + "銆愭暟閲�" + matDto.getCount() +"銆�");
+ }
}
+ page.newLine("\n");
}
- page.newLine("\n");
}
-
// 璁剧疆瀛椾綋
page.setFont(new Font("瀹嬩綋",Font.PLAIN,12));
// 璁剧疆鏂囨湰棰滆壊
@@ -179,7 +185,7 @@
// page.newLine("鑷姩鍖栫珛浣撲粨搴�");
// page.newLine("瑗挎牸杩堣偂浠芥湁闄愬叕鍙�");
// }
- page.newLine("鍔涙簮鏅鸿兘浠撳偍");
+ page.newLine("鎹蜂紬鏅鸿兘浠撳偍");
// 璁剧疆瀛椾綋
page.setFont(new Font("瀹嬩綋",Font.PLAIN,13));
@@ -232,9 +238,41 @@
}
- private void error(String msg) {
- errorMsg.delete(0, errorMsg.length());
- errorMsg.append(msg);
+ private void error(String msg) throws Bx5GException {
+ if (slave.getId() <= 2) {
+ if (!connect()) {
+ return;
+ }
+ pf = new ProgramBxFile( 0, screen.getProfile());
+ pf.setFrameShow(false);
+ // 鍒嗗埆杈撳叆X锛孻锛寃idth锛宧eight
+ area = new TextCaptionBxArea( 0,0,96,48, screen.getProfile());
+ // 鍒涘缓涓�涓暟鎹〉
+ TextBxPage page = new TextBxPage();
+
+ page.newLine(msg);
+
+ // 璁剧疆瀛椾綋
+ page.setFont(new Font("瀹嬩綋",Font.PLAIN,12));
+ // 璁剧疆鏂囨湰棰滆壊
+ page.setForeground(Color.red);
+ // 璁剧疆鏄剧ず鐗规妧涓哄揩閫熸墦鍑�
+ page.setDisplayStyle(styles[6]);
+ area.clearPages();
+ area.addPage(page);
+ pf.addArea(area);
+ if (pf.validate() != null) {
+ News.info("Led"+" - 2"+" - pf out of range");
+ } else {
+ // 鏇存柊鑺傜洰
+ screen.writeProgram(pf);
+// resetStatus = false;
+ }
+ close();
+ } else {
+ errorMsg.delete(0, errorMsg.length());
+ errorMsg.append(msg);
+ }
}
public void errorReset() {
diff --git a/src/main/java/com/zy/core/thread/SiemensCrnThread.java b/src/main/java/com/zy/core/thread/SiemensCrnThread.java
index e69f212..c45527c 100644
--- a/src/main/java/com/zy/core/thread/SiemensCrnThread.java
+++ b/src/main/java/com/zy/core/thread/SiemensCrnThread.java
@@ -256,6 +256,49 @@
array[8] = command.getDestinationPosZ();
array[9] = command.getCommand();
result = siemensNet.Write("DB100.0", array);
+
+ //鍫嗗灈鏈轰换鍔″啓鍏ュ悗锛屽洖璇讳竴娆★紝鐪嬫槸鍚︽垚鍔�
+ Thread.sleep(200);
+ try{
+ OperateResultExOne<byte[]> resultRead = siemensNet.Read("DB100.0", (short) 18);
+ if (resultRead.IsSuccess) {
+ CrnCommand one = new CrnCommand();
+ one.setTaskNo(siemensNet.getByteTransform().TransInt16(resultRead.Content, 2));
+ one.setTaskMode(siemensNet.getByteTransform().TransInt16(resultRead.Content, 4));
+ one.setSourcePosX(siemensNet.getByteTransform().TransInt16(resultRead.Content, 6));
+ one.setSourcePosY(siemensNet.getByteTransform().TransInt16(resultRead.Content, 8));
+ one.setSourcePosZ(siemensNet.getByteTransform().TransInt16(resultRead.Content, 10));
+ one.setDestinationPosX(siemensNet.getByteTransform().TransInt16(resultRead.Content, 12));
+ one.setDestinationPosY(siemensNet.getByteTransform().TransInt16(resultRead.Content, 14));
+ one.setDestinationPosZ(siemensNet.getByteTransform().TransInt16(resultRead.Content, 16));
+ if (!command.getTaskNo().equals(one.getTaskNo()) || !command.getTaskMode().equals(one.getTaskMode())
+ || !command.getSourcePosX().equals(one.getSourcePosX()) || !command.getSourcePosY().equals(one.getSourcePosY())
+ || !command.getSourcePosZ().equals(one.getSourcePosZ()) || !command.getDestinationPosX().equals(one.getDestinationPosX())
+ || !command.getDestinationPosY().equals(one.getDestinationPosY()) || !command.getDestinationPosZ().equals(one.getDestinationPosZ())
+ ){
+ try{
+ News.error("鍫嗗灈鏈哄懡浠ゅ湴鍧�鍐欏叆鍚庡洖璇诲け璐id:{}] >>>>> 鍐欏叆[{}],===>>鍥炶[{}]", slave.getId(), JSON.toJSON(command),JSON.toJSON(one));
+ }catch (Exception e){
+ try{
+ News.error("鏃ュ織鎵撳嵃澶辫触锛�===>>鍙傛暟one鎶ラ敊 [id:{}],{}", slave.getId(), JSON.toJSON(command),JSON.toJSON(resultRead));
+ }catch (Exception e1){
+ News.error("鏃ュ織鎵撳嵃澶辫触锛�===>> [id:{}],{}", slave.getId(), JSON.toJSON(command));
+ }
+ }
+ if(!resetFlag){
+ News.error("鍫嗗灈鏈哄懡浠ゅ洖璇诲け璐ュ悗锛岄噸鏂版坊鍔犱换鍔″埌闃熷垪2 ===>> [id:{}],{}", slave.getId(), JSON.toJSON(command));
+ MessageQueue.offer(SlaveType.Crn, slave.getId(), new Task(2, command));
+ }
+ Thread.sleep(100);
+ readStatus();
+ return false;
+ } else {
+// News.info("鍫嗗灈鏈哄懡浠ゅ湴鍧�鍐欏叆鍚庡洖璇绘垚鍔焄id:{}] >>>>> 鍐欏叆[{}],===>>鍥炶[{}]", slave.getId(), JSON.toJSON(command),JSON.toJSON(one));
+ }
+ }
+ }catch (Exception e){
+ News.error("鍫嗗灈鏈哄懡浠ゅ湴鍧�鍐欏叆鍚庡洖璇诲嚭閿�");
+ }
}
} else {
// 鍐欎换鍔″畬鎴愮‘璁�
@@ -275,6 +318,50 @@
array[8] = command.getDestinationPosZ();
array[9] = command.getCommand();
result = siemensNet.Write("DB100.0", array);
+ log.info(JSON.toJSONString(array));
+
+ //鍫嗗灈鏈轰换鍔″啓鍏ュ悗锛屽洖璇讳竴娆★紝鐪嬫槸鍚︽垚鍔�
+ Thread.sleep(200);
+ try{
+ OperateResultExOne<byte[]> resultRead = siemensNet.Read("DB100.0", (short) 18);
+ if (resultRead.IsSuccess) {
+ CrnCommand one = new CrnCommand();
+ one.setTaskNo(siemensNet.getByteTransform().TransInt16(resultRead.Content, 2));
+ one.setTaskMode(siemensNet.getByteTransform().TransInt16(resultRead.Content, 4));
+ one.setSourcePosX(siemensNet.getByteTransform().TransInt16(resultRead.Content, 6));
+ one.setSourcePosY(siemensNet.getByteTransform().TransInt16(resultRead.Content, 8));
+ one.setSourcePosZ(siemensNet.getByteTransform().TransInt16(resultRead.Content, 10));
+ one.setDestinationPosX(siemensNet.getByteTransform().TransInt16(resultRead.Content, 12));
+ one.setDestinationPosY(siemensNet.getByteTransform().TransInt16(resultRead.Content, 14));
+ one.setDestinationPosZ(siemensNet.getByteTransform().TransInt16(resultRead.Content, 16));
+ if (!command.getTaskNo().equals(one.getTaskNo()) || !command.getTaskMode().equals(one.getTaskMode())
+ || !command.getSourcePosX().equals(one.getSourcePosX()) || !command.getSourcePosY().equals(one.getSourcePosY())
+ || !command.getSourcePosZ().equals(one.getSourcePosZ()) || !command.getDestinationPosX().equals(one.getDestinationPosX())
+ || !command.getDestinationPosY().equals(one.getDestinationPosY()) || !command.getDestinationPosZ().equals(one.getDestinationPosZ())
+ ){
+ try{
+ News.error("鍫嗗灈鏈哄懡浠ゅ湴鍧�鍐欏叆鍚庡洖璇诲け璐id:{}] >>>>> 鍐欏叆[{}],===>>鍥炶[{}]", slave.getId(), JSON.toJSON(command),JSON.toJSON(one));
+ }catch (Exception e){
+ try{
+ News.error("鏃ュ織鎵撳嵃澶辫触锛�===>>鍙傛暟one鎶ラ敊 [id:{}],{}", slave.getId(), JSON.toJSON(command),JSON.toJSON(resultRead));
+ }catch (Exception e1){
+ News.error("鏃ュ織鎵撳嵃澶辫触锛�===>> [id:{}],{}", slave.getId(), JSON.toJSON(command));
+ }
+ }
+ if(!resetFlag){
+ News.error("鍫嗗灈鏈哄懡浠ゅ洖璇诲け璐ュ悗锛岄噸鏂版坊鍔犱换鍔″埌闃熷垪2 ===>> [id:{}],{}", slave.getId(), JSON.toJSON(command));
+ MessageQueue.offer(SlaveType.Crn, slave.getId(), new Task(2, command));
+ }
+ Thread.sleep(100);
+ readStatus();
+ return false;
+ } else {
+ News.info("鍫嗗灈鏈哄懡浠ゅ湴鍧�鍐欏叆鍚庡洖璇绘垚鍔焄id:{}] >>>>> 鍐欏叆[{}],===>>鍥炶[{}]", slave.getId(), JSON.toJSON(command),JSON.toJSON(one));
+ }
+ }
+ }catch (Exception e){
+ News.error("鍫嗗灈鏈哄懡浠ゅ湴鍧�鍐欏叆鍚庡洖璇诲嚭閿�");
+ }
}
}
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index efdbaa0..411e226 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -205,14 +205,14 @@
ip: 10.10.10.107
port: 5005
devpPlcId: ${wcs-slave.devp[0].id}
- staArr: 101
+ staArr: 101,104
# LED2
led[1]:
id: 2
ip: 10.10.10.105
port: 5005
devpPlcId: ${wcs-slave.devp[0].id}
- staArr: 201
+ staArr: 201,204
# LED3
led[2]:
id: 3
diff --git a/src/main/webapp/static/images/zy-logo.png b/src/main/webapp/static/images/zy-logo.png
index 4865504..231c97e 100644
--- a/src/main/webapp/static/images/zy-logo.png
+++ b/src/main/webapp/static/images/zy-logo.png
Binary files differ
--
Gitblit v1.9.1