Herunterladen Inhalt Inhalt Diese Seite drucken

Kontinuierliche Abfrage Lückenloser Abtastwerte; Massenspeicher Subsystem - ZES ZIMMER LMG600 Serie Benutzerhandbuch

Präzisions-leistungsmessgeräte mit 1 bis 7 kanälen
Vorschau ausblenden Andere Handbücher für LMG600 Serie:
Inhaltsverzeichnis

Werbung

9.12.2 Kontinuierliche Abfrage lückenloser Abtastwerte
Dieses Beispiel zeigt, wie sich das LMG einstellen lässt, sodass lückenlos Abtastwerte
ausgegeben werden. Beachten Sie bitte, dass dies ein Betrieb des Transienten und Flickers
ausschliesst.
### NOTE: The following code is programmed in python . ###
# switch to short language
device .write ('LANG␣ SHORt ')
# set the signal for the track
device .write ('GLCTRAC ␣0,␣" U1111 "')
# set record rate to 100 samples per second
device .write ('GLCSR ␣100 ')
# adapt the cycle length to the record rate
device .write ('CYCLMOD ␣ SCOPE ')
# wait until next measurement cycle
device .write ('INIM ')
# fetch the number of samples per cycle
device .write ('GLPTLEN ?')
# read the number of samples per cycle
gaplen = int( device .read ())
# defines the action , which queries scope values from the first track
device .write ('ACTN;␣ GLPVAL ?␣0,␣(0:%d)' % (gaplen -1))
# starts the continuous output
device .write ('CONT␣ON ')
# read data
data = device .read ()
# stops the continuous output
device .write ('CONT␣OFF ')
# read the '1' from CONT OFF command
ret = device .read ()

9.12.3 Massenspeicher Subsystem

Dieses
Beispiel
zeigt,
überträgt.
### NOTE: The following code is programmed in python . ###
# switch to short language
device .write ('LANG␣ SHORt ')
# set current working directory to the documentation subpath of the library path ,
device .write ('MMCDIR ␣"/ library / documentation "')
# request all data of the manual
device .write ('MMDATA ?␣" LMG600_en_US .pdf"')
# data of MMDATA is replied by LMG always in binary format .
data = device . readbinaryblock ()
# open a local file in binary mode and write all data to it
manual = open('LMG600_en_US .pdf ', 'wb ')
manual .write (data)
manual .close ()
Kapitel B [9.4.2→226] zeigt, wie man das Binärformat liest. Die Antwort von
, das im Beispiel verwendet wird, muss in dem Binärformat gelesen werden. Einfach
MMDATA [9.10.228→328]
bis zum Zeilenende lesen ist nicht korrekt, da die zu lesende Datei selbst Zeilenenden enthalten
kann.
446/472
9 Fernsteuerung
wie
man
eine
Datei
vom
LMG
auf
den
lokalen
PC
www.zes.com

Werbung

Inhaltsverzeichnis
loading

Inhaltsverzeichnis