| | |
| | | // \\ TODO Auto-generated catch block |
| | | e.printStackTrace(); |
| | | } |
| | | // List<Short> ss= S7control.getinstance().ReadWord("DB14.0", 1); |
| | | // System.out.println(ss); |
| | | |
| | | String E01id = S7control.getinstance().readStrings("DB14.0"); |
| | | System.out.println(E01id); |
| | | // if (S7control.getinstance().CheckConnected() == false) { |
| | | |
| | | spianService = WebSocketServer.applicationContext.getBean(SpianServiceNew.class); |
| | | albaniaMapper = WebSocketServer.applicationContext.getBean(AlbaniaMapper.class); |
| | | //spianService.selectAll(albaniaMapper.SelectGlass()); |
| | | //读取DB14区文件 |
| | | PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | |
| | | |
| | | |
| | | String ExportTOMES1=plcmes.getPlcParameter("ExportTOMES1").getValue();//出片请求一线 |
| | | String ExportToMES2=plcmes.getPlcParameter("ExportToMES2").getValue();//出片请求二线 |
| | |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(), (short) 1); |
| | | spianService.selectout(1); |
| | | } |
| | | //二线号请求时 |
| | | // //二线号请求时 |
| | | if (ExportToMES2.equals("1") == true&&B01State.equals("0")==true) { |
| | | //将运输车状态改为忙碌 |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(), (short) 1); |
| | | spianService.selectout(2); |
| | | } |
| | | //进片请求时 |
| | | if(PLCToMES!=null && B01State!=null){ |
| | | if(PLCToMES.equals("1")==true&&B01State.equals("0")==true){ |
| | | //将运输车状态改为忙碌 |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(), (short) 1); |
| | | //S7control.getinstance().WriteWord(plcmes.getPlcParameter("B01report").getAddress(), (short) 1); |
| | | |
| | | spianService.selectAll(albaniaMapper.SelectGlass()); |
| | | } |
| | | |
| | | |
| | | |
| | | //任务完成时 |
| | | if(TastState.equals("1")==true){ |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | // 查询数据库 |
| | | // 推送到前端 |