{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# QCoDeS example with Aim TTi PL601-P" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This is the example notebook that presents the basic features of the QCoDeS driver for the Aim TTi PL601-P programmable power supply. Aim TTi currently has six programmable power supply models. Among these, PL068-P, PL155-P, PL303-P and PL601-P have single output channel. The models PL303QMD-P and PL303QMT-P have dual and triple output channels, respectively. All programmable Aim TTi power supplies have the same remote control interface, therefore, the property calls in this notebook applies to all. Their names and the corresponding number of channels are implemented in the driver. Upon connection, if the instrument model is one of the listed above, driver shall automatically determine the output channel count. " ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Basic Operation\n", "\n", "Let us first import QCoDeS and the driver for the power supply:" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import qcodes as qc\n", "from qcodes.instrument_drivers.AimTTi import AimTTiPL601" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now, we create a station to hold our instrument:" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "station = qc.Station()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We finalize the initialization of the instrument by instantiation and then adding it to the station:" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Connected to: THURLBY THANDAR PL601-P (serial:514710, firmware:3.05-4.06) in 0.16s\n" ] }, { "data": { "text/plain": [ "'aimtti'" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti = AimTTiPL601(\"aimtti\", \"ASRL3::INSTR\")\n", "station.add_component(tti)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Let us, first, examine the properties of our instrument via its ``snapshot``:" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "aimtti:\n", "\tparameter value\n", "--------------------------------------------------------------------------------\n", "IDN :\t{'vendor': 'THURLBY THANDAR', 'model': 'PL601-P', 'serial': '514710...\n", "timeout :\t5 (s)\n", "aimtti_ch1:\n", "\tparameter value\n", "--------------------------------------------------------------------------------\n", "curr :\t0.135 (A)\n", "curr_range :\t2 (A)\n", "curr_step_size :\t0.001 (A)\n", "output :\tFalse \n", "volt :\t5 (V)\n", "volt_step_size :\t0.01 (V)\n" ] } ], "source": [ "tti.print_readable_snapshot()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The model PL601-P has a single channel that is named in the instrument as ``ch1``. As depicted in the snapshot, the default values of voltage and current outputs are ``5V`` and ``0.135A``, respectively. We can accsess and set these values to the desired ones by calling the corresponding parameter of the output channel:" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [], "source": [ "tti.ch1.volt(3)" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "3.0" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.volt()" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'V'" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.volt.unit" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'Voltage'" ] }, "execution_count": 8, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.volt.label" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Similarly, for the current we have:" ] }, { "cell_type": "code", "execution_count": 9, "metadata": {}, "outputs": [], "source": [ "tti.ch1.curr(0.1)" ] }, { "cell_type": "code", "execution_count": 10, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.1" ] }, "execution_count": 10, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.curr()" ] }, { "cell_type": "code", "execution_count": 11, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'A'" ] }, "execution_count": 11, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.curr.unit" ] }, { "cell_type": "code", "execution_count": 12, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "'Current'" ] }, "execution_count": 12, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.curr.label" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "the PL601-P has two current ranges for the output called ``Low (1mA-500mA)`` and ``High (1mA-1500mA)`` range, associated with the integers ``1`` and ``2``, respectively. " ] }, { "cell_type": "code", "execution_count": 13, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2" ] }, "execution_count": 13, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.curr_range()" ] }, { "cell_type": "code", "execution_count": 14, "metadata": {}, "outputs": [], "source": [ "tti.ch1.curr_range(1)" ] }, { "cell_type": "code", "execution_count": 15, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "1" ] }, "execution_count": 15, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.curr_range()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Here, we note that the output must be switched off before changing the current range. This is automatically handled by the QCoDeS driver, and your present output state is preserved." ] }, { "cell_type": "code", "execution_count": 16, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "False" ] }, "execution_count": 16, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.output()" ] }, { "cell_type": "code", "execution_count": 17, "metadata": {}, "outputs": [], "source": [ "tti.ch1.output(True)" ] }, { "cell_type": "code", "execution_count": 18, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "True" ] }, "execution_count": 18, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.output()" ] }, { "cell_type": "code", "execution_count": 19, "metadata": {}, "outputs": [], "source": [ "tti.ch1.curr_range(2)" ] }, { "cell_type": "code", "execution_count": 20, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2" ] }, "execution_count": 20, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.curr_range()" ] }, { "cell_type": "code", "execution_count": 21, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "True" ] }, "execution_count": 21, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.output()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "If you have a specifically designed set up for a particular measurement and would like to reuse it, it can be saved to the internal set-up store of the power supply. There are ten available slots specified by the intergers ``0-9``. To examine this functionality, let us get a snapshot of the current set-up:" ] }, { "cell_type": "code", "execution_count": 22, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "aimtti:\n", "\tparameter value\n", "--------------------------------------------------------------------------------\n", "IDN :\t{'vendor': 'THURLBY THANDAR', 'model': 'PL601-P', 'serial': '514710...\n", "timeout :\t5 (s)\n", "aimtti_ch1:\n", "\tparameter value\n", "--------------------------------------------------------------------------------\n", "curr :\t0.1 (A)\n", "curr_range :\t2 (A)\n", "curr_step_size :\t0.01 (A)\n", "output :\tFalse \n", "volt :\t3 (V)\n", "volt_step_size :\t0.01 (V)\n" ] } ], "source": [ "tti.print_readable_snapshot()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We now save this configuretion to the slot number ``0`` via" ] }, { "cell_type": "code", "execution_count": 23, "metadata": {}, "outputs": [], "source": [ "tti.ch1.save_setup(0)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now, let us change voltage and current values along with the current range:" ] }, { "cell_type": "code", "execution_count": 24, "metadata": {}, "outputs": [], "source": [ "tti.ch1.volt(5)" ] }, { "cell_type": "code", "execution_count": 25, "metadata": {}, "outputs": [], "source": [ "tti.ch1.curr(0.2)" ] }, { "cell_type": "code", "execution_count": 26, "metadata": {}, "outputs": [], "source": [ "tti.ch1.curr_range(1)" ] }, { "cell_type": "code", "execution_count": 27, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "aimtti:\n", "\tparameter value\n", "--------------------------------------------------------------------------------\n", "IDN :\t{'vendor': 'THURLBY THANDAR', 'model': 'PL601-P', 'serial': '514710...\n", "timeout :\t5 (s)\n", "aimtti_ch1:\n", "\tparameter value\n", "--------------------------------------------------------------------------------\n", "curr :\t0.2 (A)\n", "curr_range :\t1 (A)\n", "curr_step_size :\t0.01 (A)\n", "output :\tFalse \n", "volt :\t5 (V)\n", "volt_step_size :\t0.01 (V)\n" ] } ], "source": [ "tti.print_readable_snapshot()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Indeed, our changes successfully took place. Now, to have our old set up back, all we need to do is to load slote ``0``:" ] }, { "cell_type": "code", "execution_count": 28, "metadata": {}, "outputs": [], "source": [ "tti.ch1.load_setup(0)" ] }, { "cell_type": "code", "execution_count": 29, "metadata": { "scrolled": true }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "aimtti:\n", "\tparameter value\n", "--------------------------------------------------------------------------------\n", "IDN :\t{'vendor': 'THURLBY THANDAR', 'model': 'PL601-P', 'serial': '514710...\n", "timeout :\t5 (s)\n", "aimtti_ch1:\n", "\tparameter value\n", "--------------------------------------------------------------------------------\n", "curr :\t0.1 (A)\n", "curr_range :\t2 (A)\n", "curr_step_size :\t0.01 (A)\n", "output :\tFalse \n", "volt :\t3 (V)\n", "volt_step_size :\t0.01 (V)\n" ] } ], "source": [ "tti.print_readable_snapshot()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "In some cases, a constant incremental increase (decrease) in voltage and current output may be needed. In particular, we may want to change the latter output values dynamically during a repeated process. This can be done by using the pre-defined voltage and current step sizes (in Volts and Ampere, respectively):" ] }, { "cell_type": "code", "execution_count": 30, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.01" ] }, "execution_count": 30, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.volt_step_size()" ] }, { "cell_type": "code", "execution_count": 31, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.01" ] }, "execution_count": 31, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.curr_step_size()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The values of the step sizes can be changed as usual:" ] }, { "cell_type": "code", "execution_count": 32, "metadata": {}, "outputs": [], "source": [ "tti.ch1.volt_step_size(0.1)" ] }, { "cell_type": "code", "execution_count": 33, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.1" ] }, "execution_count": 33, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.volt_step_size()" ] }, { "cell_type": "code", "execution_count": 34, "metadata": {}, "outputs": [], "source": [ "tti.ch1.curr_step_size(0.01)" ] }, { "cell_type": "code", "execution_count": 35, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.01" ] }, "execution_count": 35, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.curr_step_size()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "We can, now, make incremental changes to the current and voltage outputs accordingly:" ] }, { "cell_type": "code", "execution_count": 36, "metadata": {}, "outputs": [], "source": [ "tti.ch1.increment_volt_by_step_size()" ] }, { "cell_type": "code", "execution_count": 37, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "3.1" ] }, "execution_count": 37, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.volt()" ] }, { "cell_type": "code", "execution_count": 38, "metadata": {}, "outputs": [], "source": [ "tti.ch1.decrement_volt_by_step_size()" ] }, { "cell_type": "code", "execution_count": 39, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "3.0" ] }, "execution_count": 39, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.volt()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Similarly, for the current output, we have:" ] }, { "cell_type": "code", "execution_count": 40, "metadata": {}, "outputs": [], "source": [ "tti.ch1.increment_curr_by_step_size()" ] }, { "cell_type": "code", "execution_count": 41, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.11" ] }, "execution_count": 41, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.curr()" ] }, { "cell_type": "code", "execution_count": 42, "metadata": {}, "outputs": [], "source": [ "tti.ch1.decrement_curr_by_step_size()" ] }, { "cell_type": "code", "execution_count": 43, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "0.1" ] }, "execution_count": 43, "metadata": {}, "output_type": "execute_result" } ], "source": [ "tti.ch1.curr()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Note that, the step sizes reset to the default values after a power cycle. Therefore, if you wish to have definite step sizes for a specific purpose, we suggest you to save your set up (see above) before turning off the instrument. \n", "\n", "Finally, the current meter averaging can be turned on and off remotely. As there is no remote query for the status, user should observe the \"Meter Average\" signal light. To turn it on, we simply write:" ] }, { "cell_type": "code", "execution_count": 44, "metadata": {}, "outputs": [], "source": [ "tti.ch1.set_damping(1)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Upon success, the signal light should be on, as well. To turn the average off, we write:" ] }, { "cell_type": "code", "execution_count": 45, "metadata": {}, "outputs": [], "source": [ "tti.ch1.set_damping(0)" ] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.8" }, "nbsphinx": { "execute": "never" } }, "nbformat": 4, "nbformat_minor": 4 }