Skip to content

Connecting to SC10 by Thorlabs in Python

Instrument Card

The easy-to-read LCD front panel provides access to the same commands as the included LabVIEW and LabWindows software packages. In addition to simply opening or closing the shutter, a repeating sequence of open and close events with exposure times as low as 10 ms can be set up and initiated either by a front panel button, a TTL pulse (+5 V), or a computer command via RS-232. Alternatively, the shutter can be synchronized to follow the rising and falling edges of an external voltage supplied over BNC.

SC10

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 SC10 in Python

PROTOCOLS > SCPI

To connect to a SC10 Shutter Controller using Instrumentkit, you can use the following Python script:

from instrumentkit import SC10
# Connect to the SC10 Shutter Controller
with SC10("COM1") as shutter_controller:
# Access the properties and methods of the SC10 Shutter Controller
print(shutter_controller.name)
print(shutter_controller.enable)
shutter_controller.enable = True
print(shutter_controller.repeat)
shutter_controller.repeat = 5
print(shutter_controller.mode)
shutter_controller.mode = SC10.Mode.auto
print(shutter_controller.trigger)
shutter_controller.trigger = 1
print(shutter_controller.out_trigger)
shutter_controller.out_trigger = 0
print(shutter_controller.open_time)
shutter_controller.open_time = 100
print(shutter_controller.shut_time)
shutter_controller.shut_time = 50
print(shutter_controller.baud_rate)
shutter_controller.baud_rate = 115200
print(shutter_controller.closed)
print(shutter_controller.interlock)
print(shutter_controller.default())
print(shutter_controller.save())
print(shutter_controller.save_mode())
print(shutter_controller.restore())

This script imports the SC10 class from the instrumentkit module and creates an instance of the SC10 class by providing the appropriate connection details (e.g., serial port name). The with statement ensures that the connection is properly closed after use.

You can then access the properties and methods of the SC10 instance to interact with the SC10 Shutter Controller. The script demonstrates accessing properties such as name, enable, repeat, mode, trigger, out_trigger, open_time, shut_time, baud_rate, closed, and interlock. It also shows how to call methods such as default(), save(), save_mode(), and restore().

Note: Replace "COM1" with the appropriate serial port name for your setup.