Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Can eip-rs Read UDTs? #20

Open
TheColonel2688 opened this issue Apr 25, 2024 · 3 comments
Open

Question: Can eip-rs Read UDTs? #20

TheColonel2688 opened this issue Apr 25, 2024 · 3 comments

Comments

@TheColonel2688
Copy link

Can eip-rs Read and Write UDTs?

I need a grab a UDT instance from my CompactLogix PLCs, can that be done? And then Mapped to a struct?

Example UDT on PLC

- Type: MyUDT
  - MyDint1 : DINT
  - MyDint2: DINT
  - MyString1 : STRING
  - MyString2 : STRING

Path to an instance on PLC that is in Program1
\Program1.MyUdtInstance1

Rust Type:

struct MyUDT {
    MyDint1: i32,
    MyDint2: i32,
    MyString1 : String
    MyString2 : String
}
@Joylei
Copy link
Owner

Joylei commented May 3, 2024

the lib can read UDT, please check examples
in the repo.

@TheColonel2688
Copy link
Author

TheColonel2688 commented May 5, 2024

I don't see examples of fetching a UDT instance, I only see an example of reading individual tags that ate in side a UDT, but not the whole UDT.

Could you direct me to the example you are talking about?

@klmurphy72
Copy link

Check out ab-tag-read-fragmented.rs. It reads a UDT full of strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants