herosdevices.hardware.thorlabs.mdt69xb - Heros Devices 0.11.1 documentation

Skip to content
Back to top
View this page

# herosdevices.hardware.thorlabs.mdt69xb

Device driver for ThorLabs MDT69XB Piezo Controllers.

## Module Contents

herosdevices.hardware.thorlabs.mdt69xb.MDT69XB_CHANNELS

class herosdevices.hardware.thorlabs.mdt69xb.MDT694B(address: str, timeout: float = 1.0)

  Bases: `herosdevices.core.templates.SerialDeviceTemplate`

  Device driver for the MDT694B Single Channel, Open-Loop Piezo Controller.

  Parameters:

    - address – Serial address of the device. Example: “/dev/ttyUSB0”

    - timeout – timeout for read operations.

  voltage_x: float
  min_voltage_x: float
  max_voltage_x: float
  initial_piezo_loop(voltage_start: float, voltage_stop: float, channel: int | str = 0) → None

    Perform a piezo voltage loop to compensate for hysteresis effects.

    This function executes a voltage cycle (start -> stop -> start) on the specified piezo axis. Doing this before setting the target value helps compensate for the hysteresis behavior inherent in piezo actuators.

    Parameters:

      - channel – The piezo axis to control. Can be either: - Integer (0, 1, 2) corresponding to x, y, z axes respectively - String (‘x’, ‘y’, ‘z’) directly specifying the axis For the one channel MDT694B, only x or 0 is valid.

      - voltage_start – Starting voltage in volts for the hysteresis compensation loop

      - voltage_stop – Stop voltage in volts for the hysteresis compensation loop

    Raises:

      ValueError – If channel is not a valid channel for the device

  address
  connection

class herosdevices.hardware.thorlabs.mdt69xb.MDT693B(address: str, timeout: float = 1.0)

  Bases: `MDT694B`

  Device driver for the MDT693B 3-Channel, Open-Loop Piezo Controller.

  voltage_y: float
  min_voltage_y: float
  max_voltage_y: float
  voltage_z: float
  min_voltage_z: float
  max_voltage_z: float
  voltage_x: float
  min_voltage_x: float
  max_voltage_x: float
  initial_piezo_loop(voltage_start: float, voltage_stop: float, channel: int | str = 0) → None

    Perform a piezo voltage loop to compensate for hysteresis effects.

    This function executes a voltage cycle (start -> stop -> start) on the specified piezo axis. Doing this before setting the target value helps compensate for the hysteresis behavior inherent in piezo actuators.

    Parameters:

      - channel – The piezo axis to control. Can be either: - Integer (0, 1, 2) corresponding to x, y, z axes respectively - String (‘x’, ‘y’, ‘z’) directly specifying the axis For the one channel MDT694B, only x or 0 is valid.

      - voltage_start – Starting voltage in volts for the hysteresis compensation loop

      - voltage_stop – Stop voltage in volts for the hysteresis compensation loop

    Raises:

      ValueError – If channel is not a valid channel for the device

  address
  connection

class herosdevices.hardware.thorlabs.mdt69xb.MDT69xBChannel(host_device: MDT693B | MDT694B, channel: int | str = 'x')

  Bases: `herosdevices.interfaces.atomiq.VoltageSource`

  A single channel of a MDT69xB piezo driver.

  This class provides an `herosdevices.interfaces.atomiq.VoltageSource` compatible interface to control a single channel of a MDT69xB piezo driver.

  Note

  This class does not directly connect to the hardware but to another object given by the host_device argument which can also be a HERO running on another machine. It can be used to provide a universal interface which does not require setting a channel for every operation.

  Parameters:

    - host_device – The host MDT69xB device (MDT693B or MDT694B).

    - channel – The channel to control (can be int 0-2 or str ‘x’, ‘y’, ‘z’, depending on host_device)

  Raises:

    ValueError – If the channel is not valid for the host device

  host_device
  channel: str
  property voltage: float

    Get or set the current voltage of the channel.

    Returns:

      The current voltage in volts

  property max_voltage: float

    Get or set the maximum voltage limit for the channel.

    Returns:

      The maximum voltage limit in volts

  property min_voltage: float

    Get or set the minimum voltage limit for the channel.

    Returns:

      The minimum voltage limit in volts

  initial_piezo_loop(voltage_start: float, voltage_stop: float) → None

    Perform a piezo voltage loop to compensate for hysteresis effects.

    This function executes a voltage cycle (start -> stop -> start) on the specified piezo axis. Doing this before setting the target value helps compensate for the hysteresis behavior inherent in piezo actuators.

    Parameters:

      - voltage_start – Starting voltage in volts for the hysteresis compensation loop

      - voltage_stop – Stop voltage in volts for the hysteresis compensation loop

    Raises:

      ValueError – If channel is not a valid channel for the device

  default_ramp_steps: int = 30
  blind: bool = False