This project enables connections to Beckhoff TwinCAT PLCs using the ADS (Automation Device Specification) protocol. It achieves this by integrating the pyads
library in Python and the ads-rs
library in Rust.
Note: This project only works on the Linux operating system.
Download and install Python 3.x version from Python.org.
Install the pyads
library by running the following command in your terminal or command prompt:
pip install pyads
After installing the Rust programming language from the Rust official website, add the ads
library to your Rust project's Cargo.toml
file. Then, run the following command to compile:
cargo build
To use the project:
- Change directory to the project directory in your terminal or command prompt.
- Compile and run the project by executing the following command:
cargo run
- The
main.rs
file written in Rust first establishes a route using thepyads
library written in Python. Then, it connects to the PLC using theads-rs
library and performs data read/write operations.
Contributions are welcome! Please open a pull request or submit an issue.
This project is licensed under the MIT License. See the LICENSE file for more information.