Script execution

This commit is contained in:
gac-x04sa
2018-10-29 12:21:54 +01:00
parent 3932b2f9cb
commit cd22fc6c3a
+12 -1
View File
@@ -1,9 +1,19 @@
class MythenAcquireTime(DeviceBase, Readable):
def __init__(self, mythen):
DeviceBase.__init__(self, mythen.name + " acquire time")
self.setParent(mythen)
def read(self):
return self.getParent().get_acquire_time(readback=False)
class Mythen(DeviceBase, Readable):
def __init__(self, name, prefix):
DeviceBase.__init__(self, name)
self.prefix = prefix
self.acquire_time = MythenAcquireTime(self)
def set_acquire_time(self, value):
caput(self.prefix + ":cam1:AcquireTime", float(value))
@@ -59,11 +69,12 @@ class Mythen(DeviceBase, Readable):
while (mythen.is_acquiring()):
mythen.stop()
time.sleep(0.25)
def read(self):
return self.get_total_counts()
add_device( Mythen("mythen", "X04SA-ES2-SD1"), True)
#mythen.polling = 1000
mythen.update()