| | |
| | | devpThread.startSignal[i][0] = newSingle; |
| | | } |
| | | } |
| | | try{ |
| | | locMast = locMastService.selectOne(new EntityWrapper<LocMast>().eq("channel",(i+1))); |
| | | messageQueueOffer2(i,(short)((int)locMast.getFireStatus()),SlaveType.Devp, devp.getId()); |
| | | }catch (Exception e){ |
| | | log.error("火警 ===>> 给输送线发送警报失败,通道号:", i+1); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | return MessageQueue.offer(devp, id, new Task(3, staProtocol)); |
| | | } |
| | | |
| | | public boolean messageQueueOffer2(int i ,short newSingle,SlaveType devp,Integer id){ |
| | | //复位PLC信号,借用输送站点实体类 |
| | | StaProtocol staProtocol = new StaProtocol(); |
| | | staProtocol.setSiteId(i*2);//寄存器地址 |
| | | staProtocol.setStaNo(newSingle);//修改PLC寄存器地址值,8==>0 |
| | | return MessageQueue.offer(devp, id, new Task(5, staProtocol)); |
| | | } |
| | | |
| | | /** |
| | | * 将火警报警信号写入到堆垛机PLC中 |
| | | */ |
| | |
| | | case 4: |
| | | write103((String)task.getData()); |
| | | break; |
| | | // 写数据 103站点写入PACK码 |
| | | case 5: |
| | | StaProtocol staProtocol2 = (StaProtocol)task.getData(); |
| | | siemensS7Net.Write("DB102.0" + staProtocol2.getSiteId(), staProtocol2.getStaNo()==1); |
| | | break; |
| | | //复位测试信号 |
| | | case 3: |
| | | StaProtocol staProtocol = (StaProtocol)task.getData(); |