Skip to content

End Effector IO Configuration and Query effectorIOConfig

The end effector of the robotic arm has multiple IO ports for interaction with peripheral equipment, and this interface is used to set and read the IO mode and power output of the end effector. The following is a detailed description of the member functions of the end effector IO configuration and query effectorIOConfig, including the method prototype, parameter description, return value, and usage demo.

End-Effector Tool IO The quantity and classification of IO ports are as follows:

TypeQuantityDescription
Power outputOne channel0 V/12 V/24 V available.
Digital IOTwo channelsInput or output available Input: reference voltage: 12 V-24 V; output: 12 V-24 V, matching the input voltage.
Communication portOne channelRS485 available.

Set the tool digital output state rm_set_tool_do_state()

  • Method prototype:
python
rm_set_tool_do_state(self, io_num: int, state: int) -> int:
  • Parameter description:
ParameterTypeDescription
io_numintIO port numbers 1−2
stateintIO state, 1: high output, 0: low output
  • Return value: State codes executed by functions
ParameterTypeDescription
0intSuccess.
1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.
-1intThe data transmission fails, indicating that a problem occurs during the communication.
-2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.
-3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.
  • Usage demo
python
from Robotic_Arm.rm_robot_interface import *

# Instantiate the RoboticArm class
arm = RoboticArm(rm_thread_mode_e.RM_TRIPLE_MODE_E)

# Create the robotic arm connection and print the connection ID
handle = arm.rm_create_robot_arm("192.168.1.18", 8080)
print(handle.id)

# Set the tool IO channel 1 output to high
print(arm.rm_set_tool_do_state(1, 1))

arm.rm_delete_robot_arm()

Set the tool digital IO mode rm_set_tool_IO_mode()

  • Method prototype:
python
rm_set_tool_IO_mode(self, io_num: int, state: int) -> int:
  • Parameter description:
ParameterTypeDescription
io_numintIO port numbers 1−2
stateintMode, 0: input mode, 1: output mode
  • Return value: State codes executed by functions:
ParameterTypeDescription
0intSuccess.
1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.
-1intThe data transmission fails, indicating that a problem occurs during the communication.
-2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.
-3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.
  • Usage demo
python
from Robotic_Arm.rm_robot_interface import *

# Instantiate the RoboticArm class
arm = RoboticArm(rm_thread_mode_e.RM_TRIPLE_MODE_E)

# Create the robotic arm connection and print the connection ID
handle = arm.rm_create_robot_arm("192.168.1.18", 8080)
print(handle.id)

# Set the tool digital IO port 1 to the input mode
print(arm.rm_set_tool_IO_mode(1, 0))

arm.rm_delete_robot_arm()

Get the tool digital IO state rm_get_tool_io_state()

  • Method prototype:
python
rm_get_tool_io_state(self) -> dict[str, any]:
  • Return value:dict[str,any]: a dictionary containing the following keys.
  1. int: state codes executed by functions
ParameterTypeDescription
0intSuccess.
1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.
-1intThe data transmission fails, indicating that a problem occurs during the communication.
-2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.
-3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.
  1. Digital IO state
ParameterTypeDescription
IO_Modelist[int]0: input mode, 1: output mode
IO_statelist[int]0: low, 1: high
  • Usage demo
python
from Robotic_Arm.rm_robot_interface import *

# Instantiate the RoboticArm class
arm = RoboticArm(rm_thread_mode_e.RM_TRIPLE_MODE_E)

# Create the robotic arm connection and print the connection ID
handle = arm.rm_create_robot_arm("192.168.1.18", 8080)
print(handle.id)

print(arm.rm_get_tool_io_state())

arm.rm_delete_robot_arm()

Set the tool-end power outputrm_set_tool_voltage()

  • Method prototype:
python
rm_set_tool_voltage(self, voltage_type: int) -> int:
  • Parameter description:
ParameterTypeDescription
voltage_typeintPower output type, 0: 0 V, 2: 12 V, 3: 24 V
  • Return value:dict[str,any]: a dictionary containing the following keys.
  1. int: state codes executed by functions
ParameterTypeDescription
0intSuccess.
1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.
-1intThe data transmission fails, indicating that a problem occurs during the communication.
-2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.
-3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.
  1. Digital IO state
ParameterTypeDescription
IO_Modelist[int]0: input mode, 1: output mode
IO_statelist[int]0: low, 1: high
  • Usage demo
python
from Robotic_Arm.rm_robot_interface import *

# Instantiate the RoboticArm class
arm = RoboticArm(rm_thread_mode_e.RM_TRIPLE_MODE_E)

# Create the robotic arm connection and print the connection ID
handle = arm.rm_create_robot_arm("192.168.1.18", 8080)
print(handle.id)

# Set the tool power output to 24 V
print(arm.rm_set_tool_voltage(3))

arm.rm_delete_robot_arm()

Get the tool-end power outputrm_get_tool_voltage()

  • Method prototype:
python
rm_get_tool_voltage(self) -> tuple[int, int]:
  • Parameter description:
ParameterTypeDescription
voltage_typeintPower output type, 0: 0 V, 2: 12 V, 3: 24 V
  • Return value:tuple[int, int]
  1. int: state codes executed by functions
ParameterTypeDescription
0intSuccess.
1intThe controller returns false, indicating that the parameters are sent incorrectly or the robotic arm state is wrong.
-1intThe data transmission fails, indicating that a problem occurs during the communication.
-2intThe data reception fails, indicating that a problem occurs during the communication, or the controller has a return timeout.
-3intThe return value parse fails, indicating that the received data format is incorrect or incomplete.
  1. Power output type
ParameterTypeDescription
IO_Modelist[int]Power output type, 0: 0 V, 2: 12 V, 3: 24 V
  • Usage demo
python
from Robotic_Arm.rm_robot_interface import *

# Instantiate the RoboticArm class
arm = RoboticArm(rm_thread_mode_e.RM_TRIPLE_MODE_E)

# Create the robotic arm connection and print the connection ID
handle = arm.rm_create_robot_arm("192.168.1.18", 8080)
print(handle.id)

print(arm.rm_get_tool_voltage())

arm.rm_delete_robot_arm()