Skip to content

IO Configuration Command Set

Controller IO

The Gen 4 quantity and classification are as follows:

TypeDescription
Digital IO: DO/DI multiplexing4 channels, 0 V-24 V available

Set the digital IO mode set_IO_mode

  • Input parameter
ParameterTypeDescription
set_IO_modestringSet the digital IO mode.
IO_NumintIO port number, range: 1−4.
IO_modeintMode select. 0: general-purpose input mode.
1: general-purpose output mode.
2: input start function multiplexing mode.
3: input pause function multiplexing mode.
4: input resumption function multiplexing mode.
5: input emergency stop function multiplexing mode.
6: input to current loop drag multiplexing mode.
7: input to position-only drag mode (available for the 6-DoF force version).
8: input to orientation-only drag mode (available for the 6-DoF force version).
9: input to position-orientation drag multiplexing mode (available for the 6-DoF force version).
10: input maximum external axis soft limit multiplexing mode (available for external axis mode of expansion joints).
11: input minimum external axis soft limit multiplexing mode (available for external axis mode of expansion joints).
12: input initial pose function multiplexing mode (triggered by low level).
13: output collision function multiplexing mode (normal output: low level, error output: high level).
14: Real-Time Speed Adjustment Function Multiplexing Mode.
realtime_speedstringOptional parameter, set this parameter when IO_mode is set to 14 (Real-Time Speed Adjustment Function Multiplexing Mode).
speedintSpeed setting, value range 0-100.
modeintMode selection.
1-Single Trigger Mode, in single trigger mode, when IO is pulled low, the speed is set to the value of the speed parameter, and when the IO returns to a high level, the speed is set to the initial value;
2-Continuous Trigger Mode, in continuous trigger mode, when IO is pulled low, the speed is set to the value of the speed parameter, and when the IO returns to a high level, the speed maintains the current value.
3-Customize Level Speed Mode allows you to set the low-level speed and high-level speed independently. When enabled, the IO low-level speed is set to the value of the speed parameter, and the IO high-level speed is set to the value of the heightSpeed parameter.
  • Code demo

Input

Set the digital IO mode.

json
{"command":"set_IO_mode","IO_Num":1,"IO_mode":14,"realtime_speed":{"speed":50,"mode":1}}

Output

Setting succeeded:

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

Setting failed:

json
{
    "command": "set_IO_mode",
    "set_state": false
}

Set the digital IO output stateset_DO_state

  • Input parameter
ParameterTypeDescription
set_DO_statestringSet the digital IO output state.
IO_NumintIO port number, range: 1−4.
stateintIO state, 1: high output, 0: low output.
  • Code demo

Input

json
{"command":"set_DO_state","IO_Num":1,"state":1}

Output

Setting succeeded:

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

Setting failed:

json
{
    "command": "set_DO_state",
    "set_state": false
}

Get the digital IO state get_IO_state

  • Input parameter
ParameterTypeDescription
get_IO_statestringGet the digital IO output state.
IO_NumintIO port number, range: 1−4.
  • Output parameter
ParameterTypeDescription
IO_NumintIO port number, range: 1−4.
IO_modeintOutput setting mode.
0 - General Purpose Input Mode;
1 - General Purpose Output Mode;
2 - Input Start Function Multiplexing Mode;
3 - Input Pause Function Multiplexing Mode;
4 - Input Resume Function Multiplexing Mode;
5 - Input Emergency Stop Function Multiplexing Mode;
6 - Input Current Loop Drag Multiplexing Mode;
7 - Input Force-Only Position Drag Mode;
8 - Input Force-Only Posture Drag Mode;
9 - Input Force-Position Hybrid Drag Multiplexing Mode;
10 - Input External Axis Maximum Soft Limit Multiplexing Mode;
11 - Input External Axis Minimum Soft Limit Multiplexing Mode;
12 - Input Initial Pose Function Multiplexing Mode;
13 - Output Collision Function Multiplexing Mode;
14 - Real-Time Speed Adjustment Function Multiplexing Mode.
IO_StateintIO status, 1 for high output, 0 for low output.
realtime_speedobjectOptional parameter, returned when IO_mode is set to 14 (Real-Time Speed Adjustment Function Multiplexing Mode).
speedintOutput setting speed, value range 0-100.
modeintOutput setting mode.
1 - Single Trigger Mode, in single trigger mode, when the IO is pulled low, the speed is set to the value of the speed parameter, and when the IO returns to a high level, the speed is set to the initial value.
2 - Continuous Trigger Mode, in continuous trigger mode, when the IO is pulled low, the speed is set to the value of the speed parameter, and when the IO returns to a high level, the speed maintains the current value.
3-Customize Level Speed Mode allows you to set the low-level speed and high-level speed independently. When enabled, the IO low-level speed is set to the value of the speed parameter, and the IO high-level speed is set to the value of the heightSpeed parameter.
  • Code demo

Input

Get the digital IO output state

