get_output_double_register
Retrieve the value of a specific robot's Double register by providing the robot's IP address and register index, enabling precise control and monitoring of Universal Robots via the nUR MCP Server.
Instructions
获取指定IP机器人Double寄存器的值, IP:机器人地址 index:寄存器下标,范围是[0,23]
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | ||
| ip | Yes |
Implementation Reference
- The handler function decorated with @mcp.tool(), which registers it as an MCP tool. It implements the logic to get the output double register value from the UR robot by index after checking connection.@mcp.tool() def get_output_double_register(ip: str, index: int): """获取指定IP机器人Double寄存器的值, IP:机器人地址 index:寄存器下标,范围是[0,23]""" try: if '连接失败' in link_check(ip): return return_msg(f"与机器人的连接已断开。") return return_msg(f"{robotModle_list[ip].OutputDoubleRegister(index)}") except Exception as e: logger.error(f"Double寄存器的值获取失败: {str(e)}") return return_msg(f"Double寄存器的值获取失败: {str(e)}")