{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# QCoDeS Example with Minicircuits Switch Boxes Controlled via USB" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "from qcodes.instrument_drivers.Minicircuits.USB_SPDT import USB_SPDT" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "change the serial number to the serial number on the sticker on the back of the device, or leave it blank if there is only one switch box connected\n", "\n", "The driver_path should specify the url of the dll for controlling the instrument. You can find it here:\n", "\n", "https://ww2.minicircuits.com/softwaredownload/rfswitchcontroller.html\n", "\n", "Download .NET dll and save somewhere. Unblock it (right click properties) and specify the path." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Connected to: Mini-Circuits RC-4SPDT-A18 (serial:11703020018, firmware:20) in 0.19s\n" ] } ], "source": [ "dev = USB_SPDT('test',\n", " serial_number='11703020018',\n", " driver_path= r'C:\\Users\\a-dovoge\\Qcodes\\qcodes\\instrument_drivers\\Minicircuits\\mcl_RF_Switch_Controller64')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "setting value to line one or two" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [], "source": [ "dev.a(1)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "reading value" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "2" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "dev.b()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "setting all switches to line 2" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "dev.all(2)" ] }, { "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.6" }, "nbsphinx": { "execute": "never" } }, "nbformat": 4, "nbformat_minor": 2 }