예제 #1
0
파일: crio.py 프로젝트: ludovico86/concert
    def __init__(self):
        calibration = LinearCalibration(50000 / q.mm, 0 * q.mm)
        super(RotationMotor, self).__init__(calibration)

        self._steps = 0
        self._connection = SocketConnection(CRIO_HOST, CRIO_PORT)
        self['position'].limiter = lambda x: x >= 0 * q.mm and x <= 2 * q.mm
예제 #2
0
 def __init__(self, host=DEFAULT_CRIO_HOST, port=DEFAULT_CRIO_PORT_LINEAR):
     super(LinearMotor, self).__init__()
     self._connection = SocketConnection(host, port, '\r\n')
     self._position = 0 * q.mm
     self._to_device_scale = 50000
     self['position'].lower = 0 * q.mm
     self['position'].upper = 2 * q.mm
예제 #3
0
 def __init__(self,
              host=DEFAULT_CRIO_HOST,
              port=DEFAULT_CRIO_PORT_ROTATIONAL):
     super(RotationMotor, self).__init__()
     self._connection = SocketConnection(host, port, '\r\n')
     self._position = 0 * q.deg
     self._velocity = 0 * q.deg / q.s
     self._to_device_scale = 2
예제 #4
0
 def __init__(self, host, port):
     super(ARRW60, self).__init__()
     self._connection = SocketConnection(host, port, "\r\n")
     self._states = self._states.union(set([ARRW60.OK, ARRW60.ERROR]))
예제 #5
0
 def __init__(self, host, port):
     super(ARRW60, self).__init__(LinearCalibration(q.counts / q.g,
                                                    0 * q.g))
     self._connection = SocketConnection(host, port, "\r\n")
     self._states = self._states.union(set([ARRW60.OK, ARRW60.ERROR]))