Script execution

This commit is contained in:
sfop
2016-08-24 14:57:33 +02:00
parent fc4aa21942
commit c6914075bf

View File

@@ -29,14 +29,14 @@ class CamTool(DeviceBase):
def __init__(self, name, prefix = "cam:", latch = False, camera = "SINEG01-DSCR350"):
DeviceBase.__init__(self, name)
run_channel = prefix + "camera.run"
try:
caget(run_channel)
except:
cmd = "camtool --casprefix " + prefix + " --run -1 " + camera #--nogui
print cmd
fork( (exec_cmd,(cmd,)),)
self.waitForChannel(run_channel, 20)
time.sleep(5.0)
#try:
caget(run_channel)
#except:
# cmd = "camtool --casprefix " + prefix + " --run -1 " + camera #--nogui
# print cmd
# fork( (exec_cmd,(cmd,)),)
# self.waitForChannel(run_channel, 20)
# time.sleep(5.0)
self.prefix = prefix
self.latch = latch
self.mode = "latch" if latch else "pipeline"
@@ -45,7 +45,7 @@ class CamTool(DeviceBase):
self.cam_latch = Channel(prefix + "latch.capture", 'l', alias = name + " latch")
if self.latch:
self.start()
time.sleep(1.0)
time.sleep(3.0)
self.cam_latch.write(1)
self.waitForChannel(self.data_prefix + "timestamp",20)
else: