-> 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
"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