msl.equipment.resources.thorlabs.kinesis.integrated_stepper_motors module
This module provides all the functionality required to control a number of Integrated Stepper Motors including:
Long Travel Stages (LTS150 and LTS300)
Lab Jack (MLJ050, MLJ150)
Cage Rotator (K10CR1)
- class msl.equipment.resources.thorlabs.kinesis.integrated_stepper_motors.IntegratedStepperMotors(record)[source]
Bases:
MotionControl
A wrapper around
Thorlabs.MotionControl.IntegratedStepperMotors.dll
.The
properties
for an IntegratedStepperMotors connection supports the following key-value pairs in the Connections Database:'device_name': str, the device name found in ThorlabsDefaultSettings.xml [default: None]
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.
- can_home()[source]
Can the device perform a
home()
?- Returns:
bool
– Whether the device can be homed.
- can_move_without_homing_first()[source]
Does the device need to be
home()
’d before a move can be performed?- Returns:
bool
– Whether the device needs to be homed.
- check_connection()[source]
Check connection.
- Returns:
bool
– Whether the USB is listed by the FTDI controller.
- disable_channel()[source]
Disable the channel so that motor can be moved by hand.
When disabled, power is removed from the motor and it can be freely moved.
- Raises:
ThorlabsError – If not successful.
- enable_channel()[source]
Enable channel for computer control.
When enabled, power is applied to the motor so it is fixed in position.
- Raises:
ThorlabsError – If not successful.
- enable_last_msg_timer(enable, last_msg_timeout)[source]
Enables the last message monitoring timer.
This can be used to determine whether communications with the device is still good.
- get_backlash()[source]
Get the backlash distance setting (used to control hysteresis).
See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Returns:
int
– The backlash distance inDeviceUnits
(see manual).
- get_button_params()[source]
Gets the LTS button parameters.
See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Returns:
enums.MOT_ButtonModes
– The button mode.int
– The Preset position inDeviceUnits
for the left button (when in preset mode).int
– The Preset position inDeviceUnits
for the right button (when in preset mode).int
– The time that buttons need to be pressed in order to go home or to record a preset buttons defined position.
- Raises:
ThorlabsError – If not successful.
- get_button_params_block()[source]
Get the button parameters.
- Returns:
structs.MOT_ButtonParameters
– The button parameters.- Raises:
ThorlabsError – If not successful.
- get_calibration_file()[source]
Get the calibration file for this motor.
- Returns:
str
– The filename of the calibration file.- Raises:
ThorlabsError – If not successful.
- get_device_unit_from_real_value(real_value, unit_type)[source]
Converts a real-world value to a device value.
Either
load_settings()
,load_named_settings()
orset_motor_params_ext()
must be called before calling this function, otherwise the returned value will always be 0.- Parameters:
real_value (
float
) – The real-world value.unit_type (
enums.UnitType
) – The unit of the real-world value.
- Returns:
int
– The device value.- Raises:
ThorlabsError – If not successful.
- get_firmware_version()[source]
Gets version number of the device firmware.
- Returns:
str
– The firmware version.
- get_hardware_info()[source]
Gets the hardware information from the device.
- Returns:
structs.TLI_HardwareInformation
– The hardware information.- Raises:
ThorlabsError – If not successful.
- get_hardware_info_block()[source]
Gets the hardware information in a block.
- Returns:
structs.TLI_HardwareInformation
– The hardware information.- Raises:
ThorlabsError – If not successful.
- get_homing_params_block()[source]
Get the homing parameters.
- Returns:
structs.MOT_HomingParameters
– The homing parameters.- Raises:
ThorlabsError – If not successful.
- get_homing_velocity()[source]
Gets the homing velocity.
See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Returns:
int
– The homing velocity inDeviceUnits
(see manual).
- get_jog_mode()[source]
Gets the jog mode.
- Returns:
enums.MOT_JogModes
– The jog mode.enums.MOT_StopModes
– The stop mode.
- Raises:
ThorlabsError – If not successful.
- get_jog_params_block()[source]
Get the jog parameters.
- Returns:
structs.MOT_JogParameters
– The jog parameters.- Raises:
ThorlabsError – If not successful.
- get_jog_step_size()[source]
Gets the distance to move when jogging.
See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Returns:
int
– The step size inDeviceUnits
(see manual).
- get_jog_vel_params()[source]
Gets the jog velocity parameters.
See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Returns:
- Raises:
ThorlabsError – If not successful.
- get_led_switches()[source]
Get the LED indicator bits on the device.
- Returns:
int
– Sum of: 8 to indicate moving 2 to indicate end of track and 1 to flash on identify command.
- get_limit_switch_params()[source]
Gets the limit switch parameters.
See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Returns:
enums.MOT_LimitSwitchModes
– The clockwise hardware limit mode.enums.MOT_LimitSwitchModes
– The anticlockwise hardware limit mode.int
– The position of the clockwise software limit inDeviceUnits
(see manual).int
– The position of the anticlockwise software limit inDeviceUnits
(see manual).enums.MOT_LimitSwitchSWModes
– The soft limit mode.
- Raises:
ThorlabsError – If not successful.
- get_limit_switch_params_block()[source]
Get the limit switch parameters.
- Returns:
structs.MOT_LimitSwitchParameters
– The limit switch parameters.- Raises:
ThorlabsError – If not successful.
- get_motor_params()[source]
Gets the motor stage parameters.
Deprecated: calls
get_motor_params_ext()
- get_motor_params_ext()[source]
Gets the motor stage parameters.
These parameters, when combined define the stage motion in terms of
RealWorldUnits
[millimeters or degrees]. The real-world unit is defined fromsteps_per_rev * gear_box_ratio / pitch
.- Returns:
- Raises:
ThorlabsError – If not successful.
- get_motor_travel_limits()[source]
Gets the motor stage min and max position.
- Returns:
- Raises:
ThorlabsError – If not successful.
- get_motor_travel_mode()[source]
Get the motor travel mode.
- Returns:
enums.MOT_TravelModes
– The travel mode.
- get_motor_velocity_limits()[source]
Gets the motor stage maximum velocity and acceleration.
- Returns:
- Raises:
ThorlabsError – If not successful.
- get_move_absolute_position()[source]
Gets the move absolute position.
See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Returns:
int
– The move absolute position inDeviceUnits
(see manual).
- get_move_relative_distance()[source]
Gets the move relative distance.
See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Returns:
int
– The move relative position inDeviceUnits
(see manual).
- get_next_message()[source]
Get the next Message Queue item. See
messages
.- Returns:
- Raises:
ThorlabsError – If not successful.
- get_number_positions()[source]
Get the number of positions.
This function will get the maximum position reachable by the device. The motor may need to be set to its
home()
position before this parameter can be used.- Returns:
int
– The number of positions.
- get_position()[source]
Get the current position.
See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Returns:
index (
int
) – The position inDeviceUnits
(see manual).
- get_position_counter()[source]
Get the position counter.
The position counter is identical to the position parameter. The position counter is set to zero when homing is complete.
See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Returns:
int
– The position counter inDeviceUnits
(see manual).
- get_potentiometer_params(index)[source]
Gets the potentiometer parameters for the LTS.
See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Parameters:
index (
int
) – The potentiometer index to be read.- Returns:
- Raises:
ThorlabsError – If not successful.
- get_potentiometer_params_block()[source]
Get the potentiometer parameters.
- Returns:
structs.MOT_PotentiometerSteps
– The potentiometer parameters.- Raises:
ThorlabsError – If not successful.
- get_power_params()[source]
Gets the power parameters for the stepper motor.
- Returns:
structs.MOT_PowerParameters
– The power parameters.- Raises:
ThorlabsError – If not successful.
- get_real_value_from_device_unit(device_value, unit_type)[source]
Converts a device value to a real-world value.
Either
load_settings()
,load_named_settings()
orset_motor_params_ext()
must be called before calling this function, otherwise the returned value will always be 0.- Parameters:
device_value (
int
) – The device value.unit_type (
enums.UnitType
) – The unit of the device value.
- Returns:
float
– The real-world value.- Raises:
ThorlabsError – If not successful.
- get_soft_limit_mode()[source]
Gets the software limits mode.
- Returns:
enums.MOT_LimitsSoftwareApproachPolicy
– The software limits mode.
- get_software_version()[source]
Gets version number of the device software.
- Returns:
str
– The device software version.
- get_stage_axis_max_pos()[source]
Gets the LTS Motor maximum stage position.
See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Returns:
int
– The maximum position inDeviceUnits
(see manual).
- get_stage_axis_min_pos()[source]
Gets the LTS Motor minimum stage position.
See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Returns:
int
– The minimum position inDeviceUnits
(see manual).
- get_status_bits()[source]
Get the current status bits.
This returns the latest status bits received from the device. To get new status bits, use
request_status_bits()
or userequest_status()
or use the polling function,start_polling()
.- Returns:
int
– The status bits from the device.
- get_trigger_switches()[source]
Gets the trigger switch bits.
- Returns:
int
– 8 bits indicating action on trigger input and events to trigger electronic output.
- get_vel_params()[source]
Gets the move velocity parameters.
See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Returns:
- Raises:
ThorlabsError – If not successful.
- get_vel_params_block()[source]
Get the move velocity parameters.
- Returns:
structs.MOT_VelocityParameters
– The velocity parameters.- Raises:
ThorlabsError – If not successful.
- has_last_msg_timer_overrun()[source]
Queries if the time since the last message has exceeded the
lastMsgTimeout
set byenable_last_msg_timer()
.This can be used to determine whether communications with the device is still good.
- home()[source]
Home the device.
Homing the device will set the device to a known state and determine the home position.
- Raises:
ThorlabsError – If not successful.
- identify()[source]
Sends a command to the device to make it identify itself.
- Raises:
ThorlabsError – If not successful.
- is_calibration_active()[source]
Is a calibration file active for this motor?
- Returns:
bool
– Whether a calibration file is active.
- load_settings()[source]
Update device with stored settings.
The settings are read from
ThorlabsDefaultSettings.xml
, which gets created when the Kinesis software is installed.- Raises:
ThorlabsError – If not successful.
- load_named_settings(settings_name)[source]
Update device with named settings.
- Parameters:
settings_name (
str
) – The name of the device to load the settings for. Examples for the value of setting_name can be found in ThorlabsDefaultSettings.xml`, which gets created when the Kinesis software is installed.- Raises:
ThorlabsError – If not successful.
- message_queue_size()[source]
Gets the size of the message queue.
- Returns:
int
– The number of messages in the queue.
- move_absolute()[source]
Moves the device to the position defined in
set_move_absolute_position()
.- Raises:
ThorlabsError – If not successful.
- move_at_velocity(direction)[source]
Start moving at the current velocity in the specified direction.
- Parameters:
direction (
enums.MOT_TravelDirection
) – The required direction of travel as aenums.MOT_TravelDirection
enum value or member name.- Raises:
ThorlabsError – If not successful.
- move_jog(jog_direction)[source]
Perform a jog.
- Parameters:
jog_direction (
enums.MOT_TravelDirection
) – The jog direction as aenums.MOT_TravelDirection
enum value or member name.- Raises:
ThorlabsError – If not successful.
- move_relative(displacement)[source]
Move the motor by a relative amount.
See
get_device_unit_from_real_value()
for converting from aRealValue
to aDeviceUnit
.- Parameters:
displacement (
int
) – Signed displacement inDeviceUnits
(see manual).- Raises:
ThorlabsError – If not successful.
- move_relative_distance()[source]
Moves the device by a relative distance defined by
set_move_relative_distance()
.- Raises:
ThorlabsError – If not successful.
- move_to_position(index)[source]
Move the device to the specified position (index).
The motor may need to be set to its
home()
position before a position can be set.See
get_device_unit_from_real_value()
for converting from aRealValue
to aDeviceUnit
.- Parameters:
index (
int
) – The position inDeviceUnits
(see manual).- Raises:
ThorlabsError – If not successful.
- needs_homing()[source]
Does the device need to be
home()
’d before a move can be performed?Deprecated: calls
can_move_without_homing_first()
instead.- Returns:
bool
– Whether the device needs to be homed.
- open()[source]
Open the device for communication.
- Raises:
ThorlabsError – If not successful.
- persist_settings()[source]
Persist the devices current settings.
- Raises:
ThorlabsError – If not successful.
- polling_duration()[source]
Gets the polling loop duration.
- Returns:
int
– The time between polls in milliseconds or 0 if polling is not active.
- register_message_callback(callback)[source]
Registers a callback on the message queue.
- Parameters:
callback (
MotionControlCallback
) – A function to be called whenever messages are received.
- request_backlash()[source]
Requests the backlash.
- Raises:
ThorlabsError – If not successful.
- request_bow_index()[source]
Requests the stepper motor bow index.
- Raises:
ThorlabsError – If not successful.
- request_button_params()[source]
Requests the LTS button parameters.
- Raises:
ThorlabsError – If not successful.
- request_homing_params()[source]
Requests the homing parameters.
- Raises:
ThorlabsError – If not successful.
- request_jog_params()[source]
Requests the jog parameters.
- Raises:
ThorlabsError – If not successful.
- request_limit_switch_params()[source]
Requests the limit switch parameters.
- Raises:
ThorlabsError – If not successful.
- request_move_absolute_position()[source]
Requests the position of next absolute move.
- Raises:
ThorlabsError – If not successful.
- request_move_relative_distance()[source]
Requests the relative move distance.
- Raises:
ThorlabsError – If not successful.
- request_position()[source]
Requests the current position.
This needs to be called to get the device to send its current position. Note, this is called automatically if
Polling
is enabled for the device usingstart_polling()
.- Raises:
ThorlabsError – If not successful.
- request_potentiometer_params()[source]
Requests the potentiometer parameters.
- Raises:
ThorlabsError – If not successful.
- request_power_params()[source]
Requests the power parameters.
- Raises:
ThorlabsError – If not successful.
- request_settings()[source]
Requests that all settings are downloaded from the device.
This function requests that the device upload all its settings to the DLL.
- Raises:
ThorlabsError – If not successful.
- request_status()[source]
Request position and status bits.
This needs to be called to get the device to send it’s current status. Note, this is called automatically if
Polling
is enabled for the device usingstart_polling()
.- Raises:
ThorlabsError – If not successful.
- request_status_bits()[source]
Request the status bits which identify the current motor state.
This needs to be called to get the device to send its current status bits. Note, this is called automatically if
Polling
is enabled for the device usingstart_polling()
.- Raises:
ThorlabsError – If not successful.
- request_trigger_switches()[source]
Requests the trigger switch bits.
- Raises:
ThorlabsError – If not successful.
- request_vel_params()[source]
Requests the velocity parameters.
- Raises:
ThorlabsError – If not successful.
- reset_rotation_modes()[source]
Reset the rotation modes for a rotational device.
- Raises:
ThorlabsError – If not successful.
- reset_stage_to_defaults()[source]
Reset the stage settings to defaults.
- Raises:
ThorlabsError – If not successful.
- set_backlash(distance)[source]
Sets the backlash distance (used to control hysteresis).
See
get_device_unit_from_real_value()
for converting from aRealValue
to aDeviceUnit
.- Parameters:
distance (
int
) – The backlash distance inDeviceUnits
(see manual).- Raises:
ThorlabsError – If not successful.
- set_bow_index(bow_index)[source]
Sets the stepper motor bow index.
- Parameters:
bow_index (
int
) – The bow index.- Raises:
ThorlabsError – If not successful.
- set_button_params(button_mode, left_button_position, right_button_position)[source]
Sets the LTS button parameters.
See
get_device_unit_from_real_value()
for converting from aRealValue
to aDeviceUnit
.- Parameters:
button_mode (
enums.MOT_ButtonModes
) – The button mode as aenums.MOT_ButtonModes
enum value or member name.left_button_position (
int
) – The Preset position inDeviceUnits
for the left button (when in preset mode).right_button_position (
int
) – The Preset position inDeviceUnits
for the right button (when in preset mode).
- Raises:
ThorlabsError – If not successful.
- set_button_params_block(mode, left_button, right_button, timeout)[source]
Set the button parameters.
- Parameters:
mode (
enums.MOT_ButtonModes
) – The mode of operation of the device buttons as aenums.MOT_ButtonModes
enum value or member name.left_button (
int
) – Position in encoder counts to go to when left button is pressed.right_button (
int
) – Position in encoder counts to go to when right button is pressed.timeout (
int
) – The Time a button needs to be held down for to record the position as a preset.
- Raises:
ThorlabsError – If not successful.
- set_direction(reverse)[source]
Sets the motor direction sense.
This function is used because some actuators use have directions of motion reversed. This parameter will tell the system to reverse the direction sense when moving, jogging etc.
- Parameters:
reverse (
bool
) – IfTrue
then directions will be swapped on these moves.- Raises:
ThorlabsError – If not successful.
- set_homing_params_block(direction, limit, velocity, offset)[source]
Set the homing parameters.
- Parameters:
direction (
enums.MOT_TravelDirection
) – The Homing direction sense as aenums.MOT_TravelDirection
enum value or member name.limit (
enums.MOT_HomeLimitSwitchDirection
) – The limit switch direction as aenums.MOT_HomeLimitSwitchDirection
enum value or member name.velocity (
int
) – The velocity in small indivisible units.offset (
int
) – Distance of home from limit in small indivisible units.
- Raises:
ThorlabsError – If not successful.
- set_homing_velocity(velocity)[source]
Sets the homing velocity.
See
get_device_unit_from_real_value()
for converting from aRealValue
to aDeviceUnit
.- Parameters:
velocity (
int
) – The homing velocity inDeviceUnits
(see manual).- Raises:
ThorlabsError – If not successful.
- set_jog_mode(mode, stop_mode)[source]
Sets the jog mode.
- Parameters:
mode (
enums.MOT_JogModes
) – The jog mode, as aenums.MOT_JogModes
enum value or member name.stop_mode (
enums.MOT_StopModes
) – The stop mode, as aenums.MOT_StopModes
enum value or member name.
- Raises:
ThorlabsError – If not successful.
- set_jog_params_block(jog_params)[source]
Set the jog parameters.
- Parameters:
jog_params (
structs.MOT_JogParameters
) – The jog parameters.- Raises:
ThorlabsError – If not successful.
TypeError – If the data type of jog_params is not
structs.MOT_JogParameters
- set_jog_step_size(step_size)[source]
Sets the distance to move on jogging.
See
get_device_unit_from_real_value()
for converting from aRealValue
to aDeviceUnit
.- Parameters:
step_size (
int
) – The step size inDeviceUnits
(see manual).- Raises:
ThorlabsError – If not successful.
- set_jog_vel_params(max_velocity, acceleration)[source]
Sets jog velocity parameters.
See
get_device_unit_from_real_value()
for converting from aRealValue
to aDeviceUnit
.- Parameters:
- Raises:
ThorlabsError – If not successful.
- set_led_switches(led_switches)[source]
Set the LED indicator bits on the device.
- Parameters:
led_switches (
int
) – Sum of: 8 to indicate moving 2 to indicate end of track and 1 to flash on identify command.- Raises:
ThorlabsError – If not successful.
- set_limit_switch_params(cw_lim, ccw_lim, cw_pos, ccw_pos, soft_limit_mode)[source]
Sets the limit switch parameters.
See
get_device_unit_from_real_value()
for converting from aRealValue
to aDeviceUnit
.- Parameters:
cw_lim (
enums.MOT_LimitSwitchModes
) – The clockwise hardware limit mode as aenums.MOT_LimitSwitchModes
enum value or member name.ccw_lim (
enums.MOT_LimitSwitchModes
) – The anticlockwise hardware limit mode as aenums.MOT_LimitSwitchModes
enum value or member name.cw_pos (
int
) – The position of the clockwise software limit inDeviceUnits
(see manual).ccw_pos (
int
) – The position of the anticlockwise software limit inDeviceUnits
(see manual).soft_limit_mode (
enums.MOT_LimitSwitchSWModes
) – The soft limit mode as aenums.MOT_LimitSwitchSWModes
enum value or member name.
- Raises:
ThorlabsError – If not successful.
- set_limit_switch_params_block(params)[source]
Set the limit switch parameters.
- Parameters:
params (
structs.MOT_LimitSwitchParameters
) – The new limit switch parameters.- Raises:
ThorlabsError – If not successful.
TypeError – If the data type of joystick_params is not
structs.MOT_JoystickParameters
- set_limits_software_approach_policy(policy)[source]
Sets the software limits policy.
- Parameters:
policy (
enums.MOT_LimitsSoftwareApproachPolicy
) – The soft limit mode as aenums.MOT_LimitsSoftwareApproachPolicy
enum value or member name.
- set_motor_params(steps_per_rev, gear_box_ratio, pitch)[source]
Sets the motor stage parameters.
Deprecated: calls
set_motor_params_ext()
These parameters, when combined, define the stage motion in terms of
RealWorldUnits
[millimeters or degrees]. The real-world unit is defined fromsteps_per_rev * gear_box_ratio / pitch
.See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Parameters:
- Raises:
ThorlabsError – If not successful.
- set_motor_params_ext(steps_per_rev, gear_box_ratio, pitch)[source]
Sets the motor stage parameters.
These parameters, when combined, define the stage motion in terms of
RealWorldUnits
[millimeters or degrees]. The real-world unit is defined fromsteps_per_rev * gear_box_ratio / pitch
.See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Parameters:
- Raises:
ThorlabsError – If not successful.
- set_motor_travel_limits(min_position, max_position)[source]
Sets the motor stage min and max position.
These define the range of travel for the stage.
See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Parameters:
- Raises:
ThorlabsError – If not successful.
- set_motor_travel_mode(travel_mode)[source]
Set the motor travel mode.
- Parameters:
travel_mode (
enums.MOT_TravelModes
) – The travel mode as aenums.MOT_TravelModes
enum value or member name.- Raises:
ThorlabsError – If not successful.
- set_motor_velocity_limits(max_velocity, max_acceleration)[source]
Sets the motor stage maximum velocity and acceleration.
See
get_real_value_from_device_unit()
for converting from aDeviceUnit
to aRealValue
.- Parameters:
- Raises:
ThorlabsError – If not successful.
- set_move_absolute_position(position)[source]
Sets the move absolute position.
See
get_device_unit_from_real_value()
for converting from aRealValue
to aDeviceUnit
.- Parameters:
position (
int
) – The absolute position inDeviceUnits
(see manual).- Raises:
ThorlabsError – If not successful.
- set_move_relative_distance(distance)[source]
Sets the move relative distance.
See
get_device_unit_from_real_value()
for converting from aRealValue
to aDeviceUnit
.- Parameters:
distance (
int
) – The relative position inDeviceUnits
(see manual).- Raises:
ThorlabsError – If not successful.
- set_position_counter(count)[source]
Set the position counter.
Setting the position counter will locate the current position. Setting the position counter will effectively define the home position of a motor.
See
get_device_unit_from_real_value()
for converting from aRealValue
to aDeviceUnit
.- Parameters:
count (
int
) – The position counter inDeviceUnits
(see manual).- Raises:
ThorlabsError – If not successful.
- set_potentiometer_params(index, threshold, velocity)[source]
Sets the potentiometer parameters for the LTS.
See
get_device_unit_from_real_value()
for converting from aRealValue
to aDeviceUnit
.- Parameters:
- Raises:
ThorlabsError – If not successful.
- set_potentiometer_params_block(params)[source]
Set the potentiometer parameters.
- Parameters:
params (
structs.MOT_PotentiometerSteps
) – The potentiometer parameters.- Raises:
ThorlabsError – If not successful.
- set_power_params(rest, move)[source]
Sets the power parameters for the stepper motor.
- Parameters:
- Raises:
ThorlabsError – If not successful.
- set_rotation_modes(mode, direction)[source]
Set the rotation modes for a rotational device.
- Parameters:
mode (
enums.MOT_MovementModes
) – The travel mode as aenums.MOT_MovementModes
enum value or member name.direction (
enums.MOT_MovementDirections
) – The travel mode as aenums.MOT_MovementDirections
enum value or member name.
- Raises:
ThorlabsError – If not successful.
- set_stage_axis_limits(min_position, max_position)[source]
Sets the stage axis position limits.
See
get_device_unit_from_real_value()
for converting from aRealValue
to aDeviceUnit
.- Parameters:
- Raises:
ThorlabsError – If not successful.
- set_trigger_switches(indicator_bits)[source]
Sets the trigger switch bits.
- Parameters:
indicator_bits (
int
) – Sets the 8 bits indicating action on trigger input and events to trigger electronic output.- Raises:
ThorlabsError – If not successful.
- set_vel_params(max_velocity, acceleration)[source]
Sets the move velocity parameters.
See
get_device_unit_from_real_value()
for converting from aRealValue
to aDeviceUnit
.- Parameters:
- Raises:
ThorlabsError – If not successful.
- set_vel_params_block(min_velocity, max_velocity, acceleration)[source]
Set the move velocity parameters.
See
get_device_unit_from_real_value()
for converting from aRealValue
to aDeviceUnit
.- Parameters:
- Raises:
ThorlabsError – If not successful.
- start_polling(milliseconds)[source]
Starts the internal polling loop.
This function continuously requests position and status messages.
- Parameters:
milliseconds (
int
) – The polling rate, in milliseconds.- Raises:
ThorlabsError – If not successful.
- stop_immediate()[source]
Stop the current move immediately (with the risk of losing track of the position).
- Raises:
ThorlabsError – If not successful.
- stop_profiled()[source]
Stop the current move using the current velocity profile.
- Raises:
ThorlabsError – If not successful.