finally figured out how to handle EpicsSignals for string type....
This commit is contained in:
@ -52,11 +52,11 @@ class PhoenixTriggerSetup(CustomDetectorMixin):
|
|||||||
|
|
||||||
|
|
||||||
def on_done(self):
|
def on_done(self):
|
||||||
done = self.parent.smpl_done.get()
|
done_out = self.parent.smpl_done.get()
|
||||||
return done
|
if done_out =='1':
|
||||||
|
done=True
|
||||||
def on_done_cpt(self):
|
if done_out == '0':
|
||||||
done = self.parent.smpl_done_cpt.get()
|
done=False
|
||||||
return done
|
return done
|
||||||
|
|
||||||
def on_dwell(self,t):
|
def on_dwell(self,t):
|
||||||
@ -243,19 +243,10 @@ class PhoenixTrigger(PSIDetectorBase):
|
|||||||
intr_count = Cpt(EpicsSignal,'INTR-COUNT') # conter run up
|
intr_count = Cpt(EpicsSignal,'INTR-COUNT') # conter run up
|
||||||
total_cycles = Cpt(EpicsSignal,'TOTAL-CYCLES') # cycles set
|
total_cycles = Cpt(EpicsSignal,'TOTAL-CYCLES') # cycles set
|
||||||
smpl = Cpt(EpicsSignal,'SMPL') # start sampling --> aquire
|
smpl = Cpt(EpicsSignal,'SMPL') # start sampling --> aquire
|
||||||
# Done field is of type bi
|
# Signal is of type string
|
||||||
smpl_done_cpt = Cpt(EpicsSignal,'SMPL-DONE') # show trigger is done
|
smpl_done = Cpt(EpicsSignal,'SMPL-DONE',string=True) # show trigger is done
|
||||||
smpl_done = EpicsSignal(name='SMPL-DONE',read_pv='X07MB-OP2:SMPL')
|
|
||||||
|
|
||||||
|
|
||||||
def SMPL():
|
|
||||||
s= EpicsSignal(name='SMPL-DONE',read_pv='X07MB-OP2:SMPL')
|
|
||||||
return s
|
|
||||||
|
|
||||||
# link to reasonable names
|
|
||||||
# start with a_ to see functions quicklz in listing
|
|
||||||
#
|
|
||||||
#
|
|
||||||
def a_acquire(self):
|
def a_acquire(self):
|
||||||
self.custom_prepare.on_acquire()
|
self.custom_prepare.on_acquire()
|
||||||
|
|
||||||
@ -269,9 +260,5 @@ class PhoenixTrigger(PSIDetectorBase):
|
|||||||
done=self.custom_prepare.on_done()
|
done=self.custom_prepare.on_done()
|
||||||
return done
|
return done
|
||||||
|
|
||||||
def a_done_cpt(self):
|
|
||||||
done=self.custom_prepare.on_done_cpt()
|
|
||||||
return done
|
|
||||||
|
|
||||||
def a_dwell(self):
|
def a_dwell(self):
|
||||||
self.custom_prepare.on_dwell()
|
self.custom_prepare.on_dwell()
|
Reference in New Issue
Block a user