| | |
| | | this.lineConfigurationService = lineConfigurationService; |
| | | } |
| | | |
| | | public void plcStart() { |
| | | public void plcStart() throws Exception{ |
| | | Machine machine=machineMapper.selectById(thisMachine.getId()); |
| | | ModbusTcp modbusTcp1 =new ModbusTcp(machine.getIp(),machine.getPort(),machine.getFileName()); |
| | | try { |
| | |
| | | &&"开工".equals(machine.getState()) |
| | | &&taskingCount.size()<machine.getMaxTaskCount())){ |
| | | //Machine loadMachine=machineMapper.selectById(2L); |
| | | LineConfiguration lineConfigurationBefore=lineConfigurationService.machineLineConfigurationBefore(machine); |
| | | LineConfiguration lineConfigurationBefore=lineConfigurationService.machineLineConfigurationBeforeEdg(machine); |
| | | Machine loadMachine=machineMapper.selectById(lineConfigurationBefore.getMachineId()); |
| | | Tasking tasking; |
| | | String scan_id=""; |
| | |
| | | } |
| | | @Override |
| | | public void run() { |
| | | while (this != null) { |
| | | while (true) { |
| | | try { |
| | | Thread.sleep(1000); |
| | | plcStart(); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | } |