| | |
| | | private S7objectMachine s7objectMachine; |
| | | public static int thinness = 40; |
| | | public static int edgSpeed = 40; |
| | | public static Long machineId = 6L; |
| | | //public static Long machineId = 6L; |
| | | public List<Map> sendRecords = new ArrayList<>(); |
| | | public Machine thisMachine; |
| | | |
| | | public MachineFlipSlice(MachineMapper machineMapper, TaskingService taskingService){ |
| | | public MachineFlipSlice(Machine machine,MachineMapper machineMapper, TaskingService taskingService){ |
| | | this.thisMachine = machine; |
| | | this.machineMapper = machineMapper; |
| | | this.taskingService = taskingService; |
| | | } |
| | | |
| | | public void plcStart() { |
| | | Long machineId=26L; |
| | | Machine machine=machineMapper.selectById(machineId); |
| | | //Long machineId=26L; |
| | | Machine machine=machineMapper.selectById(thisMachine.getId()); |
| | | if (s7objectMachine==null){ |
| | | s7objectMachine=new S7objectMachine(machine.getIp(),machine.getPort(),"PlcFlipSlice", EPlcType.S1200); |
| | | s7objectMachine=new S7objectMachine(machine.getIp(),machine.getPort(),machine.getFileName(), EPlcType.S1200); |
| | | s7objectMachine.start(); |
| | | } |
| | | PlcParameterObject plcParameterObject = s7objectMachine.PlcMesObject; |
| | |
| | | }else if(!scan_id.isEmpty()){ |
| | | taskingService.scanMachineAdd(machine,scan_id); |
| | | } |
| | | }else if("0".equals(plcRequest.getValue())){ |
| | | nullMachine(machine); |
| | | } |
| | | |
| | | } |