{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# QCoDeS Example with R&S HMC 8043 Power Supply" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "import qcodes as qc\n", "import qcodes.instrument_drivers.rohde_schwarz.HMC8043 as hmc8043" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Create the instrument (in this case a HMC8043 connected with ethernet to the 10.0.1.1 address)" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Connected to: Rohde&Schwarz HMC8043 (serial:026373828, firmware:HW42000000,SW01.303) in 0.44s\n" ] } ], "source": [ "ps = hmc8043.RohdeSchwarzHMC8043('ps-1', 'TCPIP0::10.0.1.1::inst0::INSTR')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "You can set voltage and/or current to any channel" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "ps.ch1.set_voltage(1)\n", "ps.ch1.set_current(0.2)\n", "ps.ch2.set_voltage(10)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Channel(s) should be turned on, as well as the master on/off" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "ps.ch1.state('ON')\n", "ps.state('ON')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Voltage, current and power can be measured" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "V1= 1.0\n", "I1= 0.0\n", "P1= 0.0\n" ] } ], "source": [ "print('V1=', ps.ch1.voltage())\n", "print('I1=', ps.ch1.current())\n", "print('P1=', ps.ch1.power())" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "And finally turned off" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "ps.ch1.state('OFF')\n", "ps.state('OFF')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.6.5" }, "nbsphinx": { "execute": "never" } }, "nbformat": 4, "nbformat_minor": 2 }