{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# QCoDeS example with Attocube ANC300\n", "## The test controller is equiped with two ANM150 axis modules" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "from qcodes_contrib_drivers.drivers.Attocube.ANC300 import ANC300" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Check the USB-Port and change it accordingly" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "ANC = ANC300( name='ANC300', address='ASRL7' )" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "There are up to 7 axis available (axis1 .. axis7). At startup all axis are scanned. If there is no axis installed, the submodule with the specific name will not be created." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "axis1 = ANC.submodules['axis1']" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Read and change the current frequency setting for this axis" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "FREQ 210\n" ] } ], "source": [ "print( \"FREQ \", axis1.frequency() )" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "FREQ 200\n" ] } ], "source": [ "axis1.frequency(200)\n", "print( \"FREQ \", axis1.frequency() )" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "The movement runs asynchronosly, there is no function to get the current position" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [], "source": [ "axis1.mode( 'stp' )\n", "axis1.amplitude( 20 )\n", "axis1.move( 2000 )" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Wait until the axis stops (after the number of steps or after the 'stopMove()' command)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": {}, "outputs": [], "source": [ "axis1.waitMove()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Close the connection to the device" ] }, { "cell_type": "code", "execution_count": 8, "metadata": {}, "outputs": [], "source": [ "ANC.close()" ] } ], "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.7" }, "nbsphinx": { "execute": "never" } }, "nbformat": 4, "nbformat_minor": 2 }