Code Monkey home page Code Monkey logo

Comments (23)

dmroeder avatar dmroeder commented on August 17, 2024 1

Pylogix does have an Adapter class, but only in the experimental branch. Since this is not in the main branch, you must download the project from here on GH, then switch to the experimental branch.

from pylogix.

dmroeder avatar dmroeder commented on August 17, 2024 1

As I mentioned, Logix is not letting you import the module because it is terrible. I had the module in a CompactLogix, you have a ControlLogix, it is not smart enough to disregard that difference, unfortunately :)

Is your computer's network adapter configured for the IP Address 192.168.1.23? Is your ENBT's IP Address 192.168.1.10?

from pylogix.

TheFern2 avatar TheFern2 commented on August 17, 2024

Pylogix does not have an Adapter class to my knowledge, on which example did you see Adapter being imported?

  • What are you trying to do?

from pylogix.

TheFern2 avatar TheFern2 commented on August 17, 2024

Ah ooppss, sorry for the wrong information, wasn't aware of it until now.

from pylogix.

TheFern2 avatar TheFern2 commented on August 17, 2024

Did you posted a comment and accidentally deleted? I see it on the notifications but is not here.

from pylogix.

meenavinod avatar meenavinod commented on August 17, 2024

Hi,
Thanks for very much for quick responses. I tried the above suggestions and finally this issue looks fine but I am still unable to communicate with PLC. I am still facing below issues -

  1. Unable to restore L5X file to ACD.
    image

  2. I tried to incorporate L5X changes to my test project but still no connectivity with adapter
    image
    Can you please provide the ACD file with example..?

from pylogix.

dmroeder avatar dmroeder commented on August 17, 2024

The L5X is the I/O adapter, not a complete program. You would import it into the I/O tree of your existing program.

from pylogix.

meenavinod avatar meenavinod commented on August 17, 2024

I tried to import L5X IO adapter as ENBT child module. I made some correction to add as a remote child module of ENBT. My project IO tree have adaptor module as above.
Please let me know if I did anything wrong..?

from pylogix.

dmroeder avatar dmroeder commented on August 17, 2024

Logix is probably being picky because I exported the module from a CompactLogix. I'm guessing that it doesn't like importing to the ENBT. Your image above doesn't tell me how you configured the module. The example expects that you configured it like the image:
https://github.com/dmroeder/pylogix/blob/experimental/examples/100_simple_adapter.png

The adapter in the I/O tree needs the IP address of the machine that will be running the pylogix adapter. And your adapter script needs to be configured for your ENBT's IP address. If that is not working, post a screenshot of your I/O adapter configuration, you exact python script and your IP adddresses.

from pylogix.

meenavinod avatar meenavinod commented on August 17, 2024

Hi, When i tried to import L5X to my project file, its giving error of parent module
image

I believe adapter cant be added as Local, so I changed the parent module properties in L5X file and import again as child of ENBT
image

I used same IP address as per example and used same script to run the adapter
image
image

Still PLC and Adapter unable to connect...

from pylogix.

meenavinod avatar meenavinod commented on August 17, 2024

Yes, IP is same as above. Its able to detect hostname correctly ...
image

from pylogix.

dmroeder avatar dmroeder commented on August 17, 2024

Can you capture it via wireshark and email the result to me?

I do have a ControlLogix and ENBT, though I won't be able to test until Friday.

Edit: My instinct is that there is some confusion on network adapters, I'd probably try disabling all unnecessary adapters. When you run your script, is there any error or any feedback?

from pylogix.

meenavinod avatar meenavinod commented on August 17, 2024

image

from pylogix.

dmroeder avatar dmroeder commented on August 17, 2024

Is your script running in that instance? All I see is list identity, which is not pylogix, it is probably RSLinx. To minimize wireshark traffic, shut down RSLinx and LogixDesigner. Run Wireshark, run your script.

Edit: Wait, why does your generic adapter report that is a Rockwell device? Something else is going on here, like another Rockwell device at the .23 address? The pylogix adapter has not implemented the services that would respond to the request that the module info tab would send.

from pylogix.

meenavinod avatar meenavinod commented on August 17, 2024

image
image

Without RS Linx and Adapter Script running

from pylogix.

dmroeder avatar dmroeder commented on August 17, 2024

Here is the problem I'm having. You show the screenshot of your generic module's Module Info tab, it is reporting a Rockwell Software Communication Adapter. You are telling me that your computers IP address is 192.168.1.23 and that generic module is configured for 192.168.1.23, which looks to be the case and that would be correct.

There's something up with your screenshot though. When you open the Module Info of your generic module, it is sending out a List Identity request to the address of 192.168.1.23. Some Rockwell device is responding. If it is your computer that is configured for 192.168.1.23, and it should be based on your script, nothing should respond. The only thing that should be at .23 is your computer, which would not respond to a List Identity request.

from pylogix.

dmroeder avatar dmroeder commented on August 17, 2024

Wait, can you go to the Network and Sharing Center and check if your adapter is set to "public network"?

I had trouble with this, the firewall was blocking the connect request from the PLC.

from pylogix.

meenavinod avatar meenavinod commented on August 17, 2024

I believe its reporting a Rockwell Software Communication Adapter because of RS Linx. If I change the IP address of my computer its unable to find module properties -
image

My network and sharing center already was in Public network but Firewall Defender was on. After disabling it After disabling the Firewall defender for Public network -
image

from pylogix.

dmroeder avatar dmroeder commented on August 17, 2024

Okay, you are getting close. I don't think RSLinx would cause what you were seeing but maybe RSlinx Enterprise, I can't say for sure. The timeout is what I would expect because the pylogix adapter hasn't implemented the list identity response.

You may have some more firewall work to do. I think there should be a register session, which I don't see. After both the register session and forward open, the connection switches to UDP, port 2222.

from pylogix.

meenavinod avatar meenavinod commented on August 17, 2024

I Think its registering the session but Forward Open connection failed...

I have disabled firewall completely .

image

from pylogix.

dmroeder avatar dmroeder commented on August 17, 2024

Can you email me that wireshark packet capture? What's odd about your capture is that the forward open response, which should be coming from pylogix is the wrong size, which makes me think that there is something else responding.

Edit: Edit line 388 in adapter.py: CIPVendorID = 0x1337

Then run that capture and send it to me.

from pylogix.

meenavinod avatar meenavinod commented on August 17, 2024

Hi, You are right, I didnt noticed any change with Adapter Script running or not in Wireshark. Can you please share your mail address. my email is [email protected].
image

image

image

But the Pylogix eip working as expected with same setup.
image

from pylogix.

lbhopper avatar lbhopper commented on August 17, 2024

have you tried disabling keys in your Adapter Module? ControlLogix modules can return with errors if keying is set to exact or compatible:

https://literature.rockwellautomation.com/idc/groups/literature/documents/at/logix-at001_-en-p.pdf

from pylogix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.