{ "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 import MiniCircuitsUsbSPDT" ] }, { "attachments": {}, "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://www.minicircuits.com/softwaredownload/rfswitchcontroller.html\n", "\n", "Download .NET dll and save somewhere. Unblock it (right click properties) and specify the path.\n", "\n", "The downloaded ZIP file contains two DLLs. We recommend using mcl_RF_Switch_Controller_NET45.dll\n", "which supports the most recent .net versions. " ] }, { "cell_type": "code", "execution_count": null, "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 = MiniCircuitsUsbSPDT(\n", " \"test\",\n", " serial_number=\"11703020018\",\n", " driver_path=r\"C:\\Users\\a-dovoge\\Qcodes\\qcodes\\instrument_drivers\\Minicircuits\\mcl_RF_Switch_Controller_NET45\",\n", ")" ] }, { "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": "qcodespip310", "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 | packaged by conda-forge | (main, Nov 24 2022, 14:07:00) [MSC v.1916 64 bit (AMD64)]" }, "nbsphinx": { "execute": "never" }, "vscode": { "interpreter": { "hash": "2643ef1ecb4e72f15331668d402315679b29a004e65b7ec963f6cfe589581b49" } } }, "nbformat": 4, "nbformat_minor": 2 }