PROFIBUS software stack
Image preview of pilc_et200s.jpg

This is a PROFIBUS software stack implementing the layers 1 (PHY), 2 (FDL) and 7 (DP) of the PROFIBUS protocol.

Image preview of et200s-small.jpg

We are currently able to talk to a Siemens ET-200S slave, read its inputs and write to the outputs. So the basic hardware (OSI layer 1) is implemented and works as expected. Software (OSI layer 2 and 7) is work in progress. Most of the implemented features work correctly. A the Raspberry Pi can act as a DP-Master (class 1) with the current stack.

A typical Data_Exchange (that is sending and receiving user data) cycle takes about 0.3 milliseconds with CPython on a Raspberry Pi 2.

pyprofibus is alpha quality software.
That means it does not include all anticipated features and probably contains lots of bugs.
The documentation is not complete.
The software is not fully tested.
You are encouraged to test pyprofibus and report all identified bugs or missing features to the author.

The awlsim Soft-PLC software can be used to control hardware connected to PROFIBUS-DP
See the awlsim and PiLC pages for details.

pyprofibus can be used to connect LinuxCNC to PROFIBUS-DP slaves.

A LinuxCNC example configuration is included in pyprofibus. See the linuxcnc-demo subdirectory.

pyprofibus includes an executable file that can be used to run the stack without any actual PROFIBUS hardware. The dummy PHY will emulate a simple slave device in such a way that can run a DPM1 on that virtual PHY device.
Feel free to use this dummy to experiment with the stack.

Latest bleeding edge pyprofibus can be downloaded using the Git version control system as follows:

git clone

or by downloading the pyprofibus snapshot archive.
To browse the Git repository online, go to the git web interface.
A mirror of the repository is available on GitHub, GitLab, Bitbucket and on
If you want to contribute to pyprofibus, please read the contribution guidelines first.

If you find any bugs in pyprofibus or if you have any suggestion for new features, we would like to hear from you.
Your help is greatly appreciated and will help to create better software and improve the overall experience for everybody. So don't hesitate to report anything that that limits your pyprofibus usage.

If you have got any code improvements or other improvements that should be merged into the project, please send such enhancements to the pyprofibus maintainer.

Please read the contribution guidelines first.

Copyright (C) Michael Büsch
Licensed under the terms of the GNU General Public License version 2 . See the sourcecode for details.

Updated: Tuesday 19 May 2020 19:26 (UTC)
xhtml / css