Skip to main content
Skip table of contents

get_force_control_state()

Features

It monitors the state of compliance and force control.

Return

[singularity, mode, stx, fd, ref]

ValueDescription

singularity

Risk : 0 < 1 < 2

0 : Safe section

1 : Stage 1 risk section of the singularity area

2 : Stage 2 risk section of the singularity area

mode

Information of 6 modes x, y, z, rx, ry and rz (sequential)

0 : Compliance control

1 : Force control

2 : None

Stx

6 in the order of x, y, z, rx, ry and rz

Information of set target stiffness

fd

6 in the order of x, y, z, rx, ry and rz

Information of set target force

ref

Information of set target force

0 : Base coordinate

1 : Tool coordinate

2 : World coordinate

101 ~ 120 : User coordinate

Exception

ExceptionDescription

DR_Error (DR_ERROR_TYPE)

Parameter data error

DR_Error (DR_ERROR_VALUE)

Invalid parameter value

DR_Error (DR_ERROR_RUNTIME)

C Extension module error

DR_Error (DR_ERROR_STOP)

Program terminated forcibly

Example

PY
set_ref_coord(DR_BASE)
P0 = posj(0, 0, 90, 0, 90, 0)
movej(P0,vel=30,acc=60)

task_compliance_ctrl()
set_stiffnessx([500, 500, 500, 100, 100, 100], time=0.5)

while True:
    [singularity, mod, stx, fd, ref]=get_force_control_state()
tp_log("s={0}, m={1}, k={2}, f={3}, r={4}".format(singularity,mod,stx,fd,ref))  
    wait(0.5)
release_compliance_ctrl()

Related Commands

JavaScript errors detected

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

If this problem persists, please contact our support.