Crates.io | rs_openshowvar |
lib.rs | rs_openshowvar |
version | 0.1.8 |
source | src |
created_at | 2024-06-13 11:46:05.296686 |
updated_at | 2024-07-22 08:49:04.429722 |
description | A Rust library for connecting to Kuka robots and performing data read/write operations using the OpenShowVar protocol. |
homepage | |
repository | https://github.com/selimserbes/rs-openshowvar |
max_upload_size | |
id | 1270568 |
size | 1,358,890 |
rs_openshowvar
is a Rust library for interacting with Kuka robots over TCP/IP using the OpenShowVar protocol.
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:
The communication with KukaVarProxy follows this message format:
Add rs_openshowvar
as a dependency in your Cargo.toml
:
[dependencies]
rs_openshowvar = "0.1.8"
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.
To install and configure KukaVarProxy, please follow the instructions provided in the KukaVarProxy GitHub repository.
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.
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();
}
For detailed API documentation and usage examples, visit the Documentation.
Contributions are welcome! If you'd like to contribute to rs_openshowvar
, please fork the repository and submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for details.