Hallo zusammen,
ich würde gerne mithilfe von pymodbus meine SPS ansteuern, dabei hab ich folgende Code im Internet gefunden:
http://pythonhosted.org/pymodbus/exampl ... ntend.html
nun würde ich gerne wissen ob vielleicht damit jemand Erfahrung hat, ich benötige dies für meine Diplomarbeit und würde gerne selbständig eine Weboberfläche programmieren bei der ich dann die SPS ansteuern kann.
bzw. kann mir jemand sagen woher ich die Module bekomme?
vielen dank im voraus
Module herunterladen pymodbus
@Susanne: Als erstes sollte man einen Blick in den Python Package Index werfen: https://pypi.python.org/pypi/pymodbus/
Edit: Ein wenig weitergeklickt kommt man zu der Projektseite: https://github.com/bashwork/pymodbus
Edit: Ein wenig weitergeklickt kommt man zu der Projektseite: https://github.com/bashwork/pymodbus
hi,
erstmal danke...vor lauter Bäume sieht man den Wald gar nicht mehr
und jetzt hab ich schon das nächste Problem. hab alles installiert und dann kommt auch schon folgende Fehlermeldnung:
Installed /usr/local/lib/python2.6/dist-packages/pymodbus-1.1.0-py2.6.egg
Processing dependencies for pymodbus==1.1.0
Searching for twisted>=12.2.0
Reading http://pypi.python.org/simple/twisted/
Reading http://www.twistedmatrix.com
Reading http://twistedmatrix.com/products/download
Reading http://twistedmatrix.com/
Reading http://tmrc.mit.edu/mirror/twisted/Twisted/9.0/
Reading http://tmrc.mit.edu/mirror/twisted/Twisted/10.0/
Reading http://twistedmatrix.com/projects/core/
Reading http://tmrc.mit.edu/mirror/twisted/Twisted/8.2/
Reading http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/
Best match: Twisted 12.3.0
Downloading http://pypi.python.org/packages/source/ ... 874cc0862d
Processing Twisted-12.3.0.tar.bz2
Running Twisted-12.3.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-yAchlR/Twisted-12.3.0/egg-dist-tmp-qvcOv2
twisted/runner/portmap.c:10:20: error: Python.h: Datei oder Verzeichnis nicht gefunden
twisted/runner/portmap.c:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
twisted/runner/portmap.c:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
twisted/runner/portmap.c:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PortmapMethods’
twisted/runner/portmap.c: In function ‘initportmap’:
twisted/runner/portmap.c:55: warning: implicit declaration of function ‘Py_InitModule’
twisted/runner/portmap.c:55: error: ‘PortmapMethods’ undeclared (first use in this function)
twisted/runner/portmap.c:55: error: (Each undeclared identifier is reported only once
twisted/runner/portmap.c:55: error: for each function it appears in.)
error: Setup script exited with error: command 'gcc' failed with exit status 1
ohman bin ich erschrocken
kann mir jemand sagen was das heißt?
bzw. wie man sowas unschönes beheben kann?
erstmal danke...vor lauter Bäume sieht man den Wald gar nicht mehr

und jetzt hab ich schon das nächste Problem. hab alles installiert und dann kommt auch schon folgende Fehlermeldnung:
Installed /usr/local/lib/python2.6/dist-packages/pymodbus-1.1.0-py2.6.egg
Processing dependencies for pymodbus==1.1.0
Searching for twisted>=12.2.0
Reading http://pypi.python.org/simple/twisted/
Reading http://www.twistedmatrix.com
Reading http://twistedmatrix.com/products/download
Reading http://twistedmatrix.com/
Reading http://tmrc.mit.edu/mirror/twisted/Twisted/9.0/
Reading http://tmrc.mit.edu/mirror/twisted/Twisted/10.0/
Reading http://twistedmatrix.com/projects/core/
Reading http://tmrc.mit.edu/mirror/twisted/Twisted/8.2/
Reading http://tmrc.mit.edu/mirror/twisted/Twisted/8.1/
Best match: Twisted 12.3.0
Downloading http://pypi.python.org/packages/source/ ... 874cc0862d
Processing Twisted-12.3.0.tar.bz2
Running Twisted-12.3.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-yAchlR/Twisted-12.3.0/egg-dist-tmp-qvcOv2
twisted/runner/portmap.c:10:20: error: Python.h: Datei oder Verzeichnis nicht gefunden
twisted/runner/portmap.c:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
twisted/runner/portmap.c:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
twisted/runner/portmap.c:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PortmapMethods’
twisted/runner/portmap.c: In function ‘initportmap’:
twisted/runner/portmap.c:55: warning: implicit declaration of function ‘Py_InitModule’
twisted/runner/portmap.c:55: error: ‘PortmapMethods’ undeclared (first use in this function)
twisted/runner/portmap.c:55: error: (Each undeclared identifier is reported only once
twisted/runner/portmap.c:55: error: for each function it appears in.)
error: Setup script exited with error: command 'gcc' failed with exit status 1
ohman bin ich erschrocken

kann mir jemand sagen was das heißt?
bzw. wie man sowas unschönes beheben kann?
- cofi
- Python-Forum Veteran
- Beiträge: 4432
- Registriert: Sonntag 30. März 2008, 04:16
- Wohnort: RGFybXN0YWR0
Das heisst, dass dir die Python Header fehlen. Bei den meisten Linux Distributionen gibt es ein Paket mit einem namen aehnlich `python-dev`, das sie installiert.
Michael Markert ❖ PEP 8 Übersetzung ❖ Tutorial Übersetzung (3.x) ⇒ Online-Version (Python 3.3) ❖ Deutscher Python-Insider ❖ Projekte
Wobei ich bei einer Linux-Distribution auch erst einmal schauen würde ob es `pymodbus` selbst nicht schon als Paket gibt. Oder zumindest die Abhängigkeiten wie `twisted`.
hey, cool, das hat soweit geklappt...
allerdings kommt jetzt schon der nächste stolperstein
susanne@notebook-ch:~/Desktop/modbus$ ./modbus.py
Traceback (most recent call last):
File "./modbus.py", line 25, in <module>
from pymodbus.server.async import ModbusServerFactory
ImportError: No module named pymodbus.server.async
das kann schon sein, dass das fehlt, jetzt meine frage: wo sehe ich welche module ich habe?
/usr/local/lib/python2.6/dist-packages$ etwa hier?
ja, da ist nichts
auch googeln brachte nichts...
kann mir jemand sagen woher ich das modul bekomme?
allerdings kommt jetzt schon der nächste stolperstein

susanne@notebook-ch:~/Desktop/modbus$ ./modbus.py
Traceback (most recent call last):
File "./modbus.py", line 25, in <module>
from pymodbus.server.async import ModbusServerFactory
ImportError: No module named pymodbus.server.async
das kann schon sein, dass das fehlt, jetzt meine frage: wo sehe ich welche module ich habe?
/usr/local/lib/python2.6/dist-packages$ etwa hier?
ja, da ist nichts

auch googeln brachte nichts...
kann mir jemand sagen woher ich das modul bekomme?