This is a PROFIBUS software stack implementing the layers 1 (PHY), 2 (FDL) and 7 (DP) of the PROFIBUS protocol.
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 and 0.1 milliseconds with PyPy on a Raspberry Pi 2.
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 via http:||
git clone http://git.bues.ch/git/pyprofibus.git
|or via git:||
git clone git://git.bues.ch/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.