motion package
motion.elliptec_server module
Allows control of Thorlabs elliptec stages.
- class motion.elliptec_server.elliptecServer
Bases:
HardwareInterfaceServerProvides access to Thorlabs elliptec stages.
- N_CHANNELS = 1
- STATUS_DICT = {'00': 'OK', '01': 'Communication time out', '02': 'Mechanical time out', '03': 'Command error', '04': 'Value out of range', '05': 'Module isolated', '06': 'Module out of isolation', '07': 'Initializing error', '08': 'Thermal error', '09': 'Busy', '10': 'Sensor error', '11': 'Motor error', '12': 'Out of range', '13': 'Over current error'}
- TICKS_PER_MM = 1024.0
- __init__()
- static decode_message(msg)
Decodes a message from the elliptec stage into a dictionary.
- get_position(self, c)
Reads the current position of the selected device
- Parameters:
c – The LabRAD context
- Yields:
float – The stage’s position in mm. Note that, if the device is not homed, the value can overflow and be very large.
- home(self, c)
Move the stage to the home position.
- Parameters:
c – The LabRAD context
- Yields:
str – A serialized JSON describing the stage’s status. Includes position if the homing is complete.
- initServer(self)
Lists connected elliptec stages, if any, and connects to the first one.
- move_abs(c, pos)
home(self, c)
Move the stage to the a position relative to home.
- Parameters:
c – The LabRAD context
pos (float) – The target position in milimeters
- Yields:
str – A serialized JSON describing the stage’s status. Includes position if the move is complete.
- name = '%LABRADNODE%_elliptec'
- refresh_available_interfaces()
fill self.interfaces with available hardware
- status(self, c)
Get the status of the stage
- Parameters:
c – The LabRAD context
- Yields:
str – A serialized JSON describing the stage’s status.
- motion.elliptec_server.to_hex(x, bits)
Converts an integer to two’s complement hex