pang.jiabao
2024-10-16 ceb33d7020bcc1620d43cdcb9d1ea51a17c81a0d
src/main/java/com/zy/core/thread/SiemensCrnThread.java
@@ -242,7 +242,7 @@
        }
//        convertRow(command);
        command.setCrnNo(slave.getId());
        short[] array = new short[10];
        short[] array = new short[12];
        array[0] = command.getAckFinish();
        array[1] = command.getTaskNo();
        array[2] = command.getTaskMode();
@@ -252,15 +252,18 @@
        array[6] = command.getDestinationPosX();
        array[7] = command.getDestinationPosY();
        array[8] = command.getDestinationPosZ();
//        array[9] = command.getSourceStaNo();
//        array[10] = command.getDestinationStaNo();
        array[9] = command.getCommand();
        array[9] = command.getSourceStaNo();
        array[10] = command.getDestinationStaNo();
        array[11] = command.getCommand();
        OperateResult result = siemensNet.Write("DB100.0", array);
        if (command.getAckFinish() == 0) {
        if(!result.IsSuccess){
            return false;
        }
        if (command.getAckFinish().intValue() == 0) {
            short commandFinish = 1;
            Thread.sleep(100L);
            result = siemensNet.Write("DB100.18", commandFinish);
            result = siemensNet.Write("DB100.22", commandFinish);
        }
        try {
@@ -273,12 +276,12 @@
                    command.getTaskModeType().toString(),    // 模式
                    command.getSourcePosX().intValue(),    // 源排
                    command.getSourcePosY().intValue(),    // 源列
                    command.getSourcePosZ().intValue(),    // 源层
                    null,    // 源站
                    command.getSourceStaNo().intValue(),    // 源层
                    command.getDestinationPosZ().intValue(),    // 源站
                    command.getDestinationPosX().intValue(),    // 目标排
                    command.getDestinationPosY().intValue(),    // 目标列
                    command.getDestinationPosZ().intValue(),    // 目标层
                    null,    // 目标站
                    command.getDestinationStaNo().intValue(),    // 目标站
                    null,    // 响应结果
                    null,    // 修改时间
                    null    // 修改人员