Skip to content

IO Configuration Command Set

Controller IO

The robotic arm is equipped with IO ports, categorized and quantified for Gen 2 as follows:

TypeDescription
Digital output: DO4 channels, 0 V-12 V available
Digital input: DI3 channels, 0 V-12 V available
Analog output: AO4 channels, output voltage 0 V-10 V
Analog input: AI4 channels, input voltage 0 V-10 V

The Gen 3 quantity and classification are as follows:

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

Set the digital IO mode (Gen 3 controller)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 (Triggered by Low Level, 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).
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.
  • 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 (Gen 3 controller)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.
  • Code demo

Input

Get the digital IO output state

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

Output

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

Get the digital IO output state (Gen 2 controller)get_DO_state

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

Input

Get the digital IO output state.

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

Output

json
{
    "state": "DO_state",
    "IO_Num": 1,
    "IO_state": 1
}

Get the digital IO input state (Gen 2 controller)get_DI_state

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

Input

Get the digital IO output state

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

Output

json
{
    "state": "DI_state",
    "IO_Num": 1,
    "IO_state": 1
}

Set the analog IO output state (Gen 2 controller)set_AO_state

  • Input parameter
ParameterTypeDescription
set_AO_statestringSet the analog IO output state.
IO_NumintIO port number, range: 1−4.
voltageintIO output voltage, resolution: 0.001 V, range: 0-10,000, output voltage: 0 V-10 V.
  • Code demo

Input

Set the analog IO output state.

json
{"command":"set_AO_state","IO_Num":1,"voltage":1000}

Output

Setting succeeded:

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

Setting failed:

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

Get the analog IO output state (Gen 2 controller)get_AO_state

  • Input parameter
ParameterTypeDescription
get_AO_statestringGet the analog IO output state.
IO_NumintIO port number, range: 1−4.
  • Output parameter
ParameterTypeDescription
IO_NumintIO port number, range: 1−4.
voltageintIO output voltage, resolution: 0.001 V, range: 0-10,000, output voltage: 0 V-10 V.
  • Code demo

Input

Get the analog IO output state.

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

Output

json
{
    "state": "AO_state",
    "IO_Num": 1,
    "voltage": 1000
}

Get the analog IO input state (Gen 2 controller)get_AI_state

  • Input parameter
ParameterTypeDescription
get_AI_statestringGet the analog IO input state.
IO_NumintIO port number, range: 1−4.
  • Output parameter
ParameterTypeDescription
IO_NumintIO port number, range: 1−4.
voltageintIO output voltage, resolution: 0.001 V, range: 0-10,000, output voltage: 0 V-10 V.
  • Code demo

Input

Get the analog IO output state.

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

Output

json
{
    "state": "AI_state",
    "IO_Num": 1,
    "voltage": 1000
}

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.
AIintAnalog input voltage, accuracy: 0.001 V. For example, 1,000 represents 1 V.
  • Code demo

Input

Get all IO input states.

json
{"command":"get_IO_input"}

Output

json
{
    "state": "IO_input_state",
    "DI": [
        1,
        1,
        1
    ],
    "AI": [
        1000,
        2000,
        3000,
        4000
    ]
}

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.
AOintAnalog output voltage, accuracy: 0.001 V. For example, 1,000 represents 1 V.
  • Code demo

Input Get all IO output states.

json
{"command":"get_IO_output"}

Output

json
{
    "state": "IO_output_state",
    "DO": [
        1,
        1,
        1,
        1
    ],
    "AO": [
        1000,
        2000,
        3000,
        3000
    ]
}

Set the power output (Gen 3 controller)set_voltage

  • Input parameter
ParameterTypeDescription
set_voltagestringSet the power output.
voltage_typeintPower output type, range: 0-3.
  • Code demo

Input

Set the power output.

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

Output

Setting succeeded:

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

Setting failed:

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

Get the power output (Gen 3 controller)get_voltage

  • Input parameter
ParameterTypeDescription
get_voltagestringGet the power output.
  • Output parameter
ParameterTypeDescription
voltage_typeintPower output type, range: 0-3. 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/5 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
{
    "state": "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, range: 0-3. 0: 0 V, 2: 12 V, 3: 24 V.
  • Code demo

Input Set the power output

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

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
voltage_typeintPower output type, range: 0-3. 0: 0 V, 2: 12 V, 3: 24 V.
  • Code demo

Input Get the power output type

json
{"command":"get_tool_voltage"}

Output

json
{
    "state": "tool_voltage_state",
    "voltage_type": 1
}