| | |
| | | import com.zy.core.enums.SlaveType; |
| | | import com.zy.core.model.JarSlave; |
| | | import com.zy.core.model.Task; |
| | | import com.zy.core.model.command.CrnCommand; |
| | | import com.zy.core.model.command.JarCommand; |
| | | import com.zy.core.model.protocol.JarProtocol; |
| | | import lombok.Data; |
| | |
| | | break; |
| | | // 写数据 ID+目标站 |
| | | case 2: |
| | | write(null); |
| | | write((JarCommand) task.getData()); |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | jarProtocol.setStatus(siemensS7Net.getByteTransform().TransInt16(result.Content, 16));//状态 |
| | | |
| | | jarProtocol.setAutoing(siemensS7Net.getByteTransform().TransInt16(result.Content, 12) == 2);//自动 |
| | | |
| | | // |
| | | // jarProtocol.setMode(2);//模式 |
| | | // jarProtocol.setStatus((short)1);//状态 |
| | | // jarProtocol.setLeftDoorOpen(0);//open the left door //进料门 |
| | | // jarProtocol.setLeftDoorClose(0);//close the left door //进料门 |
| | | // jarProtocol.setRightDoorOpen(0);//open the right door //出料门 |
| | | // jarProtocol.setRightDoorClose(0);//close the right door //出料门 |
| | | |
| | | |
| | | // 根据实时信息更新数据库 |
| | | BasJarService service = SpringUtils.getBean(BasJarService.class); |
| | | if (null != service) { |