| | |
| | | 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 { |
| | |
| | | } |
| | | @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); |
| | | } |
| | | } |
| | | } |