31 lines
964 B
Python
31 lines
964 B
Python
###################################################################################################
|
|
# This is an option to implement a 2D continuous scan
|
|
###################################################################################################
|
|
|
|
STEPS_M1 = 10
|
|
STEPS_M2 = 5
|
|
|
|
class Sensor(ReadableArray):
|
|
def read(self):
|
|
r1 = cscan(m1, (ai1), 0.0, 1.0 , steps=STEPS_M1, save=False, display=False)
|
|
return r1[ai1]
|
|
|
|
def getSize(self):
|
|
return STEPS_M1+1
|
|
|
|
def getName(self):
|
|
return "sensor"
|
|
|
|
"""
|
|
p = plot(None, title="2d Plot")[0]
|
|
def after_read(record, scan):
|
|
if record.setpoints[1] == scan.getStart()[1]:
|
|
p.addSeries(LinePlotSeries(str(record[ao1])))
|
|
p.getSeries(p.numberOfSeries-1).appendData(record[ao2], record[ai1])
|
|
"""
|
|
|
|
set_exec_pars(print_scan=True)
|
|
|
|
#lscan(m2, Sensor(), 0, 1.0, STEPS_M2, after_read=after_read)
|
|
s1=Sensor()
|
|
lscan(m2, s1, 0, 1.0, STEPS_M2) |