test_keithley428.py 1.78 KB
Newer Older
1 2 3 4 5 6 7
# -*- coding: utf-8 -*-
#
# This file is part of the bliss project
#
# Copyright (c) 2016 Beamline Control Unit, ESRF
# Distributed under the GNU LGPLv3. See LICENSE for more info.

8 9 10
import sys
import time
from bliss.controllers.keithley428 import keithley428
11

12
config = {
13 14 15 16
    "gpib_url": "prologix://148.79.215.54:1234",
    "gpib_pad": 22,
    "gpib_timeout": 5.0,
    "gpib_eos": "\r\n",
17
}
18
dev = keithley428("keithley", config)
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
print dev.State
print dev.FilterRiseTime
try:
    for rt in range(11):
        dev.FilterRiseTime = rt
        print dev.FilterRiseTime
except Exception as e:
    print e
try:
    for gn in range(12):
        dev.Gain = gn
        print dev.Gain
except Exception as e:
    print e

dev.ZeroCheckOff
dev.VoltageBiasOn
dev.CurrentSuppressOff
print dev.VoltageBias
dev.VoltageBias = 0.01
print dev.VoltageBias
dev.VoltageBias = 0.05
print dev.VoltageBias

43
print "state ", dev.State
44
print "Overloaded? ", dev.Overloaded
45
print "Filter state ", dev.FilterState
46
dev.FilterOn
47
print "Filter state ", dev.FilterState
48
dev.FilterOff
49
print "Filter state ", dev.FilterState
50

51
print "Auto Filter state ", dev.AutoFilterState
52
dev.AutoFilterOff
53
print "Auto Filter state ", dev.AutoFilterState
54
dev.AutoFilterOn
55
print "Auto Filter state ", dev.AutoFilterState
56 57 58

dev.CurrentSuppressOn
print dev.CurrentSuppress
59
dev.CurrentSuppress = 0.0006
60
print dev.CurrentSuppress
61
dev.CurrentSuppress = 0.00007
62
print dev.CurrentSuppress
63
dev.CurrentSuppress = 0.000008
64
print dev.CurrentSuppress
65
dev.CurrentSuppress = 0.0000009
66
print dev.CurrentSuppress
67
dev.CurrentSuppress = 0.00000006
68
print dev.CurrentSuppress
69
dev.CurrentSuppress = 0.000000007
70
print dev.CurrentSuppress
71
dev.CurrentSuppress = 0.0000000008
72 73
print dev.CurrentSuppress
try:
74
    dev.CurrentSuppress = 0.00000000009
75 76 77
except Exception as e:
    print e
dev.CurrentSuppressOff