Files
dev/script/test/TestChanel.py
2018-11-23 08:42:01 +01:00

22 lines
476 B
Python

import ch.psi.pshell.epics.CAS as CAS
import random
class Waveform(ReadonlyRegisterBase, ReadonlyRegisterArray):
def doRead(self):
ret = []
for i in range(self.getSize()):
ret.append(random.random())
ret = to_array(ret, 'd')
return ret
def getSize(self):
return 1000
wf = Waveform("wf")
wf.initialize()
print wf.read()[0]
casN = CAS("TESTCAS:VAL", wf, 'double')
print casN
print caget("TESTCAS:VAL")