{ "cells": [ { "cell_type": "code", "execution_count": 26, "id": "waiting-chance", "metadata": {}, "outputs": [], "source": [ "import time\n", "import numpy" ] }, { "cell_type": "code", "execution_count": 2, "id": "moving-alexandria", "metadata": {}, "outputs": [], "source": [ "d=DeviceProxy(\"LTS/test_device/1\")" ] }, { "cell_type": "code", "execution_count": 27, "id": "ranking-aluminum", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "Device is now in on state\n" ] } ], "source": [ "state = str(d.state())\n", "\n", "if state == \"OFF\":\n", " d.initialise()\n", " time.sleep(1)\n", "state = str(d.state())\n", "if state == \"STANDBY\":\n", " d.on()\n", "state = str(d.state())\n", "if state == \"ON\":\n", " print(\"Device is now in on state\")\n" ] }, { "cell_type": "code", "execution_count": 31, "id": "beneficial-evidence", "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "bool_scalar_R [False]\n", "bool_scalar_RW [False]\n", "int64_spectrum_R [0 0 0 0 0 0 0 0]\n", "str_spectrum_RW ('', '', '', '', '', '', '', '')\n", "double_image_R [[0. 0.]\n", " [0. 0.]\n", " [0. 0.]\n", " [0. 0.]\n", " [0. 0.]\n", " [0. 0.]\n", " [0. 0.]\n", " [0. 0.]]\n", "double_image_RW [[0. 0. 0. 0. 0. 0. 0. 0.]\n", " [0. 0. 0. 0. 0. 0. 0. 0.]]\n", "int32_scalar_R [0]\n", "uint16_spectrum_RW [0 0 0 0 0 0 0 0]\n", "float32_image_R [[0. 0. 0. 0. 0. 0. 0. 0.]\n", " [0. 0. 0. 0. 0. 0. 0. 0.]]\n", "uint8_image_RW [[0 0]\n", " [0 0]\n", " [0 0]\n", " [0 0]\n", " [0 0]\n", " [0 0]\n", " [0 0]\n", " [0 0]]\n", "tr_tod_R [0]\n", "tr_uptime_R [0]\n", "State <function __get_command_func.<locals>.f at 0x7f1c88a29e18>\n", "Status <function __get_command_func.<locals>.f at 0x7f1c88a5abf8>\n" ] } ], "source": [ "attr_names = d.get_attribute_list()\n", "\n", "for i in attr_names:\n", " exec(\"value = print(i, d.{})\".format(i))\n" ] }, { "cell_type": "code", "execution_count": 39, "id": "sporting-current", "metadata": {}, "outputs": [ { "data": { "text/plain": [ "3.0" ] }, "execution_count": 39, "metadata": {}, "output_type": "execute_result" } ], "source": [ "d.RCU_mask_RW = [False, False, False, False, False, False, False, False, False, False, False, False,\n", " False, False, False, False, False, False, False, False, False, False, False, False,\n", " False, False, False, False, False, False, False, False,]\n", "time.sleep(1)\n", "print(d.RCU_mask_RW)\n", "\n", "monitor_rate = d.RCU_monitor_rate_RW\n", "print(\"current monitoring rate: {}, setting to {}\".format(monitor_rate, monitor_rate + 1))\n", "monitor_rate = monitor_rate + 1\n", "\n", "time.sleep(1)\n" ] }, { "cell_type": "code", "execution_count": null, "id": "sharing-mechanics", "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "id": "ruled-tracy", "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "StationControl", "language": "python", "name": "stationcontrol" }, "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.7.3" } }, "nbformat": 4, "nbformat_minor": 5 }