move_home()

Definition

move_home(target)

Features

Homing is performed by moving to the joint motion to the mechanical or user defined home position. According to the input parameter [target], it moves to the mechanical home defined in the system or the home set by the user.

Caution

  • When using the Move command after homing is complete, it is recommended to use the wait command after homing.

Parameters

Parameter Name

Data Type

Default Value

Range

Description

target

int

DR_HOME_TARGET_MECHANIC


Target of home position

  • DR_HOME_TARGET_MECHANIC : Mechanical home, joint angle (0,0,0,0,0,0)

  • DR_HOME_TARGET_USER : user home.

Note

  • Homing motion is divided into two steps and performed sequentially.

    1. Move to the homing position at the speed specified in the system.

    2. Finding the home position precisely

  • Safety should be ensured so that there is no danger of collision in the vicinity of homing operation.

Return

Value

Description

0

Success

Negative value

Error

Exception

Exception

Description

DR_Error (DR_ERROR_TYPE)

Parameter data type error occurred

DR_Error (DR_ERROR_VALUE)

Parameter value is invalid

DR_Error (DR_ERROR_RUNTIME)

C extension module error occurred

DR_Error (DR_ERROR_STOP)

Program terminated forcefully

Example

Python
# Example 1. Move to the mechanical home, then joint motion to P0
move_home(DR_HOME_TARGET_MECHANIC)  # Move to the mechanical home (default; identical to move_home() when the argument is omitted)
wait(1)                             # Using wait after homing is recommended before a Move command (see Caution)
P0 = posj(0,0,90,0,90,0)
movej(P0, vel=30, acc=30)                           # Joint motion from the home position to P0

# Example 2. Move to the user home, then joint motion to P0
move_home(DR_HOME_TARGET_USER)      # Move to the user-defined home
wait(1)                             # Using wait after homing is recommended before a Move command (see Caution)
P0 = posj(0,0,90,0,90,0)
movej(P0, vel=30, acc=30)                           # Joint motion from the home position to P0