T-Cube DC Servo Motor Controller (TDC001)

Driver for controlling Thorlabs TDC001 T-Cube DC Servo Motor Controllers using the Kinesis SDK.

One must place Thorlabs.MotionControl.DeviceManager.dll and Thorlabs.MotionControl.TCube.DCServo.dll in the path.

exception instrumental.drivers.motion.tdc_001.TDC001Error
class instrumental.drivers.motion.tdc_001.SoftwareApproachPolicy(value)

An enumeration.

AllowAll = 3
DisableFarOutsideRange = 1
DisableOutsideRange = 0
TruncateBeyondLimit = 2
class instrumental.drivers.motion.tdc_001.TDC001(inst=None, **kwds)

Controlling Thorlabs TDC001 T-Cube DC Servo Motor Controllers

The polling period, which is how often the device updates its status, is passed as a pint pint quantity with units of time and is optional argument, with a default of 200ms

class Status(status_bits)

Stores information about the status of the device from the status bits.

__init__(status_bits)
at_position(position, tol=1)

Indicates whether the motor is at the given position.

Parameters
  • position (motor is considered to be at) –

  • tol (int representing the number of encoder counts within which the) –

  • position

close()
get_motor_params()

Gets the stage motor parameters.

Returns

  • (steps_per_rev (int,)

  • gearbox_ratio (int,)

  • pitch (float))

get_position()

Returns the position of the motor.

Note that this represents the position at the most recent polling event.

get_status()

Returns the status registry bits from the device.

home()

Homes the device

move_and_wait(position, delay='100ms', tol=1)

Moves to the indicated position and waits until that position is reached.

Parameters
  • position (pint quantity of units self.real_world_units) –

  • delay (pint quantity with units of time) – the period with which the position of the motor is checked.

  • tol (int) – the tolerance, in encoder units, to which the motor is considered at position

move_to(position)

Moves to the indicated position

Returns immediately.

Parameters

position (pint quantity of units self.real_world_units) –

set_motor_params(steps_per_rev, gearbox_ratio, pitch)

Sets the motor stage parameters.

Parameters
  • steps_per_rev (int) –

  • gearbox_ratio (int) –

  • pitch (float) –

class instrumental.drivers.motion.tdc_001.TravelMode(value)

An enumeration.

Linear = 1
Rotational = 2
instrumental.drivers.motion.tdc_001.initialize_simulations()

Initialize a connection to the Simulation Manager, which must already be running.

Can be called multiple times. For a simulated device to show up in list_instruments, this function must be called after the device’s creation.

This function automatically registers uninitialize_simulations to be called upon program exit.

instrumental.drivers.motion.tdc_001.list_instruments()
instrumental.drivers.motion.tdc_001.uninitialize_simulations()

Release the connection to the Simulation Manager.

This function is automatically registered by initialize_simulations to be called upon program exit.