Breadcrumbs

is_done_bolt_tightening()

Definition

is_done_bolt_tightening(m=0, timeout=0, axis=None)

Features

This function monitors the tightening torque of the tool and returns True if the set torque (m) is reached within the given time and False if the given time has passed.

Parameters

Parameter Name

Data Type

Default Value

Description

m

float

0

Target torque

timeout

float

0

Monitoring duration [sec]

axis

int

-

axis

  • DR_AXIS_X: x-axis

  • DR_AXIS_Y: y-axis

  • DR_AXIS_Z: z-axis

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_RUNTIME)

C extension module error occurred

DR_Error (DR_ERROR_STOP)

Program terminated forcefully

Example

Python
p0 = posj(0,0,90,0,90,0)
movej(p0, v=30, a=30)

task_compliance_ctrl()
xd = posx(559, 34.5, 651.5, 0, 180.0, 60)
amovel(xd, vel=50, acc=50) # Bolt tightening motion

res = is_done_bolt_tightening(10, 5, DR_AXIS_Z)
	# Returns True if the tightening torque of 10Nm is reached within 5 seconds. 	
	# Returns False otherwise. 
if res==True:
  # some action comes here for the case that bolt tightening is done
  x=1 
else:
  # some action comes here for the case that it fails
  x=2