自动化立体仓库 - WCS系统
zjj
2023-11-23 86e5cfe90f800ba197c466fdd659c65873a813e1
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -246,23 +246,23 @@
//
//            }
        //RGV台车位置
        Thread.sleep(200);
        OperateResultExOne<byte[]> result3 = siemensS7Net.Read("DB100.0",(short)4);
        if (result3.IsSuccess) {
            for (int i = 0; i < 2; i++) {
                Integer siteId = i==0 ? 112 : 212; // 站点编号
                StaProtocol staProtocol = station.get(siteId);
                if (null == staProtocol) {
                    staProtocol = new StaProtocol();
                    staProtocol.setSiteId(siteId);
                    station.put(siteId, staProtocol);
                }
                staProtocol.setNearbySta(String.valueOf(siemensS7Net.getByteTransform().TransInt16(result3.Content, i*2)));
//                String aa = staProtocol.getNearbySta();
//                System.out.println(siteId + "===>>" + staProtocol.getNearbySta());
            }
        }
//        //RGV台车位置
//        Thread.sleep(200);
//        OperateResultExOne<byte[]> result3 = siemensS7Net.Read("DB100.0",(short)4);
//        if (result3.IsSuccess) {
//            for (int i = 0; i < 2; i++) {
//                Integer siteId = i==0 ? 1 : 2; // 站点编号
//                StaProtocol staProtocol = station.get(siteId);
//                if (null == staProtocol) {
//                    staProtocol = new StaProtocol();
//                    staProtocol.setSiteId(siteId);
//                    station.put(siteId, staProtocol);
//                }
//                staProtocol.setNearbySta(String.valueOf(siemensS7Net.getByteTransform().TransInt16(result3.Content, i*2)));
////                String aa = staProtocol.getNearbySta();
////                System.out.println(siteId + "===>>" + staProtocol.getNearbySta());
//            }
//        }
//        OperateResultExOne<Short> result2 = siemensS7Net.ReadInt16("DB200.0");
//        if (result2.IsSuccess) {