plctag-async

async wrapper for libplctag.

crates.io docs build license

How to use

Add plctag-async to your Cargo.toml

toml [dependencies] plctag-async= "0.3"

Examples

```rust use plctag_async::{AsyncTag, Error, Pool, PoolEntry}; use tokio::runtime;

let rt = runtime::Runtime::new().unwrap()?; rt.blockon(async { let path="protocol=ab-eip&plc=controllogix&path=1,0&gateway=192.168.1.120&name=MyTag1&elemcount=1&elemsize=16";// YOUR TAG DEFINITION let pool = Pool::new(); let tag = pool.entry(path).await.unwrap(); let tagref = tag.get().await.unwrap(); let offset = 0; let value:u16 = tagref.readvalue(offset).await.unwrap(); println!("tag value: {}", value);

let value = value + 10; tagref.writevalue(offset, value).await.unwrap(); }); ```

Build

Please refer to How to build to setup build environment.

License

MIT