json
 {"command":"get_IO_state","IO_Num":1}

Output

json
{
    "command":"get_IO_state",
    "IO_Num": 1,
    "IO_Mode": 14,
    "IO_state": 1,
    "realtime_speed":
    {
        "speed":50,
        "mode":1
    }
}

Get all IO input statesget_IO_input

  • Input parameter
ParameterTypeDescription
get_IO_inputstringGet all IO input states.
  • Output parameter
ParameterTypeDescription
DIintDigital input state, 1: high, 0: low.
  • Code demo

Input

Get all IO input states.

json
{"command":"get_IO_input"}

Output

json
{
    "command":"get_IO_input",
    "DI": [
        1,
        1,
        1
    ]
}

Get all IO output statesget_IO_output

  • Input parameter
ParameterTypeDescription
get_IO_outputstringGet all IO output states.
  • Output parameter
ParameterTypeDescription
DOintDigital output state, 1: high, 0: low.
  • Code demo

Input Get all IO output states.

json
{"command":"get_IO_output"}

Output

json
{
    "command":"get_IO_output",
    "DO": [
        1,
        1,
        1,
        1
    ]
}

Set the power output set_voltage

  • Input parameter
ParameterTypeDescription
set_voltagestringSet the power output.
voltage_typeintPower output type, range: 0-3.
start_enablebooltrue means that the configured voltage will be output at startup, false means that the configured voltage at startup will be disabled.
  • Code demo

Input

Set the power output.

json
 {"command":"set_voltage","voltage_type":2,"start_enable":true}

Output

Setting succeeded:

json
{
    "command": "set_voltage",
    "state": true
}

Setting failed:

json
{
    "command": "set_voltage",
    "state": false
}

Get the power output get_voltage

  • Input parameter
ParameterTypeDescription
get_voltagestringGet the power output.
  • Output parameter
ParameterTypeDescription
voltage_typeintPower output type, 0: 0 V, 2: 12 V, 3: 24 V.
  • Code demo

Input Get the controller power output type.

json
{"command":"get_voltage"}

Output

json
{
    "command": "voltage_state",
    "voltage_type": 2
}

End Effector IO

The end effector is equipped with IO ports, categorized and quantified as follows:

TypeDescription
Power outputOne channel, 0 V/12 V/24 V available.
Digital IOTwo channels, input/output available.
Communication portOne channel, RS485 available.

Set the tool-end digital IO output stateset_tool_DO_state

  • Input parameter
ParameterTypeDescription
set_tool_DO_statestringSet the digital IO output state.
IO_NumintIO port number, range: 1−2.
stateintIO state, 1: high output, 0: low output.
  • Code demo

Input Set the tool-end digital IO output state.

json
{"command":"set_tool_DO_state","IO_Num":1,"state":1}

Output Setting succeeded:

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

Setting failed:

json
{
    "command": "set_tool_DO_state",
    "set_state": false
}

Set the tool-end digital IO modeset_tool_IO_mode

  • Input parameter
ParameterTypeDescription
set_tool_IO_modestringSet the digital IO mode.
IO_NumintIO port number, range: 1−2.
stateintIO state, 0: input mode, 1: output mode.
  • Code demo

Input Set the digital IO mode

json
{"command":"set_tool_IO_mode","IO_Num":1,"state":0}

Output Setting succeeded:

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

Setting failed:

json
{
    "command": "set_tool_IO_mode",
    "set_state": false
}

Get the tool-end digital IO stateget_tool_IO_state

  • Input parameter
ParameterTypeDescription
get_tool_IO_statestringGet the digital IO state.
  • Output parameter
ParameterTypeDescription
IO_Modeint0: input mode, 1: output mode.
IO_StateintIO state, 1: high output, 0: low output.
  • Code demo

Input Get the digital IO state.

json
{"command":"get_tool_IO_state"}

Output

json
{
    "command":"get_tool_IO_state",
    "IO_Mode": [
        0,
        1
    ],
    "IO_State": [
        0,
        1
    ]
}

Set the tool-end power outputset_tool_voltage

  • Input parameter
ParameterTypeDescription
set_tool_voltagestringSet the power output.
voltage_typeintPower output type, 0: 0 V, 2: 12 V, 3: 24 V.
  • Code demo

Input Set the power output

json
{"command":"set_tool_voltage","voltage_type":2}

Output Setting succeeded

json
{
    "command": "set_tool_voltage",
    "state": true
}

Setting failed

json
{
    "command": "set_tool_voltage",
    "state": false
}

Get the tool-end power outputget_tool_voltage

  • Input parameter
ParameterTypeDescription
get_tool_voltagestringGet the power output.
  • Output parameter
ParameterTypeDescription
get_tool_voltageintPower output type, 0: 0 V, 2: 12 V, 3: 24 V.
  • Code demo

Input Get the power output type

json
{"command":"get_tool_voltage"}

Output

json
{
    "command":"get_tool_voltage",
    "voltage_type": 2
}