Member of the Helmholtz Association GR Framework / MODBUS on Raspberry Pi May 4 5, 2013 PythonCamp 2013 Cologne Josef Heinen
Part I: GR Framework on Raspberry Pi GR basic functionality Ø lines, marker symbols, filled polygons and text with corresponding attributes and transformations, cell arrays Ø axes, grids, spline curves, error bars, surfaces, contours, geometric forms, arrows, raster images, LaTeX equations Ø device and platform independent output thru logical device drivers or plugins Ø import, export and printing of graphics Ø interoperability with Qt and wxwidgets toolkits Ø GR ctypes wrapper 2
GR layer structure IPython / PyPy! C / C++" " GR! Pascal" Fortran" C / C++ / clang" GLGr! Graphics Kernel System (GKS)! Qt" X11" Quartz" Win32" Java" PS" PDF" SVG" " OpenGL (ES)! Apple ios! gksqt" GKSTerm" gksweb" logical device drivers / plugins:" CGM, GKSM, GIF, RF, UIL" WMF, Xfig" GS (BMP, JPEG, PNG, TIFF) " 3
GR interfaces PyQt4 / wxpython " Qt / wx event loop" IPython" GR! GKS! socket communication" glgr / igr App! C / Objective-C! OpenGL! ES! GKS logical device drivers! Qt" X11" Quartz" Win32" Java" PS" PDF" SVG" " gksqt" GKSTerm" gksweb" 4
GR3 features Ø scenes: meshes, spheres, cylinders, cones Ø properties: color, background, camera, light sources Ø export to GR (off-screen rendering), POV-Ray, HTML5 canvas Ø GR3 ctypes wrapper 5
GR3 layer structure IPython / PyPy! C / C++"..." GR! GR3! GLUT"..." Qt4" POV-Ray generation" off-screen rendering" direct rendering" JavaScript generation" POV-Ray! Browser! WebGL" GKS! OpenGL (WGL / CGL / GLX)" 6
Installation (Raspbian "wheezy ) sudo apt-get install libx11-dev! sudo apt-get install libxft-dev! sudo apt-get install libxt-dev! sudo apt-get install python2.7-dev! sudo apt-get install libgl1-mesa-dev! sudo apt-get install libgs-dev! sudo apt-get install qt4-dev-tools! sudo apt-get install pyqt4-dev-tools! sudo apt-get install libwxgtk2.8-dev! sudo apt-get install python-wxgtk2.8! sudo apt-get install python-imaging! sudo apt-get install python-pyaudio! sudo apt-get install python-opengl!!! git clone git://ifflinux.iff.kfa-juelich.de/gr! cd gr! export QTDIR=/usr/share/qt4! make; make install; make clean! 7
Raspberry Pi in action 8
Part II: Raspberry Pi + MODBUS MODBUS functionality Ø MODBUS TCP a MB variant used for communications over TCP/IP networks (port 502) Ø communication protocol for connecting industrial electronic devices Ø Read/Write functions for discrete inputs / internal bits or physical coils Ø Read/Write functions for physical input or output registers (DI, DO, AI, AO) Ø Pure-Python wrapper 9
MODBUS Test Scenario May 4 5, 2013 Josef Heinen, Forschungszentrum Jülich, Peter Grünberg Institute, Scientific IT Systems 10
MODBUS Station Graph (for Test Scenario) 11
Demonstration May 4 5, 2013 Josef Heinen, Forschungszentrum Jülich, Peter Grünberg Institute, Scientific IT Systems 12
Project information Ø https://iffwww.iff.kfa-juelich.de/portal/doku.php?id=gr Ø Repository: git://ifflinux.iff.kfa-juelich.de/gr Ø Co-Authors: Florian Rhiem, Ingo Heimbach, Christian Felder, et. al. 13