def gridScanAtt_Daq(self, motor, posList, sample, iRange, jRange, deltaX, snake=True): plan = self.gridScanAtt(motor, posList, sample, iRange, jRange, deltaX, snake) try: daq.disconnect() except: print('DAQ might be disconnected already') daq.connect() daq.begin() RE(plan) daq.end_run()
def dumbSnake(self, yStart, yEnd, xDelta, nRoundTrips, sweepTime): """ simple rastering for running at 120Hz with shutter open/close before and after motion stop. Need some testing how to deal with intermittent motion errors. """ #gon_sx.umv(xStart) sam_y.umv(yStart) daq.connect() daq.begin() time.sleep(2) print('Reached horizontal start position') # looping through n round trips for i in range(nRoundTrips): print('starting round trip %d' % (i + 1)) sam_y.mv(yEnd) time.sleep(0.5) pp.open() time.sleep(sweepTime) pp.close() sam_y.wait() sam_x.mvr(xDelta) time.sleep(2) #orignal was 1 sam_y.mv(yStart) time.sleep(0.5) pp.open() time.sleep(sweepTime) pp.close() sam_y.wait() sam_x.mvr(xDelta) time.sleep(2) #original was 1 print('xpos', sam_x.wm()) #print('round trip %d didn not end happily' % i) daq.end_run() daq.disconnect()
def takeRun(self, nEvents, record=None, use_l3t=False): daq.configure(events=120, record=record, use_l3t=use_l3t) daq.begin(events=nEvents) daq.wait() daq.end_run()
def takeRun(self, nEvents, record=True): daq.configure(events=120, record=record) daq.begin(events=nEvents) daq.wait() daq.end_run()