Skip to content

Controller Extension Device Command Set (Optional)

Lifting mechanism

Set the open-loop speed control set_lift_speed

Set the open-loop speed control of the lifting mechanism.

  • Input parameter
ParameterTypeDescription
set_lift_speedstringSet the speed of the lifting mechanism.
speedintSpeed percentage, -100−100. speed<0: lifting mechanism moves down; speed>0: lifting mechanism moves up; speed=0: lifting mechanism stops moving.
  • Output parameter
ParameterTypeDescription
set_statebooltrue: setting succeeded, false: setting failed.
  • Code demo

Input

Set the lifting mechanism to move at a speed of 50%.

json
{"command":"set_lift_speed","speed":50}

Output

Setting succeeded

json
{
    "command": "set_lift_speed",
    "set_state": true
}

Set the closed-loop position control set_lift_height

Set the closed-loop position control of the lifting mechanism.

  • Input parameter
ParameterTypeDescription
set_lift_heightstringSet the height of the lifting mechanism.
heightintTarget height, unit: mm, range: 0−2,600.
speedintSpeed percentage, 1−100.
  • Output parameter
ParameterTypeDescription
trajectory_statebooltrue: setting succeeded, false: setting failed.
  • Code demo

Input

Set the lifting mechanism to move to the height of 1 m at a speed of 50%.

json
{"command":"set_lift_height","height":1000,"speed":50}

Output

Set success

json
{
    "command":"set_lift_height",
    "set_state":true
}

In-position success

json
{
    "device": 3,
    "state": "current _trajectory_state",
    "trajectory_connect": 0,
    "trajectory_state": true
}

Get the state of the lifting mechanism get_lift_state

  • Input parameter
ParameterTypeDescription
get_lift_statestringGet the state of the lifting mechanism.
  • Output parameter
ParameterTypeDescription
heightintHeight of the current lifting mechanism, unit: mm, accuracy: 1 mm, range: 0−2,300.
currentintCurrent of the current lifting drive, unit: mA, accuracy: 1 mA.
err_flagintError code of the lifting drive, refer to joint error codes for details.
modeintCurrent lifting state, 0: idle, 1: forward speed motion, 2: forward position motion, 3: backward speed motion, 4: backward position motion.
  • Code demo

Input

Get the state of the lifting mechanism

json
{"command":"get_lift_state"}

Output

In-position success

json
{
    "current": 2554,
    "en_flag": "1",
    "err_flag": "0",
    "height": 0,
    "joint_id": 1,
    "mode": 0,
    "state": "lift_state"
}

General expansion joint

Get the state of the expansion joint expand_get_state

  • Input parameter
ParameterTypeDescription
expand_get_statestringGet the state of the expansion joint.
  • Output parameter
ParameterTypeDescription
posintAngle of the expansion joint, unit: °, accuracy: 0.001°.
err_flagintError code of the lifting drive, refer to joint error codes for details.
en_flagintEnabling state of the expansion joint.
currentintCurrent of the current lifting drive, unit: mA, accuracy: 1 mA.
modeintCurrent lifting state, 0: idle, 1: forward speed motion, 2: forward position motion, 3: backward speed motion, 4: backward position motion.
joint_idintID of the expansion joint.
  • Code demo

Input

Execution: Get the state of the expansion joint.

json
{"command":"expand_get_state"}

Output

json
{
    "state": "expand_state",
    "pos": 0,
    "err_flag": 0,
    "en_flag": 1,
    "current": 0,
    " mode": 0,
    "joint_id": 1
}

Set the open-loop speed control of the expansion joint expand_set_speed

  • Input parameter
ParameterTypeDescription
expand_set_speedstringSet the open-loop speed control of the expansion joint.
speedintSpeed percentage.
  • Output parameter
ParameterTypeDescription
set_speed_statebooltrue: setting succeeded, false: setting failed.
  • Code demo

Input

// Execution: Move at a maximum speed of 50%.

json
{"command":"expand_set_speed","speed":-50}

Output

json
{
    "command": "expand_set_speed",
    "set_speed_state": true
}

Set the closed-loop position control of the expansion joint expand_set_pos

  • Input parameter
ParameterTypeDescription
expand_set_posstringSet the closed-loop position control of the expansion joint.
posintPosition.
speedintSpeed percentage.
  • Output parameter
ParameterTypeDescription
set_pos_statebooltrue: setting succeeded, false: setting failed.
  • Code demo

Input

Move to 0.0100° at a maximum speed of 50%.

json
{"command":"expand_set_pos","pos":100,"speed":50}

Output

json
{
    "command": "expand_set_pos",
    "set_pos_state": true
}

Once in position, an in-position command will be sent as follows:

json
{
    "state": "current_trajectory_state",
    "device": 4,
    "trajectory_state": true
}