def lightwave_monitor(self,PV_name,value,char_value):
     #print('time: %r, PV_name = %r,value= %r,char_value = %r' %(time(),PV_name,value,char_value) )
     from CA import cainfo
     from CAServer import casput
     prefix = self.lightwave_prefix
     if PV_name == prefix+".VAL":
         arr = empty((2,1))
         arr[0] = cainfo(prefix+".VAL","timestamp")
         arr[1] = float(value)
         self.buffers['lightwave_VAL'].append(arr)
         casput(self.prefix +'.VAL',value = float(value))
     if PV_name == prefix+".RBV":
         arr = empty((2,1))
         arr[0] = cainfo(prefix+".RBV","timestamp")
         arr[1] = float(value)
         self.buffers['lightwave_RBV'].append(arr)
         casput(self.prefix +'.RBV',value = float(value))
     if PV_name == prefix+".P":
         arr = empty((2,1))
         arr[0] = cainfo(prefix+".P","timestamp")
         arr[1] = float(value)
         self.buffers['lightwave_P'].append(arr)
         casput(self.prefix +'.P',value = float(value))
     if PV_name == prefix+".I":
         arr = empty((2,1))
         arr[0] = cainfo(prefix+".I","timestamp")
         arr[1] = float(value)
         self.buffers['lightwave_I'].append(arr)
         casput(self.prefix +'.I',value = float(value))
     #Done Move PV
     if PV_name == prefix+".DMOV":
         casput(self.prefix +'.DMOV',value = float(value))
Exemple #2
0
 def delays(PV_name, dt=0.01, T=1.0):
     from numpy import rint
     delays = []
     for i in range(0, int(rint(T / dt))):
         delays.append(cainfo(PV_name, "timestamp") - time())
         sleep(dt)
     return delays
 def oasis_monitor(self,PV_name,value,char_value):
     #print('oasis_monitor: time: %r, PV_name = %r,value= %r,char_value = %r' %(time(),PV_name,value,char_value) )
     from CA import cainfo
     prefix = self.oasis_prefix
     if PV_name == prefix+".VAL":
         arr = empty((2,1))
         arr[0] = cainfo(prefix+".VAL","timestamp")
         arr[1] = float(value)
         self.buffers['oasis_VAL'].append(arr)
         casput(self.prefix +'.oasis_VAL',value = float(value))
     if PV_name == prefix+".RBV":
         arr = empty((2,1))
         arr[0] = cainfo(prefix+".RBV","timestamp")
         arr[1] = float(value)
         self.buffers['oasis_RBV'].append(arr)
         casput(self.prefix +'.oasis_RBV',value = float(value))
Exemple #4
0
 def start_time(self):
     from numpy import nan
     start_time = nan
     from timing_system import timing_system
     if timing_system.acquiring.value == 1:
         from CA import cainfo
         start_time = cainfo(timing_system.acquiring.PV_name, "timestamp")
     return start_time
 def get_info(self): return cainfo(self.name,printit=False)
 info = property(get_info)
 def get_ip_address(self):
     from CA import cainfo
     return cainfo(self.prefix + "SETUP", "IP_address")