27 lines
728 B
Python
27 lines
728 B
Python
|
|
rel_x = pico_bpm6_new_x.read()
|
|
|
|
class XAxis(ReadableArray):
|
|
def read(self):
|
|
return [x + pico_bpm6_new.getTimestamp() for x in rel_x]
|
|
|
|
def getSize(self):
|
|
return len(rel_x) #only reads if cache is None
|
|
|
|
pico_bpm6_x_axis = XAxis()
|
|
|
|
|
|
set_device_alias(pico_bpm6_x_axis, "pico_bpm6_x_axis")
|
|
setup_plotting(line_plots = [pico_bpm6_new, pico_bpm6_x_axis])
|
|
|
|
caput ("X12SA-ES1-TTL:OUT_02", "HIGH")
|
|
pico_bpm6_new.setMonitored(True)
|
|
try:
|
|
mscan(pico_bpm6_new, [pico_bpm6_new, pico_bpm6_x_axis], 100)
|
|
#tscan(pico_bpm6_new, 10, 0.1)
|
|
finally:
|
|
pico_bpm6_new.setMonitored(False)
|
|
caput ("X12SA-ES1-TTL:OUT_02", "LOW")
|
|
|
|
|
|
#mscan([pico_bpm6_new, pico_bpm6_x_axis], 3600)caput X12SA-ES1-TTL:OUT_02 "LOW" |