{ "cells": [ { "cell_type": "markdown", "id": "8cf2b107", "metadata": {}, "source": [ "# QDAC-II debugging\n" ] }, { "cell_type": "code", "execution_count": 1, "id": "221a9199", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Connected to: QDevil QDAC-II (serial:3, firmware:10-1.7) in 0.21s\n" ] } ], "source": [ "from time import sleep\n", "import pprint\n", "pp = pprint.PrettyPrinter()\n", "import numpy as np\n", "from IPython.display import Image, display\n", "from qcodes_contrib_drivers.drivers.QDevil import QDAC2\n", "qdac_addr = '192.168.8.17'\n", "qdac = QDAC2.QDac2('QDAC', visalib='@py', address=f'TCPIP::{qdac_addr}::5025::SOCKET')" ] }, { "cell_type": "code", "execution_count": 4, "id": "b936eb6b", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['outp:trig4:sour int1', 'outp:trig4:widt 1e-06']\n" ] } ], "source": [ "qdac.start_recording_scpi()\n", "arrangement = qdac.arrange(\n", " # QDAC channels 1, 2, 3, 4 connected to sample\n", " contacts={'plunger2': 2, 'plunger3': 3},\n", " # DMM external trigger connected to QDAC Output Trigger 4\n", " output_triggers={'dmm': 4})\n", "pp.pprint(qdac.get_recorded_scpi_commands())" ] }, { "cell_type": "code", "execution_count": 5, "id": "7c425791", "metadata": {}, "outputs": [], "source": [ "sweep = arrangement.virtual_sweep2d(\n", " inner_contact='plunger2',\n", " inner_voltages=np.linspace(-0.2, 0.6, 5),\n", " outer_contact='plunger3',\n", " outer_voltages=np.linspace(-0.7, 0.15, 4),\n", " inner_step_time_s=10e-6,\n", " inner_step_trigger='dmm')" ] }, { "cell_type": "code", "execution_count": 6, "id": "0319f497", "metadata": { "scrolled": false }, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "['sour2:dc:mark:sst 1',\n", " 'sour2:dc:trig:sour hold',\n", " 'sour2:volt:mode list',\n", " 'sour2:list:volt '\n", " '-0.2,0,0.2,0.4,0.6,-0.2,0,0.2,0.4,0.6,-0.2,0,0.2,0.4,0.6,-0.2,0,0.2,0.4,0.6',\n", " 'sour2:list:tmod auto',\n", " 'sour2:list:dwel 1e-05',\n", " 'sour2:list:dir up',\n", " 'sour2:list:coun 1',\n", " 'sour2:dc:trig:sour bus',\n", " 'sour2:dc:init:cont on',\n", " 'sour2:dc:init',\n", " 'sour2:dc:trig:sour int2',\n", " 'sour2:dc:init:cont on',\n", " 'sour2:dc:init',\n", " 'sour3:dc:trig:sour hold',\n", " 'sour3:volt:mode list',\n", " 'sour3:list:volt '\n", " '-0.7,-0.7,-0.7,-0.7,-0.7,-0.416667,-0.416667,-0.416667,-0.416667,-0.416667,-0.133333,-0.133333,-0.133333,-0.133333,-0.133333,0.15,0.15,0.15,0.15,0.15',\n", " 'sour3:list:tmod auto',\n", " 'sour3:list:dwel 1e-05',\n", " 'sour3:list:dir up',\n", " 'sour3:list:coun 1',\n", " 'sour3:dc:trig:sour bus',\n", " 'sour3:dc:init:cont on',\n", " 'sour3:dc:init',\n", " 'sour3:dc:trig:sour int2',\n", " 'sour3:dc:init:cont on',\n", " 'sour3:dc:init',\n", " 'tint 2']\n" ] } ], "source": [ "qdac.start_recording_scpi()\n", "sweep.start()\n", "pp.pprint(qdac.get_recorded_scpi_commands())" ] } ], "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.8.10" }, "nbsphinx": { "execute": "never" } }, "nbformat": 4, "nbformat_minor": 5 }