25 lines
478 B
Python
25 lines
478 B
Python
set_exec_pars(layout="table")
|
|
tag_prefix=get_context().setup.expandPath("{date}_{hour}{min}")
|
|
|
|
|
|
index=0
|
|
def calc():
|
|
global index
|
|
index += 1
|
|
ret= tscan(field_x, 10, 0.1, tag=tag_prefix+"_raw_{index}")
|
|
#ret= tscan(sin, 10, 0.1)
|
|
v = max(ret.getReadable(0))
|
|
return float(v)
|
|
|
|
|
|
class PseudoDev(Readable):
|
|
def read(self):
|
|
return calc()
|
|
|
|
d= PseudoDev()
|
|
|
|
|
|
ret= tscan(d, 5, 1.0, tag=tag_prefix+"_output")
|
|
#ret= lscan(inp, (d), 0, 40, 5, 0.2)
|
|
|