Skip to content

Connecting to TC-038D by HCP in Python

Instrument Card

Temperature controller, TC-038D, goes along with different ovens (OV-30D, OV-50D, WG OVENs) with extreme temperature tunability up to 200 deg

TC-038D

Device Specification: here

Manufacturer card: HCP

HCP

HC Photonics (HCP) provides crystal ovens and controllers to well manage the temperature of nonlinear crystals, especially PPLN and PPLT.

  • Headquarters: Taiwan
  • Yearly Revenue (millions, USD): 7
  • Vendor Website: here

Connect to the TC-038D in Python

PROTOCOLS > SCPI

from instrumentkit import hcp
# Connect to the TC-038D Temperature Controller
inst = hcp.TC038D.open_serial('COM10')
# Set the setpoint temperature to 45.3 degrees Celsius
inst.setpoint = 45.3
# Get the current temperature
temperature = inst.temperature
print(temperature)

Explanation:

  1. The script imports the hcp module from instrumentkit, which provides support for the TC038 AC crystal oven by HC Photonics.
  2. It then connects to the TC-038D Temperature Controller by calling the open_serial method of the TC038D class and passing the serial port name as an argument (e.g., 'COM10').
  3. The script sets the setpoint temperature of the temperature controller to 45.3 degrees Celsius by assigning the desired value to the setpoint property of the inst object.
  4. Finally, it retrieves the current temperature from the temperature controller by accessing the temperature property of the inst object and assigns it to the temperature variable.
  5. The script then prints the value of the temperature variable, which represents the current temperature in degrees Celsius.