示例#1
0
import utilities.Exporter as Exporter

# PARAMETERS
SOURCE_CONST_VOLT = 14.0  # prototype requires 14.0V
LOAD_CURRENT_MAX = 1.0
LOAD_CURRENT_MIN = 0.05
DELTA_LOAD_CURRENT = LOAD_CURRENT_MAX - LOAD_CURRENT_MIN
DPOINTS = 100
DELAY_LOAD_SET = 0.5
DELAY_MEAS_TRIG = 0.005
AC_AVER_REPEATS = 2
NGMO_ADDR = 7
HP34_ADDR = 12

#%%
iface = prologix.usb(com='ASRLCOM31::INSTR', baudrate=19200, timeout=5000, log_level=1)
iface.loc()  # local mode
ngmo = ngmo2.device(iface, NGMO_ADDR)
hp34 = hp3455.device(iface, HP34_ADDR)

hp34.clear()
hp34.measurement('vac')

ngmo.clear()
time.sleep(.100)

print(ngmo.get_idn())
time.sleep(.100)

#ngmo.display.enable(False)  # high speed mode
ngmo.format.data('ASCII')
示例#2
0
# -*- coding: utf-8 -*-

import time
import interface.prologix_gpib as prologix

import devices.rohde_schwarz_ngmo2 as ngmo2

import numpy as np
import matplotlib.pyplot as plt

#%%
iface = prologix.usb(com='ASRL31::INSTR', baudrate=19200, timeout=5000)
iface.loc()  # local mode
ngmo = ngmo2.device(iface, 7)

ngmo.clear()
time.sleep(.100)

print(ngmo.get_idn())
time.sleep(.100)

ngmo.display.enable(False)  # high speed mode
ngmo.format.data('ASCII')
chan = ngmo.output('A')

# INIT
iface.write(7, ':SOUR:A:VOLT 0.0')          # 0V
iface.write(7, ':SOUR:A:CURR:LIM 0.5')      # current limmit = 0.5A
iface.write(7, ':SENS:A:FUNC CURR')         # measurement mode = current
iface.write(7, ':SENS:A:MEAS:INT 2.00E-3')  # measurement interval = 2ms
iface.write(7, ':SENS:A:MEAS:AVER:COUN 1')  # averaging uses 1 sample