Unable to Establish Route with Pyads (Python and TwinCAT 3)

rmalavi

Level-1
Beiträge
1
Reaktionspunkte
0
Zuviel Werbung?
-> Hier kostenlos registrieren
I am trying to connect to TwinCAT using Pyads package in Python to communicate with the PLC. I already added the route in TwinCAT but when I try to connect on Python I receive the following error:
"ADSError: target machine not found Missing ADS routes (7)"
My Python code is as follows:
import pyads
plc = pyads.Connection('141.23.196.107.1.1', pyads.PORT_SPS1)
plc.open()
plc.read_by_name('global.bool_value', pyads.PLCTYPE_BOOL)
Please let me know where am I going wrong. I shall be grateful if anyone can give step by step instructions about connecting Python with TwinCAT using Pyads.

Many Thanks in Advance
 
Hi,


  • did you enter the Route from your PC to the Target AND back? You also need a Remote Route from the Target to your Engineering PC.
  • Maybe your DNS-Server is not working properly, try to add the route based on its IP-Address.
  • When entering the Username and Password for creating the route, be sure that you have the right username and password of your target machine.
  • If you are in a Windows Active Directory Domain Environment, try to give the domain in front of the username like mydomain\Administrator.
  • Do you see any of your instantiated variables in the Target Browser of your XAE?

M.

Capture.PNG
 
Zurück
Oben