| | |
| | | // List<Short> listd17 = S7control.getinstance().ReadWord("DB17.0",10);
|
| | | // String id=spianService.queGlassid("DB17.10", 14).toString();
|
| | | //
|
| | | // // 铝框线交互
|
| | |
|
| | | // 铝框线交互
|
| | | // try {
|
| | | // if (CurrentFrame != null) {
|
| | | // spianService.outmesid(CurrentFrame.getBarCode(), "DB17.0");
|
| | | // }
|
| | | // List<Short> framerequests = S7control.getinstance().ReadWord("铝框id请求字地址", 1);
|
| | | // for (Short framerequest : framerequests) {
|
| | | // if (framerequest == 1) {
|
| | | // // 铝框id
|
| | | // String franmeno = spianService.queGlassid("DB17.10", 14).toString();
|
| | | // String position;
|
| | | // try {
|
| | | // position = dbserve.SelectPositionByFrameBarcode(franmeno);
|
| | | // } catch (SQLException e) {
|
| | | // // TODO Auto-generated catch block
|
| | | // position = "0";
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | // Short send;
|
| | | // if (position == "0") {
|
| | | // send = 0;
|
| | | // } else {
|
| | | // send = 1;
|
| | | // }
|
| | | // S7control.getinstance().WriteWord("铝框翻转发送地址", (short) send);
|
| | | // }
|
| | | // }
|
| | | // if (CurrentFrame != null) {
|
| | | // spianService.outmesid(CurrentFrame.getBarCode(), "DB17.0");
|
| | | // }
|
| | |
|
| | | // List<Short> framerequests = S7control.getinstance().ReadWord("铝框id请求字地址", 1);
|
| | | // for (Short framerequest : framerequests) {
|
| | | // if (framerequest == 1) {
|
| | | // // 铝框id
|
| | | // String franmeno = spianService.queGlassid("DB17.10", 14).toString();
|
| | | // String position;
|
| | | // try {
|
| | | // position = dbserve.SelectPositionByFrameBarcode(franmeno);
|
| | | // } catch (SQLException e) {
|
| | | // // TODO Auto-generated catch block
|
| | | // position = "0";
|
| | | // e.printStackTrace();
|
| | | // }
|
| | | // Short send;
|
| | | // if (position == "0") {
|
| | | // send = 0;
|
| | | // } else {
|
| | | // send = 1;
|
| | | // }
|
| | | // S7control.getinstance().WriteWord("铝框翻转发送地址", (short) send);
|
| | | // }
|
| | | // }
|
| | | // } catch (Exception e) {
|
| | | // // TODO: handle exception
|
| | | // // TODO: handle exception
|
| | | // }
|
| | |
|
| | | if (S7control.getinstance().CheckConnected() == true) {
|
| | |
| | | jsonObject.append("DeviceList", DeviceList);
|
| | | // 获取D01-D06,A01,A02,B01,B02玻璃id
|
| | | List<String> GlassIdList = new ArrayList<String>();
|
| | | GlassIdList.add(spianService.queGlassid("DB103.40", 14).toString());
|
| | | GlassIdList.add(spianService.queGlassid("DB103.44", 14).toString());
|
| | | GlassIdList.add(spianService.queGlassid("DB103.58", 14).toString());
|
| | |
|
| | | GlassIdList.add(spianService.queGlassid("DB103.184", 14).toString());
|
| | |
| | | for (Boolean emergencystop : emergencystops) {
|
| | | jsonObject.append("emergencystop", emergencystop);
|
| | | }
|
| | |
|
| | | // // 终止继续按钮
|
| | | // List<String> niuanaddressList3 =
|
| | | // Arrays.asList(config.getProperty("Parameter2.stop").split(","));
|
| | | // List<Boolean> anniuread =
|
| | | // S7control.getinstance().readBits(niuanaddressList3);
|
| | | // // Boolean[] value4 = { false, false};
|
| | | // // List<Boolean> anniuread = new ArrayList<>(Arrays.asList(value4));
|
| | | // Boolean[] value5 = { true };
|
| | | // List<Boolean> resets = new ArrayList<>(Arrays.asList(value5));
|
| | | // short[] anniuparams = new short[anniuread.size()];
|
| | | // for (int i = 0; i < anniuread.size(); i++) {
|
| | | // boolean value = anniuread.get(i);
|
| | | // anniuparams[i] = value ? (short) 1 : (short) 0;
|
| | | // }
|
| | |
|
| | | // short[] resets2 = new short[resets.size()];
|
| | | // for (int i = 0; i < resets.size(); i++) {
|
| | | // boolean value = resets.get(i);
|
| | | // resets2[i] = value ? (short) 1 : (short) 0;
|
| | | // }
|
| | |
|
| | | // for (short number : resets2) {
|
| | |
|
| | | // if (number == 1) {
|
| | | // jsonObject.append("Abort", anniuparams);
|
| | |
|
| | | // }
|
| | |
|
| | | // }
|
| | | }
|
| | |
|
| | | storageCageService = WebSocketServer.applicationContext.getBean(StorageCageService.class);
|