Exemplo n.º 1
0
 def _move_async(self, position, **kwargs):
     '''Move and do not wait until motion is complete (asynchronous)'''
     if self.actuate is not None:
         set_and_wait(self.setpoint, position)
         self.actuate.put(self.actuate_value, wait=False)
     else:
         self.setpoint.put(position, wait=False)
Exemplo n.º 2
0
 def _move_async(self, position, **kwargs):
     '''Move and do not wait until motion is complete (asynchronous)'''
     if self.actuate is not None:
         set_and_wait(self.setpoint, position)
         self.actuate.put(self.actuate_value, wait=False)
     else:
         self.setpoint.put(position, wait=False)
Exemplo n.º 3
0
 def check_burst_rate(self):
     if self.machine_burst_rate != self._req_burst_rate:
         print('Machine burst frequency not set to %s! - fixing...' %self._req_burst_rate)
         if self._beam_owner.get() == self._hutch_id.get():
             set_and_wait(self._mps_burst_rate, self._req_burst_rate)  #ophyd set and wait() - ophyd.utils.epics_pvs.set_and_wait
         else:
             set_and_wait(self._test_burst_rate, self._req_burst_rate)
         print('done.')
Exemplo n.º 4
0
    def set_current_position(self, pos):
        """
        Change the offset such that pos is the current position.

        This is a re-implementation of the ophyd set_current_position, which
        does not work on some legacy PCDS motors because they do not use the
        standard motor record. This non-standard record does not respond
        correctly to wait=True on the VAL field while SET/USE is set to SET.
        """
        self.set_use_switch.put(1, wait=True)
        set_and_wait(self.user_setpoint, pos, timeout=1)
        self.set_use_switch.put(0, wait=True)
Exemplo n.º 5
0
 def set(self, *args, **kwargs):
     set_and_wait(self.brake, 1)
     return self.gap.set(*args, **kwargs)
Exemplo n.º 6
0
 def set_reference(self, new_ref):
     if new_ref.upper() not in CHANNELS:
         raise ValueError(f'New reference must be one of {CHANNELS}')
     else:
         set_and_wait(self.reference, new_ref)
         print(f'Setting for {self.name}: {self.get_str()}')
Exemplo n.º 7
0
 def set_trigger_inhibit(self, new_val):
     set_and_wait(self.trig_inhibit, new_val)
     print(f'Trigger inhibit: {self.get_trigger_inhibit()}')
     return
Exemplo n.º 8
0
 def set_trigger_source(self, new_val):
     set_and_wait(self.trig_source, new_val)
     print(f'Trigger source: {self.get_trigger_source()}')
     return
Exemplo n.º 9
0
 def move(self, *args, **kwargs):
     set_and_wait(self.brake, 1)
     return super().move(*args, **kwargs)