TOP
SSV SOFTWARE SYSTEMS REGISTER  REGISTER
Log in to check your private messages  Log in to check your private messages
START FAQ SEARCH MITGLIEDER PROFILE  Log in 
SSV-Forum
libmodbus für IGW/922

 
Post new topic   Reply to topic    SSV-Forum Forum Index >>> IGW/922
<<< Previous topic - Next topic >>>  
Display posts from previous:   
Author Message
hne



Joined: 11 Jul 2008
Posts: 210
Location: Hannover

PostPosted: 28.10.2013, 11:02    Post subject: libmodbus für IGW/922 Reply with quote

Zur Benutzung der libmodbus muss diese in der Entwicklungsumgebung installiert werden:

Die folgenden Befehle sind als Root aufzurufen, ggf. vorher mit" su " in den Root-User wechseln!
Code:
cd /tmp
wget --no-check-certificate https://github.com/downloads/stephane/libmodbus/libmodbus-3.0.1.tar.gz
tar -xzf libmodbus-3.0.1.tar.gz
cd libmodbus-3.0.1

PREFIX=/usr/local/arm-ssv1-linux
export PATH=$PATH:$PREFIX/bin
./configure --host=arm-ssv1-linux --build=i686-linux --prefix=$PREFIX --enable-static
make
make install


Falls die Bibliothek dynamisch gelinkt wird, muss man die Datei /use/local/arm-ssv1-linux/lib/libmodbus.so.5.0.0 ins IGW/922 kopieren, und mit LD_LIBRAPY_PATH den Linker-Pfad setzen.

Die Datei libmodbus.so.5.0.0 kann vorher von den Debug-Symbolen befreit werden:

Code:
cd /usr/local/arm-ssv1-linux/lib
arm-ssv1-linux-strip -o /tmp/libmodbus.so.5.0.0 libmodbus.so.5.0.0


Beispiele sind im Quellcode enthalten.
_________________
Henry Nestler
Back to top
View user's profile Send private message Visit poster's website
hne



Joined: 11 Jul 2008
Posts: 210
Location: Hannover

PostPosted: 23.05.2014, 11:40    Post subject: RS485-Treiber im IGW/922 Reply with quote

Der RS485-Treiber im IGW/922 wird auf dem Device /dev/ttyR1 unterstützt.
Vor der Benutzung in eigenen Programmen muss bei jedem Booten der Treiber geladen werden und das Device angelegt werden:

Code:
modprobe rs485
test -c /dev/ttyR1 || mknod /dev/ttyR1 c 46 1


Bibliotheken wie libmodbus und das Programm modpoll wurden von uns erfolgreich getestet und arbeiten ohne Probleme.

Hinweis: Im Treiber erfolgt eine Weiterleitung einiger Kommandos an das Device /dev/ttyAT1. Aber bitte benutzen Sie in eigenen Programmen außschließlich /dev/ttyR1, wenn Sie RS/485 benutzen möchten und /dev/ttyAT1 wenn Sie RS/232 benutzen möchten. Die Umschaltung der seriellen Schnittstelle von RS/232 auf RS/485 erfolgt automatisch beim Öffnen des Devices /dev/ttyAT1.
_________________
Henry Nestler
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    SSV-Forum Forum Index >>> IGW/922 All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

SSV SOFTWARE SYSTEMS

Dünenweg 5
30419 Hannover

Fon: +49(0)511  ·  40 000-0
Fax: +49(0)511  ·  40 000-40

sales@ssv-embedded.de


Impressum    ·    Datenschutz    ·    AGB

© 2024 SSV SOFTWARE SYSTEMS GmbH. Alle Rechte vorbehalten.

ISO 9001:2015