| | |
| | | //如果有同类型时直接增加 |
| | | if(cageid!=Integer.MIN_VALUE){ |
| | | //发送plc任务 |
| | | Mestast(glassid, 1001, cageid, 1,"MESID1"); |
| | | //任务发送字 |
| | | //Mestast(glassid,1001,cageid,1); |
| | | |
| | | }else{ |
| | |
| | | } |
| | | //当返回的格子号为空时,返回400笼子已满 |
| | | if(cageid!=Integer.MIN_VALUE){ |
| | | Mestast(glassid,1001,cageid,1); |
| | | Mestast(glassid,1001,cageid,1,"MESID1"); |
| | | //发送plc任务 |
| | | |
| | | }else{ |
| | |
| | | |
| | | StorageCage glass= albaniaMapper.SelectCageGlass(glasstype); |
| | | //发送配片数据 |
| | | Mestast(glassmate.getGlasstype()+"i", glass.getId(),2002, 0); |
| | | Mestast(glassmate.getGlasstype()+"i", glass.getId(),2002, 0,"MESID1"); |
| | | albaniaMapper.AddFinishNumber(flowcard, mateid, tier); |
| | | albaniaMapper.Inserttask(1, 0, glass.getId(), 2002, glassmate.getGlassid()+i, glasstype,glass.getFlowcard(),mateid,tier); |
| | | if(tier==sumid){ |
| | |
| | | glassidlist.add((byte) iditem); |
| | | } |
| | | byte[] bytes = Bytes.toArray(glassidlist); |
| | | //writeString |
| | | System.out.println("outmesidbytes:" + bytes.length); |
| | | S7control.getinstance().WriteByte(plcmes.getPlcParameter(address).getAddress(),bytes); |
| | | System.out.println(plcmes.getPlcParameter(address).getAddress()); |
| | | System.out.println(); |
| | | |
| | | //S7control.getinstance().WriteByte(plcmes.getPlcParameter(address).getAddress(),bytes); |
| | | //S7control.getinstance().WriteByte(address, bytes);// 派发出片id |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | //下发理片任务 |
| | | public void Mestast(String glassid,int MESToPLCStart1,int MESToPLCTarget1,int MESToPLC) { |
| | | outmesid(glassid, "MESID1");//下发玻璃id |
| | | public void Mestast(String glassid,int MESToPLCStart1,int MESToPLCTarget1,int MESToPLC,String address) { |
| | | //outmesid(glassid, "MESID1");//下发玻璃id |
| | | S7control.getinstance().writeString(plcmes.getPlcParameter(address).getAddress(),glassid); |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToPLCStart1").getAddress(), (short) MESToPLCStart1);//起始位置 |
| | | S7control.getinstance().WriteWord(plcmes.getPlcParameter("MESToPLCTarget1").getAddress(), (short) MESToPLCTarget1);//目标位置 |
| | | if(MESToPLC!=0){ |