Skip to content

Connecting to PRO8000 by Thorlabs in Python

Instrument Card

The PRO8000 Chassis can accept up to 8 modules and is ideally suited for the needs of large test setups. This made-to-order chassis can be custom configured with up to eight modules that best meet individual experimental needs prior to purchase. The chassis can also be ordered empty, without any pre-installed modules. The empty slots of the PRO8000 can be covered using PRO8000-C front cover plates.

PRO8000

Device Specification: here

Manufacturer card: THORLABS

THORLABS

Thorlabs, Inc. is an American privately held optical equipment company headquartered in Newton, New Jersey. The company was founded in 1989 by Alex Cable, who serves as its current president and CEO. As of 2018, Thorlabs has annual sales of approximately $500 million.

  • Headquarters: USA
  • Yearly Revenue (millions, USD): 550
  • Vendor Website: here

Connect to the PRO8000 in Python

PROTOCOLS > SCPI

from pymeasure.instruments import Instrument
from pymeasure.instruments.validators import strict_discrete_set
class ThorlabsPro8000(Instrument):
"""Represents Thorlabs Pro 8000 modular laser driver"""
SLOTS = range(1, 9)
LDC_POLARITIES = ['AG', 'CG']
STATUS = ['ON', 'OFF']
def __init__(self, adapter, name="Thorlabs Pro 8000", **kwargs):
super().__init__(
adapter,
name,
**kwargs
)
self.write(':SYST:ANSW VALUE')
slot = Instrument.control(":SLOT?", ":SLOT %d",
"Control slot selection. Allowed values are: {}""".format(SLOTS),
validator=strict_discrete_set,
values=SLOTS,
map_values=False)
LDCCurrent = Instrument.control(":ILD:SET?", ":ILD:SET %g",
"""Control laser current.""")
LDCCurrentLimit = Instrument.control(
":LIMC:SET?", ":LIMC:SET %g",
"""Set Software current Limit (value must be lower than hardware current limit)."""
)
LDCPolarity = Instrument.control(
":LIMC:SET?", ":LIMC:SET %s",
f"""Set laser diode polarity. Allowed values are: {LDC_POLARITIES}""",
validator=strict_discrete_set,
values=LDC_POLARITIES,
map_values=False
)
LDCStatus = Instrument.control(
":LASER?", ":LASER %s",
"""Set laser diode status. Allowed values are: {}""".format(
STATUS),
validator=strict_discrete_set,
values=STATUS,
map_values=False
)
TEDStatus = Instrument.control(":TEC?", ":TEC %s",
f"""Control TEC status. Allowed values are: {STATUS}""",
validator=strict_discrete_set,
values=STATUS,
map_values=False)
TEDSetTemperature = Instrument.control(":TEMP:SET?", ":TEMP:SET %g",
"""Control TEC temperature""")

The code defines a class ThorlabsPro8000 that represents the Thorlabs Pro 8000 modular laser driver. It inherits from the Instrument class provided by the pymeasure.instruments module.

The class has several class-level variables defined:

  • SLOTS is a range from 1 to 8, representing the available slots in the laser driver.
  • LDC_POLARITIES is a list of allowed laser diode polarities, which can be either ‘AG’ or ‘CG’.
  • STATUS is a list of allowed status values, which can be either ‘ON’ or ‘OFF’.

The __init__ method initializes the instrument by calling the Instrument class’s __init__ method and passing the provided adapter, name, and any additional keyword arguments.

The class also defines several instrument controls using the Instrument.control decorator. These controls allow you to interact with the instrument by sending commands and receiving responses.

  • slot is a control for selecting the slot. It uses the command :SLOT? to query the current slot and :SLOT %d to set the slot. The allowed values for the slot are specified as SLOTS, and the strict_discrete_set validator is used to ensure that only valid values are used.

  • LDCCurrent is a control for controlling the laser current. It uses the command :ILD:SET? to query the current laser current and :ILD:SET %g to set the laser current.

  • LDCCurrentLimit is a control for setting the software current limit. It uses the command :LIMC:SET? to query the current software current limit and :LIMC:SET %g to set the software current limit.

  • LDCPolarity is a control for setting the laser diode polarity. It uses the command :LIMC:SET? to query the current laser diode polarity and :LIMC:SET %s to set the laser diode polarity. The allowed values for the polarity are specified as LDC_POLARITIES, and the strict_discrete_set validator is used to ensure that only valid values are used.

  • LDCStatus is a control for setting the laser diode status. It uses the command :LASER? to query the current laser diode status and :LASER %s to set the laser diode status. The allowed values for the status are specified as STATUS, and the strict_discrete_set validator is used to ensure that only valid values are used.

  • TEDStatus is a control for controlling the TEC status. It uses the command :TEC? to query the current TEC status and :TEC %s to set the TEC status. The allowed values for the status are specified as STATUS, and the strict_discrete_set validator is used to ensure that only valid values are used.

  • TEDSetTemperature is a control for controlling the TEC temperature. It uses the command :TEMP:SET? to query the current TEC temperature and :TEMP:SET %g to set the TEC temperature.

These controls provide a convenient way to interact with the Thorlabs Pro 8000 modular laser driver using the PyMeasure library.