#robotics #automation #tcp #networking #control-system #data-access #kuka

rs_openshowvar

A Rust library for connecting to Kuka robots and performing data read/write operations using the OpenShowVar protocol

9 releases

0.1.8 Jul 22, 2024
0.1.7 Jun 26, 2024

#958 in Network programming

Download history 13/week @ 2024-07-31 1/week @ 2024-08-07 1/week @ 2024-08-14 15/week @ 2024-09-11 11/week @ 2024-09-18 19/week @ 2024-09-25 8/week @ 2024-10-02

594 downloads per month

MIT license

1MB
136 lines

Contains (WOFF font, 400KB) NanumBarunGothic-0f09457c7a19b7c6.ttf.woff2, (WOFF font, 135KB) FiraSans-Medium-8f9a781e4970d388.woff2, (WOFF font, 130KB) FiraSans-Regular-018c141bf0843ffd.woff2, (WOFF font, 82KB) SourceSerif4-Bold-a2c9cd1067f8b328.ttf.woff2, (WOFF font, 77KB) SourceSerif4-Regular-46f98efaafac5295.ttf.woff2, (WOFF font, 45KB) SourceCodePro-It-1cc31594bf4f1f79.ttf.woff2 and 3 more.

rs_openshowvar

rs_openshowvar is a Rust library for interacting with Kuka robots over TCP/IP using the OpenShowVar protocol.

Overview

rs_openshowvar is a Rust library that facilitates connecting to robot systems via TCP/IP to perform read and write operations. Targeting the KukaVarProxy server, it allows access to Kuka robots using the OpenShowVar protocol. This library is designed for use in robot control and monitoring applications, providing reliable communication over TCP/IP and extensive functionality for managing robot variables.

This project is inspired by the following repositories:

KukaVarProxy Message Format

The communication with KukaVarProxy follows this message format:

  • msg ID in HEX (2 bytes)
  • msg length in HEX (2 bytes)
  • read (0) or write (1) indicator (1 byte)
  • variable name length in HEX (2 bytes)
  • variable name in ASCII (# bytes)
  • variable value length in HEX (2 bytes)
  • variable value in ASCII (# bytes)

Installation

Add rs_openshowvar as a dependency in your Cargo.toml:

[dependencies]
rs_openshowvar = "0.1.8"

Usage

KukaVarProxy

This library is designed to connect to Kuka robots via the KukaVarProxy server. KukaVarProxy is server software used to access Kuka robot system variables over TCP/IP.

  1. To install and configure KukaVarProxy, please follow the instructions provided in the KukaVarProxy GitHub repository.

  2. Ensure that rs_openshowvar is configured to use port 7000 to connect to the KukaVarProxy server. KukaVarProxy listens on this port to communicate with Kuka robots.

  3. Create your own program using the rs_openshowvar library to connect to your robot. Below is an example:

use rs_openshowvar::OpenShowVar;

pub fn main() {
    // Create an instance of OpenShowVar with the robot's IP address and port
    let mut robot = OpenShowVar::new("192.168.1.10".to_string(), 7000);

    // Connect to the robot
    match robot.connect() {
        Ok(_) => println!("Connected to the robot"),
        Err(e) => {
            // Display the connection error and terminate the process
            println!("Connection error: {}", e);
            return;
        }
    }

    // Specify the variable name and value
    let variable_name = "existing_var";
    let value = "new_value";

    // Write to the variable
    match robot.write(variable_name, value) {
        Ok(_) => println!("Variable written successfully"),
        Err(e) => println!("Error writing variable: {}", e),
    }

    // Read from the variable
    match robot.read(variable_name) {
        Ok(read_value) => println!("Read value: {}", read_value),
        Err(e) => println!("Error reading variable: {}", e),
    }
    // Disconnect from the robot
    robot.disconnect();
}

Documentation

For detailed API documentation and usage examples, visit the Documentation.

Contributing

Contributions are welcome! If you'd like to contribute to rs_openshowvar, please fork the repository and submit a pull request with your changes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

No runtime deps