stlehmann / pyads

Python wrapper for TwinCAT ADS
MIT License
253 stars 94 forks source link

Target port not found ADS Server not started (6) #53

Closed f-scotto closed 6 years ago

f-scotto commented 6 years ago

Hi All, I am trying to control some variables on the PLC through pyads. Unfortunately I keep on receiving always the same error message. 'target port not found ADS Server not started (6)'. Any ideas on how to get around this issue? Thanks a lot in advance.

`import pyads

plc = pyads.Connection('10.2.9.142.1.1', 851) plc.open() plc.read_device_info()`

stlehmann commented 6 years ago

Are you on Linux or Windows?

f-scotto commented 6 years ago

windows 10

stlehmann commented 6 years ago

Did you install Twincat on your PC and setup the routes to your target properly?

f-scotto commented 6 years ago

Yes, The route is setup correctly and the twinCAT is running on my machine. I have uninstalled and installed the whole system but whenever i try to get the read_device_info form the pyads.Connection('AMSNetId', 851) I get the same error message. (target port not found ADS Server not started (6)). I cannot figure why!?

f-scotto commented 6 years ago

If I run the TcAdsTest I get this error message (see pic). capture

stlehmann commented 6 years ago

This clearly looks like you've got an issue with the setup of your TwinCAT system. Unfortunately I can not help you with this as it is not related to pyads. Maybe it helps to check if your Beckhoff ADS library is installed correctly on your system.

summerxiahuang commented 2 years ago

I got the same problem. Have you solved that?

ishahak commented 1 year ago

Solution that worked for me: In TwinCAT, project explorer, right-click your project name under "PLC" branch, and click Change ADS Port. it should be 851 normally. if it is not, update your Connection initialization accordingly.