Ejemplo n.º 1
0
 def __init__(self, port):
     port = SerialDevice.normalizePortName(port)
     if port in SutterMPC200.DEVICES:
         raise Exception("The port %s is already accessed by another instance of this class. Use getDevice(port) instead.")
     SutterMPC200.DEVICES[port] = self
     self.lock = RLock()
     self.port = port
     SerialDevice.__init__(self, port=self.port, baudrate=128000)
     self.scale = [0.0625e-6]*3  # default is 16 usteps per micron
     self._moving = False
Ejemplo n.º 2
0
Archivo: mpc200.py Proyecto: ablot/acq4
 def __init__(self, port):
     """
     port: serial COM port (eg. COM3 or /dev/ttyACM0)
     """
     self.lock = RLock()
     self.port = port
     self.pos = [(None,None)]*4  # used to remember position of each drive
     self.currentDrive = None
     SerialDevice.__init__(self, port=self.port, baudrate=128000)
     self.scale = [0.0625e-6]*3  # default is 16 usteps per micron
Ejemplo n.º 3
0
 def __init__(self, p, baud=115200):
     #self.fws = {}
     #self.paramTable = OrderedDict()
     SerialDevice.__init__(self, port=p, baudrate=baud)
     # first function call after power off of the filterwheel returns error, subsequent calls succeed
     try:
         pC = self.getPosCount()
     except:
         pass
     else:
         pass
Ejemplo n.º 4
0
 def __init__(self, port, baudrate=9600, module_addr=1):
     """
     port: serial COM port (eg. COM3 or /dev/ttyACM0)
     baudrate: 9600 by default
     module_addr: 1 by default
     """
     self.lock = RLock(debug=True)
     self.port = port
     assert isinstance(module_addr, int)
     assert module_addr > 0
     self.module_addr = module_addr
     self.module_str = chr(module_addr + 64)
     self._waiting_for_reply = False
     SerialDevice.__init__(self, port=self.port, baudrate=baudrate)
Ejemplo n.º 5
0
 def __init__(self,  serialNumber,  baudrate,  device):
     threading.Thread.__init__(self)
     SerialDevice.__init__(self, serialNumber,  baudrate,  device)
     OscDevice.__init__(self)
     self.__active = False