#
Administrator
昨天 1c8455e647bfb059d52788afaa845c52e7d6213f
src/main/java/com/zy/core/network/real/ZyCrnV2RealConnect.java
@@ -237,6 +237,11 @@
    }
    private boolean clearCommandArea() throws InterruptedException {
        boolean confirmClearResult = clearCommandConfirm();
        if (!confirmClearResult) {
            return false;
        }
        short[] array = new short[10];
        int clearIdx = 0;
@@ -256,6 +261,27 @@
        return false;
    }
    private boolean clearCommandConfirm() throws InterruptedException {
        int clearConfirmIdx = 0;
        do {
            OperateResult result = siemensNet.Write("DB100.18", (short) 0);
            if (result.IsSuccess) {
                OperateResultExOne<byte[]> resultRead = siemensNet.Read("DB100.18", (short) 2);
                if (resultRead.IsSuccess) {
                    short confirm = siemensNet.getByteTransform().TransInt16(resultRead.Content, 0);
                    if (confirm == 0) {
                        return true;
                    }
                }
            }
            clearConfirmIdx++;
            Thread.sleep(200);
        } while (clearConfirmIdx < 5);
        return false;
    }
    private boolean isCommandAreaEmpty(byte[] content) {
        short ackFinish = siemensNet.getByteTransform().TransInt16(content, 0);
        short taskNo = siemensNet.getByteTransform().TransInt16(content, 2);