自动化立体仓库 - WCS系统
123
ZY
3 天以前 1a1e3398d15027a65e56e0ed82e54f3a4feea0b6
src/main/java/com/zy/core/thread/SiemensDevpThread.java
@@ -121,20 +121,6 @@
        this.slave = slave;
    }
    public static void main(String[] args) {
        ArrayList<Integer> staNos = staNos1;
        System.out.println(staNos.indexOf(129));
        System.out.println(staNos.size());
        for (int i = 0; i < staNos.size(); i++) {
//            System.out.println(i*2);
//            System.out.println(i*2 + 200);
//            System.out.println(i);
        }
        int index = staNos.indexOf(128);
        System.out.println(index * 2);
        System.out.println(index * 2 + 200);
    }
    private ArrayList<Integer> getStaNo() {
        switch (slave.getId()) {
@@ -586,25 +572,5 @@
        siemensS7Net.ConnectClose();
    }
//    public static void main(String[] args) throws Exception {
//        DevpSlave slave = new DevpSlave();
//        slave.setIp("192.168.2.125");
//        SiemensDevpThread devpThread = new SiemensDevpThread(slave);
//        devpThread.connect();
//        devpThread.read();
//        // 写
//        StaProtocol staProtocol = devpThread.getStation().get(1);
//        staProtocol.setWorkNo((short) 232);
//        staProtocol.setStaNo((short) 6);
//        staProtocol.setAutoing(true);
//        staProtocol.setEmptyMk(true);
//        staProtocol.setInEnable(true);
//        devpThread.write(staProtocol);
//        System.out.println("----------------------------------------");
//        // 读
//        devpThread.read();
//        System.out.println(JSON.toJSONString(devpThread.station));
//
//    }
}