thorlabs_apt_device.devices.tdc001 module

class thorlabs_apt_device.devices.tdc001.TDC001(serial_port=None, vid=None, pid=None, manufacturer=None, product=None, serial_number='83', location=None, home=True, invert_direction_logic=True, swap_limit_switches=True)[source]

Bases: APTDevice_Motor

A class specific to the ThorLabs TDC001 motion controller.

It is based off APTDevice_Motor with some customisation for the specifics of the device. For example, the controller is single bay/channel, has inverted direction logic, and has a few extra device-specific commands.

Additionally, as it is a single bay/channel controller, aliases of status = status_[0][0] etc are created for convenience.

Parameters:
  • serial_port – Serial port device the device is connected to.

  • vid – Numerical USB vendor ID to match.

  • pid – Numerical USB product ID to match.

  • manufacturer – Regular expression to match to a device manufacturer string.

  • product – Regular expression to match to a device product string.

  • serial_number – Regular expression matching the serial number of device to search for.

  • location – Regular expression to match to a device bus location.

  • home – Perform a homing operation on initialisation.

  • invert_direction_logic – Invert the meaning of “forward” and “reverse”.

  • swap_limit_switches – Swap the “forward” and “reverse” limit switch signals.

set_led_mode(mode_bits, bay=0, channel=0)[source]

Configure the behaviour of the controller’s status LEDs.

The mode_bits can be generated by composing values from the LEDMode enum. For example, LEDMode.IDENT | LEDMode.MOVING would set the LED to flash when the identify message is sent, and also when the motor is moving.

Parameters:
  • mode_bits – Integer containing the relevant mode bits.

  • bay – Index (0-based) of controller bay to send the command.

  • channel – Index (0-based) of controller bay channel to send the command.

genmoveparams

Alias to first bay/channel of genmoveparams_

homeparams

Alias to first bay/channel of homeparams_

jogparams

Alias to first bay/channel of jogparams_

ledmode

Dictionary describing the LED activity mode.

See LEDMode for details on the different modes.

pidparams

Dictionary of PID algorithm parameters.

Keys are "proportional", "integral", "differential", "integral_limits", and "filter_control".

status

Alias to first bay/channel of status_.

velparams

Alias to first bay/channel of velparams_