GR Framework - MODBUS On Raspberry Pi

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 13

May 4 5, 2013

M
e
m
b
e
r

o
f

t
h
e

H
e
l
m
h
o
l
t
z

A
s
s
o
c
i
a
t
i
o
n

GR Framework / MODBUS on
Raspberry Pi
PythonCamp 2013 Cologne | Josef Heinen
May 4 5, 2013 2 Josef Heinen, Forschungszentrum Jlich, Peter Grnberg Institute, Scientific IT Systems

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
May 4 5, 2013 3 Josef Heinen, Forschungszentrum Jlich, Peter Grnberg Institute, Scientific IT Systems
GR layer structure
Fortran
C / C++ IPython / PyPy
GR
C / C++ / clang Pascal
Graphics Kernel System (GKS)
Win32 X11
GLGr
OpenGL (ES)
Apple iOS
GKSTerm
Java
gksweb
Qt Quartz SVG PS PDF
logical device drivers / plugins:
CGM, GKSM, GIF, RF, UIL
WMF, Xg
GS (BMP, JPEG, PNG, TIFF)
gksqt
May 4 5, 2013 4 Josef Heinen, Forschungszentrum Jlich, Peter Grnberg Institute, Scientific IT Systems
GR interfaces
GKS logical device drivers
Win32 X11
C / Objective-C
GKSTerm gksqt
Qt / wx event loop
Java
gksweb
SVG
OpenGL ES
glgr / iGR App
GR
GKS
Qt
Quartz PS PDF
socket communication
PyQt4 / wxPython
IPython
May 4 5, 2013 5 Josef Heinen, Forschungszentrum Jlich, Peter Grnberg Institute, Scientific IT Systems

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
May 4 5, 2013 6 Josef Heinen, Forschungszentrum Jlich, Peter Grnberg Institute, Scientific IT Systems
GR3 layer structure
C / C++
GKS
GR
GR3
OpenGL (WGL / CGL / GLX)
POV-Ray
POV-Ray#
generation
off-screen
rendering
direct
rendering
Browser
JavaScript
generation
WebGL
GLUT Qt4
...
...
IPython / PyPy
May 4 5, 2013 7 Josef Heinen, Forschungszentrum Jlich, Peter Grnberg Institute, Scientific IT Systems
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 texlive-latex3
sudo apt-get install dvipng
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
cd examples ...
May 4 5, 2013 8 Josef Heinen, Forschungszentrum Jlich, Peter Grnberg Institute, Scientific IT Systems
Raspberry Pi in action !
May 4 5, 2013 9 Josef Heinen, Forschungszentrum Jlich, Peter Grnberg Institute, Scientific IT Systems

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
May 4 5, 2013 10 Josef Heinen, Forschungszentrum Jlich, Peter Grnberg Institute, Scientific IT Systems
MODBUS Test Scenario
May 4 5, 2013 11 Josef Heinen, Forschungszentrum Jlich, Peter Grnberg Institute, Scientific IT Systems
MODBUS Station Graph (for Test Scenario)
May 4 5, 2013 12 Josef Heinen, Forschungszentrum Jlich, Peter Grnberg Institute, Scientific IT Systems
Demonstration
May 4 5, 2013 13 Josef Heinen, Forschungszentrum Jlich, Peter Grnberg Institute, Scientific IT Systems
GR 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.

You might also like