Using CIP path #214
Replies: 2 comments
-
Hmm... I'm not sure what the issue could be, your path looks correct. One minor change I would make is to move your
or something similar, and maybe instead of being in a |
Beta Was this translation helpful? Give feedback.
-
Thanks for the response! Will make the suggested changes and try it again. The IF statement is kind of useless code I have in place just for making it easier to navigate in visual studio, many definitions I can easily minimize with one click. But will separate it all until have something working. Won't actually be using CIPDriver for the code, but commented out the LogixDriver and was trying to use CIP to troubleshoot and see if my path was correct. Once I can get connected will no longer need it. If I remove the A from the path and use only the 2 it did not work either. Thanks for the work on the library. The large majority of the devices I connect to don't require the CIP route and pycomm is a pleasure to use. |
Beta Was this translation helpful? Give feedback.
-
I'm struggling to use the CIP path to read a PLC.
I don't believe it's an issue with pycomm3, just something I'm not doing quite right.
PLC:
RSLinx Who active:
Here's the path (Shown at the bottom of who active) in RSLinx.
Here's what I tried in python:
After using the Logix driver trying to read a tag wasn't working for me, I figured I would first use the example on documents page to see if I can get a response from the PLC:
`
imports = True
if imports:
from pycomm3 import (CIPDriver, Services, ClassCode, FileObjectServices, FileObjectInstances,
FileObjectInstanceAttributes, Struct, UDINT, USINT, n_bytes, LogixDriver, SLCDriver)
`
Returns:
In the RSLinx the "A" is some sort of ethernet switch, or branch. So I replaced A in the path with enet. Tried using Backplane, backplane, bp, \ and / and couldn't quite figure out a combination that will let me connect to the PLC.
Have also tried using LogixDriver with the same path and a PLC tag to do a read, which when running the Python code freezes, doesn't give any errors or results.
My guess is I'm not building the CIP path correctly.
Beta Was this translation helpful? Give feedback.
All reactions