CC

MX10B 12.5 Gb/s Reference Transmitter

May 1, 20234 min read

Github Link

MX10B Reference Transmitter

This MX10B Reference Transmitter from Thorlabs can be controlled via serial communication.

Prerequisite

Please install the PySerial package by running the following command:

Copy A solid styled icon from Orion Icon Library.
pip install pyserial

Example

Below, we provide an example showing you how to communicate with your digital reference transmitter. The API issues serial commands to communicate with the instrument.

Copy A solid styled icon from Orion Icon Library.
import time
from mx10b import MX10B


def main():
    port = "COM3"  # Replace with the appropriate COM port for your MX10B
    mx10b = MB10B(port)

    # Set and get the ITU channel number. ITU Channel are defined using a 50 MHz grid.
    itu_channel_number = 32
    mx10b.set_ITU_channel_number(itu_channel_number)
    print(f"Set ITU channel number to {itu_channel_number}")

    current_itu_channel_number = mx10b.get_ITU_channel_number()
    print(f"Current ITU channel number: {current_itu_channel_number}")

    # Set laser power on
    mx10b.set_laser_power_on()
    print("Laser power on")

    # Wait for 5 seconds
    time.sleep(5)

    # Get measured optical output power in dBm
    optical_output_power_dBm = mx10b.get_measured_optical_output_power_dBm()
    print(f"Measured optical output power: {optical_output_power_dBm} dBm")

    # Set laser power off
    mx10b.set_laser_power_off()
    print("Laser power off")

if __name__ == "__main__":
    main()

This example code does the following:

  1. Imports the necessary modules and the MX10B class from the mx10b.py file provided.

  2. Defines a main function that:

    • Assumes you have your MX10B connected to a serial port.
    • Sets the ITU channel number. For more info read the manual.
    • Gets the current ITU channel number.
    • Sets the laser power on.
    • Waits for 5 seconds, and then gets the measured optical output power in dBm.
    • Sets the laser power off.

Make sure to replace the port variable with the appropriate COM port for your MX10B. Please visit the 'Tutorials' section to find appropriate COM port.