Beispiel #1
0
from qem_setter import QemSetter
import time

setter = QemSetter()

setter.setResistorValue('VCM', 2)
setter.setResistorRegister('auxsample', 50)
setter.changeDefaults(True)
setter.setClock(25)

while True:
    for i in range(-10, 10):
        if i < 0:
            setter.setResistorValue('VCTRL', (3 + (.5 * i)))
        else:
            setter.setResistorValue('VCTRL', (3 - (.5 * i)))
        time.sleep(2)
        
Beispiel #2
0
#### END Rob Halsall code ####

#### START Adam Davis Code ####

####### this section for the QEM backplane interface
backplane = QemSetter(url="http://192.168.0.122")
####### end of backplane setup section

#define the number of loops for the adc calibration
n = 1024
#define i and the staring point
i = 0

#set the default starting point for the COARSE value
backplane.setResistorRegister('AUXSAMPLE_COARSE', 435)

#main loop to capture the data
while i < n:
    #set the the AUXSAMPLE_FINE resistor to i
    backplane.setResistorRegister('AUXSAMPLE_FINE', i)

    #delay by 0 (default) or by the number passed to the function
    time.sleep(delay)
    #capture the data from the stream using rah function
    qemcamera.log_image_stream(
        '/scratch/qem/fine/adc_cal_AUXSAMPLE_FINE_%04d' % i, frames)
    i = i + 1
    #aux = aux + 1
    print("%d/1024" % i)
# end of main loop