自动化立体仓库 - WCS系统
Junjie
2023-05-11 44fa920bbcf6cd94c81f3a6d2f3008925a8635ca
src/main/java/com/zy/core/thread/ShuttleThread.java
@@ -918,7 +918,7 @@
     * 获取托盘顶升命令
     * @param lift 1顶升,2下降
     */
    private ShuttleCommand getPalletCommand(Short lift) {
    public ShuttleCommand getPalletCommand(Short lift) {
        ShuttleCommand command = new ShuttleCommand();
        command.setCommandWord((short) 2);
        command.setStartCodeNum((short) 0);
@@ -938,7 +938,7 @@
     * 正常移动命令
     * @return
     */
    private ShuttleCommand getMoveCommand(Short startCodeNum, Short distCodeNum, Integer startToDistDistance, Short runDirection) {
    public ShuttleCommand getMoveCommand(Short startCodeNum, Short distCodeNum, Integer startToDistDistance, Short runDirection) {
        ShuttleCommand command = new ShuttleCommand();
        command.setCommandWord((short) 1);
        command.setStartCodeNum(startCodeNum);
@@ -957,7 +957,7 @@
     * 强制移动命令
     * @param direction 移动方向 1左移,2右移,3前移,4后移
     */
    private ShuttleCommand getForceMoveCommand(Short direction) {
    public ShuttleCommand getForceMoveCommand(Short direction) {
        ShuttleCommand command = new ShuttleCommand();
        command.setCommandWord((short) 3);
        command.setStartCodeNum((short) 0);
@@ -975,7 +975,7 @@
    /**
     * 状态复位命令
     */
    private ShuttleCommand getResetCommand() {
    public ShuttleCommand getResetCommand() {
        ShuttleCommand command = new ShuttleCommand();
        command.setCommandWord((short) 6);
        command.setStartCodeNum((short) 0);
@@ -998,7 +998,7 @@
     * 获取寻库位命令
     * @param direction 1:向正方向(左)寻库位,2:向负方向(右)寻库位,3:向负方向(后)寻库位,4:向正方向(前)寻库位
     */
    private ShuttleCommand getFindLocCommand(Short direction, Integer startToDistance, Short runSpeed) {
    public ShuttleCommand getFindLocCommand(Short direction, Integer startToDistance, Short runSpeed) {
        ShuttleCommand command = new ShuttleCommand();
        command.setCommandWord((short) 4);
        command.setRunDirection(direction);
@@ -1012,14 +1012,14 @@
     * 获取寻库位命令,默认移动距离3000,运行速度1000
     * @param direction 1:向正方向(左)寻库位,2:向负方向(右)寻库位,3:向负方向(后)寻库位,4:向正方向(前)寻库位
     */
    private ShuttleCommand getFindLocCommand(Short direction) {
    public ShuttleCommand getFindLocCommand(Short direction) {
        return getFindLocCommand(direction, 3000, (short) 1000);
    }
    /**
     * 获取充电开关命令
     */
    private ShuttleCommand getChargeSwitchCommand() {
    public ShuttleCommand getChargeSwitchCommand() {
        ShuttleCommand command = new ShuttleCommand();
        command.setCommandWord((short) 8);
        command.setIOControl((short) 4);
@@ -1027,6 +1027,18 @@
        return command;
    }
    /**
     * charge:1=>开始充电,2=>断开充电
     */
    public ShuttleCommand getChargeSwitchCommand(Short charge) {
        ShuttleCommand command = new ShuttleCommand();
        command.setCommandWord((short) 5);//充电
        command.setShuttleNo(shuttleProtocol.getShuttleNo());
        command.setChargeSwitch(charge);//开始充电
        command.setCommandEnd((short) 1);
        return command;
    }
    /******************************************************************************************/
    /**************************************** 测试专用 *****************************************/
    /*****************************************************************************************/