springboot-vue3/src/main/java/com/example/springboot/component/PLCAutoMes.java
@@ -35,6 +35,14 @@ return instance; } private static String jsonFilePath = PLCAutoMes.class.getResource("/JsonFile/PlcMes.json").getPath(); private static String jsonFilePath2 = PLCAutoMes.class.getResource("/JsonFile/PlcRead.json").getPath(); // 调用initword方法 public static PlcParameterObject PlcMesObject = initUtil.initword(jsonFilePath); // 调用initbit方法 public static PlcParameterObject PlcReadObject = initUtil.initword(jsonFilePath2); @Override public void run() { while (this != null) { @@ -45,26 +53,16 @@ e.printStackTrace(); } String jsonFilePath = PLCAutoMes.class.getResource("/JsonFile/PlcMes.json").getPath(); String jsonFilePath2 = PLCAutoMes.class.getResource("/JsonFile/PlcRead.json").getPath(); // String jsonFilePath3 = PLCAutoMes.class.getResource("/JsonFile/Plcframe.json").getPath(); // String jsonFilePath3 = // PLCAutoMes.class.getResource("/JsonFile/Plcframe.json").getPath(); // System.out.println(jsonFilePath); // 调用initword方法 PlcParameterObject PlcMesObject= initUtil.initword(jsonFilePath); // 调用initbit方法 PlcParameterObject PlcReadObject= initUtil.initword(jsonFilePath2); // // 调用initbit方法 // PlcParameterObject PlcframeObject= initUtil.initword(jsonFilePath3); readAndUpdateWordValues(PlcReadObject); readAndUpdateWordValues(PlcMesObject); PlcParameterObject PlcReadObjects=PlcReadObject; // readAndUpdateWordValues(PlcReadObject); // readAndUpdateWordValues(PlcMesObject); // readAndUpdateWordValues(PlcframeObject); // readAndUpdateWordValues(plcStateObject); int index = PlcMesObject.getPlcParameter("AddStart").getAddressIndex(); @@ -81,9 +79,6 @@ addresses2.add("FeedCarStatus"); System.out.println(PlcReadObject.getPlcParameterValues(addresses2)); } } springboot-vue3/src/main/java/com/example/springboot/component/Plchome.java
@@ -20,6 +20,7 @@ import com.example.springboot.entity.StorageCage; import com.example.springboot.entity.alarmmg; import com.example.springboot.entity.north_glass_buffer1; import com.example.springboot.entity.device.PlcParameterObject; import com.example.springboot.mapper.HomeMapper; import com.example.springboot.mapper.SpianMapper; @@ -63,6 +64,9 @@ try { Thread.sleep(1000); // 注入mapper PlcParameterObject PlcReadObjects=PLCAutoMes.PlcMesObject; homeMapper = WebSocketServer.applicationContext.getBean(HomeMapper.class); spianMapper = WebSocketServer.applicationContext.getBean(SpianMapper.class); spianService = WebSocketServer.applicationContext.getBean(SpianService.class); springboot-vue3/src/main/java/com/example/springboot/config/AppRunnerConfig.java
@@ -17,35 +17,11 @@ // System.out.println("启动完成"); <<<<<<< HEAD // new PlcHold().start(); // new Plchome().start(); new PlcLayout().start(); new Plcalarm().start(); new Plcsign().start(); new Plcstate().start(); new PlcPositioning1().start(); new PlcParameter2().start(); new PLCAutomaticParameterSetting().start(); new PlcManualonePosition().start(); new PlcManualonePosition2().start(); new PlcServoManualone().start(); new PLCManualJog().start(); new Plclog().start(); new PlcInteractionState().start(); ======= // new PlcHold().start(); new PLCAutoMes().start(); // new PLCAutomaticParameterSettingReview2().start(); new Plchome().start(); //new Plchome().start(); // new PlcLayout().start(); // new Plcalarm().start(); @@ -65,7 +41,6 @@ // new Plclog().start(); // new PlcInteractionState().start(); >>>>>>> f66c565a395e10901fc71abcfa37f4ff5a15be09 //new PlcParameter1Review().start(); // new PLCAutomaticParameterSettingReview().start(); }