msl.equipment.resources.thorlabs.kinesis.motion_control module
Base Thorlabs.MotionControl
class.
- msl.equipment.resources.thorlabs.kinesis.motion_control.device_manager()[source]
Returns a reference to the DeviceManager library.
The
Thorlabs.MotionControl.DeviceManager.dll
library must be available onos.environ['PATH']
.- Returns:
ctypes.CDLL
– A reference to the library.
- class msl.equipment.resources.thorlabs.kinesis.motion_control.MotionControl(record, api_function, build_device_list=False)[source]
Bases:
ConnectionSDK
Base Thorlabs.MotionControl class.
Do not instantiate this class directly. Use the
connect()
method to connect to the equipment.- Parameters:
record (
EquipmentRecord
) – A record from an Equipment-Register Database.api_function (
api_functions
) – An API function list fromapi_functions
that the subclass is a wrapper around.build_device_list (
bool
, optional) – Whether to callbuild_device_list()
before opening the connection to the device.
- Raises:
ThorlabsError – If a connection to the device cannot be established.
- Benchtop_Brushless_Motor = 73
Benchtop Brushless Motor device ID
- Benchtop_NanoTrak = 22
Benchtop NanoTrak device ID
- Benchtop_Piezo_1_Channel = 41
Benchtop Piezo 1-Channel device ID
- Benchtop_Piezo_3_Channel = 71
Benchtop Piezo 3-Channel device ID
- Benchtop_Stepper_Motor_1_Channel = 40
Benchtop Stepper Motor 1-Channel device ID
- Benchtop_Stepper_Motor_3_Channel = 70
Benchtop Stepper Motor 3-Channel device ID
- Filter_Flipper = 37
Filter Flipper device ID
- Filter_Wheel = 47
Filter Wheel device ID
- KCube_Brushless_Motor = 28
KCube Brushless Motor device ID
- KCube_DC_Servo = 27
KCube DC Servo device ID
- KCube_Inertial_Motor = 97
KCube Inertial Motor device ID
- KCube_LaserSource = 56
KCube Laser Source device ID
- KCube_NanoTrak = 57
KCube NanoTrak device ID
- KCube_Piezo = 29
KCube Piezo device ID
- KCube_Solenoid = 68
KCube Solenoid device ID
- KCube_Stepper_Motor = 26
KCube Stepper Motor device ID
- Long_Travel_Stage = 45
Long Travel Stage device ID
- Cage_Rotator = 55
Cage Rotator device ID
- LabJack_490 = 46
LabJack 490 device ID
- LabJack_050 = 49
LabJack 050 device ID
- Modular_NanoTrak = 52
Modular NanoTrak device ID
- Modular_Piezo = 51
Modular Piezo device ID
- Modular_Stepper_Motor = 50
Modular Stepper Motor device ID
- TCube_Brushless_Motor = 67
TCube Brushless Motor device ID
- TCube_DC_Servo = 83
TCube DC Servo device ID
- TCube_Inertial_Motor = 65
TCube Inertial Motor device ID
- TCube_LaserSource = 86
TCube Laser Source device ID
- TCube_LaserDiode = 64
TCube Laser Diode device ID
- TCube_NanoTrak = 82
TCube NanoTrak device ID
- TCube_Quad = 89
TCube Quad device ID
- TCube_Solenoid = 85
TCube Solenoid device ID
- TCube_Stepper_Motor = 80
TCube Stepper_Motor device ID
- TCube_Strain_Gauge = 84
TCube Strain Gauge device ID
- TCube_TEC = 87
TCube TEC device ID
- Vertical_Stage = 24
Vertical Stage device ID
- SERIAL_NUMBER_BUFFER_SIZE = 500
- errcheck_api(result, func, args)[source]
The API function returns OK if the function call was successful.
- errcheck_true(result, func, args)[source]
The API function returns
True
if the function call was successful.
- property settings
The device settings specified in
ThorlabsDefaultSettings.xml
If this is an empty
dict
then you can specify thedevice_name
in the properties field in the Connections Database or you can run the Kinesis software and allow Kinesis to configure the actuator that is connected to the motor controller.The possible values for
device_name
can be found in theThorlabsDefaultSettings.xml
file (located in the Kinesis installation folder, e.g., C:Program FilesThorlabsKinesis). as theName
value in one of the<DeviceSettingsType>
tags.- Type:
- static build_device_list()[source]
Build the device list.
This function builds an internal collection of all devices found on a USB port that are not currently open.
Note
If a device is open, it will not appear in the list until the device has been closed.
- Raises:
ThorlabsError – If the device list cannot be built.
- static get_device_list(*device_ids)[source]
Get the contents of the device list which match the supplied device IDs.
- Parameters:
device_ids (
int
) – A sequence of device ID’s.- Returns:
list
ofstr
– A list of device serial numbers for the specified device ID(s).- Raises:
ThorlabsError – If there was an error getting the device list.
- static get_device_info(serial_number)[source]
Get the device information from a USB port.
The device info is read from the USB port not from the device itself.
- Parameters:
serial_number (
str
) – The serial number of the device.- Returns:
structs.TLI_DeviceInfo
– A DeviceInfo structure.- Raises:
ThorlabsError – If there was an error getting the device information.
- static to_version(dword)[source]
Convert the firmware or software number to a string.
The number is made up of 4-byte parts.
See the get_firmware_version() or the get_software_version() method of the appropriate Thorlabs MotionControl subclass.