|  |  |  | 
|---|
|  |  |  | rgvProtocol.setRgvPos(slave.getId().longValue()*100000); | 
|---|
|  |  |  | OutputQueue.RGV.offer(MessageFormat.format("【{0}】[id:{1}] <<<<< 实时数据更新成功",DateUtils.convert(new Date()), slave.getId())); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | //                // 工位1复位信号 | 
|---|
|  |  |  | //                if (rgvProtocol.getStatusType1().equals(RgvStatusType.WAITING)) { | 
|---|
|  |  |  | //                    if (resetFlag1) { | 
|---|
|  |  |  | //                        RgvCommand rgvCommand = new RgvCommand(); | 
|---|
|  |  |  | //                        rgvCommand.setAckFinish1((short)1); | 
|---|
|  |  |  | //                        if (write(rgvCommand)) { | 
|---|
|  |  |  | //                            resetFlag1 = false; | 
|---|
|  |  |  | //                        } | 
|---|
|  |  |  | //                    } | 
|---|
|  |  |  | //                } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | try { | 
|---|
|  |  |  | // 根据实时信息更新数据库 | 
|---|
|  |  |  | BasRgvService basRgvService = SpringUtils.getBean(BasRgvService.class); | 
|---|
|  |  |  | 
|---|
|  |  |  | array[1] = command.getDestinationStaNo1(); | 
|---|
|  |  |  | array[2] = command.getTaskMode1();//任务模式 | 
|---|
|  |  |  | array[3] = command.getTaskNo1(); | 
|---|
|  |  |  | //        siemensNet.Write("DB100.20", 0); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | OperateResult result = siemensNet.Write("DB24.2", array); | 
|---|
|  |  |  |  | 
|---|
|  |  |  | if (command.getAckFinish1().equals((short)0)) { | 
|---|
|  |  |  | boolean commandFinish = true;  //工位1任务写入 | 
|---|
|  |  |  | Thread.sleep(100L); | 
|---|
|  |  |  | result = siemensNet.Write("DB24.10.0", commandFinish); | 
|---|
|  |  |  | result = siemensNet.Write("DB24.10.0", true); | 
|---|
|  |  |  | } else { | 
|---|
|  |  |  | siemensNet.Write("DB24.10.1", true); | 
|---|
|  |  |  | } | 
|---|