#
luxiaotao1123
2020-08-17 080a3a42da0f4244f4f078b62f10bad11156a5a0
src/main/java/com/zy/core/thread/DevpThread.java
@@ -31,12 +31,12 @@
    public DevpThread(Slave slave) {
        this.slave = slave;
        connect();
    }
    @Override
    @SuppressWarnings("InfiniteLoopStatement")
    public void run() {
        connect();
        while (true) {
            try {
                int step = 1;
@@ -140,11 +140,12 @@
        Slave slave = new Slave();
        slave.setIp("192.168.2.125");
        DevpThread devpThread = new DevpThread(slave);
        devpThread.connect();
        devpThread.read();
        // 写
        StaProtocol staProtocol = devpThread.getStation().get(1);
        staProtocol.setWorkNo((short) 888);
        staProtocol.setStaNo((short) 1001);
        staProtocol.setWorkNo((short) 232);
        staProtocol.setStaNo((short) 6);
        staProtocol.setAutoing(true);
        staProtocol.setEmptyMk(true);
        staProtocol.setInEnable(true);