Skip to content

Latest commit

 

History

History
106 lines (64 loc) · 3.32 KB

README.md

File metadata and controls

106 lines (64 loc) · 3.32 KB

GPIB / IEEE 488 PythonDeviceWrapper


Wrapper for several GPIB controllable devices.

(work in progress)

The goal of this project is, to enable easy scripting of measurement procedures using a higher abstracction layer for GPIB devices.


forthebadge made-with-python


Results

results/Efficiency_vs_LoadCurrent.png

Efficiency curve of a 12V to 5V DC/DC converter. Measured using the NGMO2.


Example

import time
import interface.prologix_gpib as prologix
import devices.schlumberger_7150plus as schlumberger

import numpy as np
import matplotlib.pyplot as plt

iface = prologix.usb(com='ASRL31::INSTR', baudrate=19200, timeout=5000)
iface.loc()  # Lokaler Modus
schlumi = schlumberger.device(iface, 13)

values = np.zeros(100)              # leeres Array mit 100 Werten
for i in range(0, len(values)):
    schlumi.trigger()               # single shot
    values[i] = schlumi.read()      # Wert lesen
    time.sleep(0.1)                 # 100ms warten

plt.plot(values)                    # plotten
plt.ylabel('U [V]')
plt.xlabel('Messung Nr.')
Example 2
import interface.prologix_gpib as prologix
import devices.rohde_schwarz_ngmo2 as ngmo

iface = prologix.usb(com='ASRL1::INSTR', baudrate=19200, timeout=2000)

battery = ngmo.device(iface, 7)  # ngmo at address 7
battery.set_voltage('A', 12.4)   # set to 12.4 V
battery.set_output('A', True)    # turn on

Installation (Python / Windows)


Resources

Manuals

Multimeter

PSU


GPIB

Python