ZengTao
2024-01-25 bc4a9c7700fbda51a57207fd445a02ad21e85911
springboot-vue3/src/main/java/com/example/springboot/component/PlcParameter1Review.java
@@ -25,7 +25,7 @@
  private ResourceLoader resourceLoader;
  private volatile static PlcParameter1Review instance = null;
  private PlcParameter1Review() {
  public PlcParameter1Review() {
    init();
  }
@@ -93,19 +93,24 @@
      } catch (InterruptedException e) {
        e.printStackTrace();
      }
      byte[] getplcvlues = S7control.getinstance().ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength());
     // byte[] getplcvlues = S7control.getinstance().ReadByte(plcParameterObject.getPlcAddressBegin(), plcParameterObject.getPlcAddressLength());
      byte[] getplcvlues = {0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02, 0x03, 0x04,0x01, 0x02};
      plcParameterObject.setPlcParameterList(getplcvlues);
      int index = plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddressIndex();
      S7control.getinstance().WriteWord(plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddress(index), (short) 100);
    //  int index = plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddressIndex();
     // S7control.getinstance().WriteWord(plcParameterObject.getPlcParameter("conveyorVelocity(AutoFAST)").getAddress(index), (short) 100);
      List<String> addresses = new ArrayList<>();
      addresses.add("conveyorVelocity(AutoFAST)");
      addresses.add("conveyorVelocity(AutoSLOW)");
      addresses.add("conveyorVelocity(Manual)");
      addresses.add("A01A02TURNJOGVelocity");
      addresses.add("A01A02TRAVELJOGVelocity");
      addresses.add("A01A02TURNPOSVelocityAUTO");
//      addresses.add("conveyorVelocity(AutoSLOW)");
//      addresses.add("conveyorVelocity(Manual)");
//      addresses.add("A01A02TURNJOGVelocity");
//      addresses.add("A01A02TRAVELJOGVelocity");
      plcParameterObject.getPlcParameterValues(addresses);
      System.out.println(plcParameterObject.getPlcParameterValues(addresses));
      JSONObject jsonObject = new JSONObject();