35 lines
1.2 KiB
Python
35 lines
1.2 KiB
Python
def get_calc_group():
|
|
return get_exec_pars().group + "calc/"
|
|
|
|
xx=None
|
|
def after_readout(rec):
|
|
global xx
|
|
xx=rec
|
|
print ("----")
|
|
print rec[0],rec[1]
|
|
print rec.getValue("sin"),rec.getValue("out")
|
|
print rec.getValue(sin),rec.getValue(out)
|
|
print rec.getSetpoint("inp"),rec.getSetpoint(inp),rec.getSetpoint(0)
|
|
print rec.getPosition("inp"),rec.getPosition(inp),rec.getPosition(0)
|
|
if get_exec_pars().persist: #This is not to write if "save=False” is set in the scan command
|
|
if rec.index == 0:
|
|
create_dataset(get_calc_group() + "Value1")
|
|
append_dataset(get_calc_group() + "Value1", rec) #The calculated value
|
|
|
|
#set_exec_pars(layout="sf")
|
|
|
|
def before_region(i):
|
|
print i
|
|
|
|
#r1 = rscan(inp, (sin,out) , [(0,5,5), (10,15,20), (20,25,5)] , 0.01, passes = 3, zigzag = True, before_region=before_region, after_read=after_readout)
|
|
#set_attribute("/", "Test", 1)
|
|
|
|
r1 = rscan(inp, (sin,out,arr) , [(0,5,5), (10,15,20), (20,25,5)] , 0.01, passes = 3, zigzag = True)
|
|
print r1.getReadable(sin)
|
|
|
|
"""
|
|
r2 = rscan(inp, (sin,out,arr) , [(0,5,5), (10,15,20), (20,25,5)] , 0.01, passes = 3, zigzag = True, keep=False, setpoints=True)
|
|
print r2.getReadable(sin)
|
|
print r2.getPositions(inp)
|
|
print r2.getSetpoints(inp)
|
|
""" |