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

Pyprofibus currently is able to talk to a couple of Profibus-DP slave devices such as the Siemens ET-200S or the Siemens S7-315-2DP PLC in slave mode. Lots of pyprofibus users also successfully use pyprofibus together with non-Siemens slaves.

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 Raspberry Pi can act as a DP-Master (class 1) with the current stack.

It is also possible to run pyprofibus on tiny microcontroller boards supported by Micropython such as the ESP32 (WROOM-32).

Performance:
A typical Data_Exchange (that is sending and receiving user data) cycle takes about 0.3 milliseconds with CPython on a Raspberry Pi 2 (later models are faster). On the ESP32 one Data_Exchange is a slower due to the slow CPU. However it still is in the order of 25 milliseconds. So that will still be useful in most cases.

pyprofibus is beta quality software.
That means it does not include all anticipated features and probably contains some 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 example_dummy.py 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 example_dummy.py 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 https://git.bues.ch/git/pyprofibus.git

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 NotABug.org.
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: Friday 11 September 2020 20:28 (UTC)
xhtml / css