Breadcrumbs

motion_pause()

Features

This function pauses the motion or force control being performed. Only the motion or force control currently being performed is paused, and other functions that operate asynchronously are not affected.

Parameter

None

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
# pre-setting
set_velj(30)
set_accj(30)
set_velx(250)
set_accx(250)

# pause motion
movej([0, 0, 0, 0, 0, 0])
amovej([0, 0, 90, 0, 90, 0])
wait(1)
motion_pause()
wait(1)
motion_resume()
wait(5)

# pause motion in compliance control
movej(posj(0, 0, 90, 0, 90, 0))
task_compliance_ctrl()
amovel(posx(0, 0, -300, 0, 0, 0))
wait(1)
motion_pause()
wait(10)
motion_resume()
wait(5)
release_compliance_ctrl()

# pause force control
movej(posj(0, 0, 90, 0, 90, 0))
task_compliance_ctrl()
fd = [0, 0, -5, 0, 0, 0]
fctrl_dir= [0, 0, 1, 0, 0, 0]
set_desired_force(fd, dir=fctrl_dir)
wait(2)
motion_pause()
wait(2)
motion_resume()
wait(2)
release_force()
wait(0.5)
release_compliance_ctrl()

Related commands