-
Notifications
You must be signed in to change notification settings - Fork 88
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
CIP IO - EDS #260
Comments
I figure out how to send a generic message, but I need to open a socket to exchange information over port 2222. I'm having a lot of trouble of doing that.
|
Changing the port is easy, use the |
Hi @ottowayi , I really appreciate your reply. You are probably right, but I didn't understand it correct. When I try the same using pycomm3. It acknowledge, but then, it drops. Expected behavior:
What I get using pycomm3:
And then it drops due to timeout. Not sure if it is a socket problem, but I need something to establish. One example is |
Oh I see what's happening, as soon as you register a session the device creates an I/O (class 1) connection and starts sending data (that's the traffic you see on port 2222). Unfortunately pycomm3 is only designed for message/class 3 connections. I'm guessing the forward open data you're sending is telling it you want to open an I/O connection. What data are you expecting to get from this device? If you want to read I/O data, I think it will still work using pycomm3. There isn't any built in functionality for it, like there is for reading tags, but using a generic message should be possible. Can you try doing:
|
Thanks for point it out. I'm still learning from ODVA doc, and yes! I can request a class 1 connection, but I need to open a socket using udp to receive the traffic. Since I can't do that, it just drop due to timeout. The device gives me Analog Inputs and Outputs. Also it has some Digital Input/Output. I just want to integrate it to NodeRed. It won't be a problem to get an array since I now how to map the Assembly info, but I'm kind of lost here. I tried as you suggested and I can identify the object:
I tried the assembly:
Probably because I'm using ModuleIdentifyObject. What makes me more confused is that I must configure T->O and O->T. I can't see how is it possible with pycomm3 without I'm probably missing something. Do you see the possibility to request data using generic message? |
Apologies for the late reply, but I think the error response is actually good news. It's saying the get attributes all service isn't supported, but it's a response and that means the device got the request. I'm not too familiar with the assembly object and how it works, but you could try using the |
It took some time to recover the module to keep testing. I really appreciate your help. The device response well to pycomm3. From my first message, I can request the CIP IO. The problem is that I can't open UDP socket due to lack of knowledge. I tried as you suggested but I'm getting an error:
To be honest, I had the feeling that I don't know what I am probing, and what I should expect. |
I did exactly this: https://github.com/ASolchen/pico-eip |
As a follow-up to my last comment, I would love to see this functionality added to pycomm3. The repo I have is actually the other side of the transaction. My code replicates a device ("Adapter" in CIP docs) that a PLC ("Scanner") talks to. If pycomm3 had the connected IO capability it would be the Scanner talking to a device. At least that's how I see the library; as a "Client." Pycomm3 treats the PLC as the server since it opens a port and listens. The flow of info is initiated by Pycomm3. With connected I/O the "Scanner" is the "Client," initiating communications to the "Server" (Adapter). |
I looked a bit at getting pycomm3 to be a scanner. The capture below shows an actual PLC to OpenEner scanner.
This is in the net_params of the _fowardopen method. Unfortunately, these seem to be hard-coded in the method: |
Hi, I'm starting with a Ethernet/IP device which I have a EDS file. After some sniffing using Wireshark, I've noticed that it uses explicit message using UDP.
After a lot of reading, I wasn't able to understand if it is possible to establish this type of connection. Are there any example on how to perform it?
The text was updated successfully, but these errors were encountered: