Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions docs/examples/QDevil/QDAC2/Sweep.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
"source": [
"dc_sweep = qdac.ch03.dc_sweep(\n",
" repetitions=2,\n",
" stepped=True,\n",
" start_V=-1,\n",
" stop_V=1,\n",
" points=11,\n",
Expand Down Expand Up @@ -247,7 +248,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "qcodespip311",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -261,7 +262,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.0 | packaged by conda-forge | (main, Jan 16 2023, 14:12:30) [MSC v.1916 64 bit (AMD64)]"
"version": "3.10.12"
},
"nbsphinx": {
"execute": "never"
Expand Down
90 changes: 82 additions & 8 deletions docs/examples/QDevil/QSwitch/Debugging.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,81 @@
"# QSwitch debugging\n"
]
},
{
"cell_type": "markdown",
"id": "8428f8bd",
"metadata": {},
"source": [
"The QSwitch only supports a single Ethernet connection at a time. If you find yourself in a situation where you cannot connect to the instrument, then it might be because some process on your computer still has a connection to the instrument. To identify which process, do something like"
]
},
{
"cell_type": "markdown",
"id": "06be4a1a",
"metadata": {},
"source": [
"```\n",
"$ netstat -ntpn | grep '192.168.8.21'\n",
"tcp 0 0 192.168.8.66:43772 192.168.8.21:5025 ESTABLISHED 153450/python3\n",
"```"
]
},
{
"cell_type": "markdown",
"id": "8708065e",
"metadata": {},
"source": [
"Then you can forcefully kill the process like"
]
},
{
"cell_type": "markdown",
"id": "945dcaf4",
"metadata": {},
"source": [
"```\n",
"$ kill 153450\n",
"```"
]
},
{
"cell_type": "markdown",
"id": "b39d8c3c",
"metadata": {},
"source": [
"and then wait for the TCP connection to let go:"
]
},
{
"cell_type": "markdown",
"id": "8e9d32f9",
"metadata": {},
"source": [
"```\n",
"$ netstat -ntpn | grep '192.168.8.21'\n",
"tcp 0 0 192.168.8.66:43772 192.168.8.21:5025 TIME_WAIT -\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 4,
"id": "85f2a1e0",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Connected to: Quantum Machines QSwitch (serial:5, firmware:0.160) in 0.11s\n"
"Connected to: Quantum Machines QSwitch (serial:2, firmware:0.178) in 0.11s\n"
]
}
],
"source": [
"import pprint\n",
"pp = pprint.PrettyPrinter()\n",
"from qcodes_contrib_drivers.drivers.QDevil import QSwitch\n",
"qswitch_addr = '192.168.8.18'\n",
"qswitch_addr = '192.168.8.20'\n",
"qswitch = QSwitch.QSwitch('switch', visalib='@py', address=f'TCPIP::{qswitch_addr}::5025::SOCKET')"
]
},
Expand All @@ -40,7 +96,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 5,
"id": "d0c7fc28",
"metadata": {},
"outputs": [],
Expand All @@ -50,7 +106,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 6,
"id": "64f0cbe6",
"metadata": {},
"outputs": [
Expand All @@ -60,7 +116,7 @@
"'0,\"No error\"'"
]
},
"execution_count": 4,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -77,22 +133,40 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 7,
"id": "0d8a7693",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"['*rst', 'stat?', 'clos (@5!9)', 'open (@5!0)', 'clos (@5!5)', 'all?']\n"
"['*rst',\n",
" 'stat?',\n",
" 'clos (@5!9)',\n",
" '*opc?',\n",
" 'open (@5!0)',\n",
" '*opc?',\n",
" 'clos (@5!5)',\n",
" '*opc?',\n",
" 'all?']\n"
]
}
],
"source": [
"pp.pprint(qswitch.get_recorded_scpi_commands())"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "995394e6",
"metadata": {},
"outputs": [],
"source": [
"qswitch.close()"
]
},
{
"cell_type": "markdown",
"id": "588fabac",
Expand Down
Loading