Joylei / eip-rs

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

I was not able to read a tag value in a controller.. #9

Closed GeneL closed 1 year ago

GeneL commented 2 years ago

I was not able to read a tag in a controller with this command:

let mut client = AbEipConnection::new_host_lookup("xx.xx.xx.xx", OpenOptions::default()).await?; println!("read tag...{:?}", client); let tag1 = EPath::from_symbol("Cfg_LoSeverity"); println!("read tag...{:?}", tag1); let value: TagValue = client.read_tag(tag1.clone()).await?; println!("read tag...{:?}", value); client.close().await?;

This is the output: read tag...Connection { addr: xx.xx.xx.xx:44818, origin_options: OpenOptions { o_t_connection_id: 0, t_o_connection_id: 0, priority_tick_time: 3, timeout_ticks: 250, connection_serial_number: 6332, vendor_id: 255, originator_serial_number: 4294967295, o_t_rpi: 16960, t_o_rpi: 16960, timeout_multiplier: 3, connection_path: EPath([Port(PortSegment { port: 1, link: b"\0" }), Class(2), Instance(1)]), o_t_params: ConnectionParameters { redundant_owner: false, connection_type: P2P, variable_length: Fixed, priority: High, connection_size: 504 }, t_o_params: ConnectionParameters { redundant_owner: false, connection_type: P2P, variable_length: Fixed, priority: High, connection_size: 504 }, transport_direction: Server, transport_class: Class3, transport_trigger: Application, large_open: false }, connected_options: None, service: None, seq_id: 0 }

read tag...EPath([Symbol("Cfg_LoSeverity")])

Error: Custom { kind: "custom", msg: "forward open failed" }


Joylei commented 2 years ago

The error msg said forward open failed. You can try without forward open.

Joylei commented 1 year ago

closed. please reopen if you still have problems.