| | |
| | | PlcParameterObject plcmes=PLCAutoMes.PlcMesObject; |
| | | //显示工位上的玻璃信息 |
| | | public List<UpWorkstation> selectAll() { |
| | | List<UpWorkstation> glassInfo= LoadGlassMapper.SelectALL(); |
| | | List<UpWorkstation> glassInfo= LoadGlassMapper.selectALL(); |
| | | return glassInfo; |
| | | } |
| | | //增加人工输入的工位玻璃信息 |
| | | public void insertGlass(UpWorkstation upwork) { |
| | | LoadGlassMapper.insertGlass(upwork.getPatternwidth(),upwork.getPatternheigth(),upwork.getPatternthickness(),1); |
| | | LoadGlassMapper.insertGlass(upwork.getPatternwidth(),upwork.getPatternheigth(),upwork.getPatternthickness(),upwork.getWorkstationid()); |
| | | } |
| | | //删除人工搬走的玻璃信息 |
| | | public void deleteGlass(int id) { |
| | |
| | | } |
| | | |
| | | } |
| | | //判断优先吸片位置 |
| | | public int selectPriority() { |
| | | int loadid1=LoadGlassMapper.SelectPriority(1); |
| | | int loadid2=LoadGlassMapper.SelectPriority(2); |
| | | //判断优先吸片位置后发送出片任务 |
| | | public void selectPriority() { |
| | | int loadid1=LoadGlassMapper.selectPriority(1); |
| | | int loadid2=LoadGlassMapper.selectPriority(2); |
| | | //判断一二号工位哪边的顺序更先 |
| | | if(loadid1>loadid2) { |
| | | return 1; |
| | | s7control.WriteWord("DB100.10", (short)2); |
| | | }else if(loadid1==loadid2){ |
| | | //当两个工位上的玻璃数相同时,判断哪个工位上的玻璃数更少,优先清空一个架子 |
| | | int glassnum1=plcmes.getPlcParameter("玻璃数").getValue(); |
| | | int glassnum2=plcmes.getPlcParameter("玻璃数").getValue(); |
| | | if(glassnum1>glassnum2){ |
| | | s7control.WriteWord("DB100.10", (short)2); |
| | | }else{ |
| | | s7control.WriteWord("DB100.10", (short)1); |
| | | } |
| | | }else{ |
| | | return 2; |
| | | s7control.WriteWord("DB100.10", (short)1); |
| | | } |
| | | } |
| | | |