Skip to content
Python wrapper for TwinCAT ADS
Python Dockerfile
Branch: master
Clone or download
stlehmann Merge pull request #103 from kryskool/patch-2
Add Python 3.8 on Travis CI test
Latest commit 3f6c43e Dec 21, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
adslib @ a3da436 use latest adslib Jul 29, 2019
doc Spelling fixes Oct 19, 2019
pyads Spelling fixes Oct 19, 2019
tests Spelling fixes Oct 19, 2019
.coveralls.yml Update coveralls Jul 13, 2018
.flake8 Add type annotations Jul 12, 2018
.gitmodules Remove src from.gitmodules. Mar 29, 2019
.travis.yml Add Python 3.8 on Travis CI test Nov 11, 2019 added and updated tox ini to align with travis Oct 2, 2019
LICENSE add license, rewrite README Jun 4, 2015 Include adslib/* in Mar 29, 2019
PKG-INFO changed some package infos Sep 29, 2013 Add feature list and remove duplicates from Readme Oct 4, 2019 lint changes Jul 13, 2018
pyproject.toml formatted all with black Oct 4, 2019 Requirements: Replace slow Pipfiles by and requiremen… Feb 19, 2019
requirements.txt Update requirements. Apr 21, 2019
setup.cfg Add NOTEFUNC to Windows Aug 16, 2018
tox.ini Update Tox configuration for Python 3.8 Nov 19, 2019

pyads - Python package

Build Status Coverage Status Documentation Status PyPI version Code style: black

This is a python wrapper for TwinCATs ADS library. It provides python functions for communicating with TwinCAT devices. pyads uses the C API provided by TcAdsDll.dll on Windows on Linux. The documentation for the ADS API is available on



From PyPi:

$ pip install pyads

From Github:

$ git clone --recursive
$ cd pyads
$ python install


  • connect to a remote TwinCAT device like a plc or a PC with TwinCAT
  • create routes on Linux devices and on remote plcs
  • supports TwinCAT 2 and TwinCAT 3
  • read and write values by name or address
  • read DUTs (structures) from the plc
  • notification callbacks

Basic usage

import pyads

# add route to remote plc
pyads.add_route("", "")

# connect to plc and open connection
plc = pyads.Connection('', pyads.PORT_SPS1)

# read int value by name
i = plc.read_by_name("GVL.int_val", pyads.PLCTYPE_INT)

# write int value by name
plc.write_by_name("GVL.int_val", i, pyads.PLCTYPE_INT)

# close connection
You can’t perform that action at this time.