| | |
| | | */ |
| | | private void readStatus(){ |
| | | try { |
| | | OperateResultExOne<byte[]> result = siemensNet.Read("DB100.0", (short) 16); |
| | | OperateResultExOne<byte[]> result = siemensNet.Read("DB100.0", (short) 18); |
| | | if (result.IsSuccess) { |
| | | if (null == rgvProtocol || rgvProtocol.getRgvNo() == null) { |
| | | rgvProtocol = new RgvProtocol(); |
| | |
| | | OutputQueue.RGV.offer(MessageFormat.format("【{0}】[id:{1}] <<<<< 实时数据更新成功", DateUtils.convert(new Date()), slave.getId())); |
| | | if (rgvProtocol.getAlarm() > 0 ){ |
| | | BasRgvErrService basRgvErrService = SpringUtils.getBean(BasRgvErrService.class); |
| | | News.error("RGV 异常 ===>> [id:{}] [ip:{}],报警代码:{},报警文本:{}",slave.getId(), slave.getIp(),rgvProtocol.getAlarm(),basRgvErrService.selectById(rgvProtocol.getAlarm()).getErrName()); |
| | | News.errorNoLog("RGV 异常 ===>> [id:{}] [ip:{}],报警代码:{},报警文本:{}",slave.getId(), slave.getIp(),rgvProtocol.getAlarm(),basRgvErrService.selectById(rgvProtocol.getAlarm()).getErrName()); |
| | | }else { |
| | | News.info("RGV状态正常==>[id:{}]",slave.getId()); |
| | | News.infoNoLog("RGV状态正常==>[id:{}]",slave.getId()); |
| | | } |
| | | |
| | | // 工位1复位信号 |