TOP
SSV Software Systems Register  Register
Log in to check your private messages  Log in to check your private messages
Startseite FAQ Search Mitglieder Profile  Log in 
SSV Support-Forum
Python …

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



Joined: 05 May 2006
Posts: 1460

PostPosted: 02.05.2013, 11:42    Post subject: Python … Reply with quote

Hallo Forum.

Für das IGW/925 steht nun auch eine Python-Implementierung zur Verfügung. Es kommt die Version 2.7 zum Einsatz.

Auf Grund des Python-Umfangs wird der zweite 16 Mbyte NOR-Flash exklusiv für die Python-Installation genutzt.

Gruß KDW
Back to top
View user's profile Send private message
kdw



Joined: 05 May 2006
Posts: 1460

PostPosted: 02.05.2013, 11:43    Post subject: Einfache Socket-Programmierung … Reply with quote

Hallo Forum.

Mit Python lassen sich TCP-Client und Server-Anwendungen wesentlich einfacher als mit C/C++ realisieren. Hier ein Beispiel:

Code:
import socket
import sys

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(("127.0.0.1", 2001))
data = s.recv(1024)
while len(data):
  if len(data) < 10:
    sys.stdout.write(data)
  data = s.recv(1024)
s.close()


Gruß KDW
Back to top
View user's profile Send private message
kdw



Joined: 05 May 2006
Posts: 1460

PostPosted: 02.05.2013, 11:43    Post subject: Modbus für Python … Reply with quote

Hallo Forum.

Selbstverständlich kann man mit Python auch einen Modbus Master für ein IGW/925 erstellen. Dafür verwenden wir Modbus-TK. Siehe auch:

https://code.google.com/p/modbus-tk/wiki/ModbusMasterExample

Gruß KDW
Back to top
View user's profile Send private message
kdw



Joined: 05 May 2006
Posts: 1460

PostPosted: 16.08.2013, 15:55    Post subject: Python per Kommandozeile … Reply with quote

Hallo Forum.

Bevor man Python auf einem IGW/92x per Kommandozeile starten kann, müssen zwei Umgebungsvariable wie folgt gesetzt werden:

Code:
export PYTHONPATH=/mnt/lib:/mnt/lib/python27.zip
export PYTHONHOME=/mnt
python [name der python anwendung]


Gruß KDW
Back to top
View user's profile Send private message
kdw



Joined: 05 May 2006
Posts: 1460

PostPosted: 14.09.2014, 07:29    Post subject: Erste Schritte … Reply with quote

Hallo Forum.

Für alle, die noch nicht ganz so viel Python-Erfahrung besitzen, findet man unter

http://www.tutorialspoint.com/python/index.htm

ein sehr gutes Nachschlagewerk.

Gruß KDW
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SSV-Forum Forum Index >>> IGW/925 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 GmbH

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

© 2023 SSV SOFTWARE SYSTEMS GmbH. Alle Rechte vorbehalten.

ISO 9001:2015