Joylei / eip-rs

rseip - EIP&CIP client in pure Rust, for generic CIP and AB PLC
MIT License
47 stars 6 forks source link

infinite reading... #13

Closed wotori closed 1 year ago

wotori commented 1 year ago

Used the default example and stuck on infinite reading tag with no errors follow...

use anyhow::Result;
use rseip::client::ab_eip::*;
use rseip::precludes::*;

#[tokio::main]
pub async fn main() -> Result<()> {
    let mut client = AbEipClient::new_host_lookup("192.168.1.2")
        .await?
        .with_connection_path(PortSegment::default());
    let tag = EPath::parse_tag("Temperature")?;
    println!("read tag...");
    let value: TagValue<i32> = client.read_tag(tag.clone()).await?;
    println!("tag value: {:?}", value);
    // client.write_tag(tag, value).await?;
    // println!("write tag - done");
    client.close().await?;
    Ok(())
}
Compiling wintek_rust v0.1.0 (/Users/user/git/foam/project)
    Finished dev [unoptimized + debuginfo] target(s) in 0.53s
     Running `target/debug/project`
read tag...
Joylei commented 1 year ago

Is it AB PLC?

wotori commented 1 year ago

Is it AB PLC?

AB stands for what? Allen-Bradley?

Joylei commented 1 year ago

Allen-Bradley PLC is well supported by this library. omron controller is not supported.