Qcodes example with Thorlabs PRM1Z8

[1]:
from qcodes_contrib_drivers.drivers.Thorlabs.APT import Thorlabs_APT
from qcodes_contrib_drivers.drivers.Thorlabs.PRM1Z8 import Thorlabs_PRM1Z8

Initialize the instrument

First, we need to initialize the APT server. Then we can initialize the PRM1Z8 polarizer wheel.

[2]:
apt = Thorlabs_APT()
[3]:
thorlabs_prm1z8 = Thorlabs_PRM1Z8("Thorlabs_PRM1Z8", 0, apt)
Connected to: Thorlabs TDC001 (serial:83857355, firmware:SW Version 2.0.8) in 1.21s

Read the current position

We read the current position of the polarizer wheel.

[4]:
print(thorlabs_prm1z8.position.label, thorlabs_prm1z8.position.get(), thorlabs_prm1z8.position.unit)
position 90.00012969970703 °

Change the position

We change the position of the polarizer wheel and repeat the position reading.

[5]:
thorlabs_prm1z8.position.set(200.0)
[6]:
print(thorlabs_prm1z8.position.label, thorlabs_prm1z8.position.get(), thorlabs_prm1z8.position.unit)
position 200.00189208984375 °

Close instrument

[7]:
thorlabs_prm1z8.close()
apt.apt_clean_up()