Skip to main content
Skip table of contents

check_force_condition(axis, min, max, ref)

Features

This function checks the status of the given force. It disregards the force direction and only compares the sizes. This condition can be repeated with the while or if statement. Measuring the force and 1)moment, axis is based on the ref coordinate.

1)Before V2.8 software version, measuring the moment, axis is based on the tool coordinate.

Parameters

Parameter NameData TypeDefault ValueDescription

axis

int

-

axis

  • DR_AXIS_X: x-axis
  • DR_AXIS_Y: y-axis
  • DR_AXIS_Z: z-axis
  • DR_AXIS_A: x-axis rotation
  • DR_AXIS_B: y-axis rotation
  • DR_AXIS_C: z-axis rotation

min

float

DR_COND_NONE

Minimum value (min ≥ 0)

max

float

DR_COND_NONE

Maximum value (max ≥ 0)

ref

int

None

reference coordinate

  • DR_BASE : base coordinate
  • DR_WORLD : world coordinate
  • DR_TOOL : tool coordinate
  • user coordinate: User defined

Return

ValueDescription

True

The condition is True.

False

The condition is False.

Exception

ExceptionDescription

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

PY
fcon1 = check_force_condition(DR_AXIS_Z, min=5, max=10, ref=DR_WORLD) 	        # 5 ≤f_z≤10

while (fcon1):
  fcon2 = check_force_condition(DR_AXIS_C, min=30)          	# 30≤m_z
  pcon1 = check_position_condition(DR_AXIS_X, min=0, max=0.1)	# 0≤x≤0.1
  
  if (fcon2 and pcon1):
    break

Related commands

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.