wuyouming666
2024-01-19 0a5cbfbcc2b882a9c8bd15bd28cd4d6ab962ba2b
springboot-vue3/src/main/java/com/example/springboot/component/PlcInteractionState.java
@@ -27,7 +27,7 @@
    public void run() {
        while (this != null) {
            try {
                Thread.sleep(500);
                Thread.sleep(100);
            } catch (InterruptedException e) {
                e.printStackTrace();
@@ -59,6 +59,9 @@
            List<String> addresses5 = Arrays.asList(config.getProperty("PlcInteractionState.MEStaskinformation").split(","));
            List<String> arraylist5 = S7control.getinstance().readStringsandword(addresses5);
            List<String> addresses6 = Arrays.asList(config.getProperty("PlcInteractionState.MEStaskinformation2").split(","));
            List<String> arraylist6 = S7control.getinstance().readStringsandword(addresses6);
//            String[] values = { ".x11","x21 ","x21 ","x21 ","x21 ","x21"};
//   List<String> arraylist = new ArrayList<>(Arrays.asList(values));
@@ -68,8 +71,12 @@
//            List<String> arraylist3 = new ArrayList<>(Arrays.asList(values3));
//            String[] values4 = { ".x11 ","x21 ","x21 ","x21 "};
//            List<String> arraylist4 = new ArrayList<>(Arrays.asList(values4));
//            String[] values5 = { ".x11 ","x21 ","x21 ","x21 ","x21 ","x21 ","x21 ","x21 ","x21 ","x21 "};
//            String[] values5 = { ".x11 ","x21 ","x21 ","b02","x21 ","x21 "};
//            List<String> arraylist5 = new ArrayList<>(Arrays.asList(values5));
//
//            String[] values6 = { "x21 ","x21 ","x21 ","x21 ","x21 ","x21 ","x21 "};
//            List<String> arraylist6 = new ArrayList<>(Arrays.asList(values6));
            JSONObject jsonObject = new JSONObject();
@@ -80,6 +87,7 @@
            jsonArray.put(arraylist3);
            jsonArray.put(arraylist4);
            jsonArray.put(arraylist5);
            jsonArray.put(arraylist6);
            jsonObject.put("zuhe1", jsonArray);