Skip to content
Snippets Groups Projects
Commit f6e1e826 authored by Taya Snijder's avatar Taya Snijder
Browse files

a

parent e7237b69
No related branches found
No related tags found
1 merge request!164Resolve L2SS-334 "2021 10 21 replace streams with logger"
...@@ -265,3 +265,4 @@ class AsyncCommClient(object): ...@@ -265,3 +265,4 @@ class AsyncCommClient(object):
future = asyncio.run_coroutine_threadsafe(self.stop(), self.event_loop) future = asyncio.run_coroutine_threadsafe(self.stop(), self.event_loop)
return future.result() return future.result()
%% Cell type:code id:waiting-chance tags: %% Cell type:code id:waiting-chance tags:
``` python ``` python
import time import time
import numpy import numpy
``` ```
%% Cell type:code id:moving-alexandria tags: %% Cell type:code id:moving-alexandria tags:
``` python ``` python
d=DeviceProxy("LTS/UNB2/1") d=DeviceProxy("LTS/UNB2/1")
``` ```
%% Cell type:code id:ranking-aluminum tags: %% Cell type:code id:ranking-aluminum tags:
``` python ``` python
state = str(d.state()) state = str(d.state())
if state == "OFF": if state == "OFF":
d.initialise() d.initialise()
time.sleep(1) time.sleep(1)
state = str(d.state()) state = str(d.state())
if state == "STANDBY": if state == "STANDBY":
d.on() d.on()
state = str(d.state()) state = str(d.state())
if state == "ON": if state == "ON":
print("Device is now in on state") print("Device is now in on state")
else: else:
print(f"Device is now in {state} state") print(f"Device is now in {state} state")
``` ```
%% Output %% Output
Device is now in on state Device is now in on state
%% Cell type:code id:beneficial-evidence tags: %% Cell type:code id:beneficial-evidence tags:
``` python ``` python
attr_names = d.get_attribute_list() attr_names = d.get_attribute_list()
print(attr_names) print(attr_names)
print("\r\nAttributes:") print("\r\nAttributes:")
for i in attr_names: for i in attr_names:
print(">>>\t",i) print(">>>\t",i)
#exec("value = print(i, d.{})".format(i)) #exec("value = print(i, d.{})".format(i))
print("Missing Attributes: \n", d.opcua_missing_attributes_R) print("Missing Attributes: \n", d.opcua_missing_attributes_R)
``` ```
%% Output %% Output
['version_R', 'opcua_missing_attributes_R', 'UNB2TR_translator_busy_R', 'UNB2_DC_DC_48V_12V_IOUT_R', 'UNB2_DC_DC_48V_12V_TEMP_R', 'UNB2_DC_DC_48V_12V_VIN_R', 'UNB2_DC_DC_48V_12V_VOUT_R', 'UNB2_EEPROM_Serial_Number_R', 'UNB2_EEPROM_Unique_ID_R', 'UNB2_FPGA_DDR4_SLOT_TEMP_R', 'UNB2_FPGA_POL_CORE_IOUT_R', 'UNB2_FPGA_POL_CORE_TEMP_R', 'UNB2_FPGA_POL_CORE_VOUT_R', 'UNB2_FPGA_POL_ERAM_IOUT_R', 'UNB2_FPGA_POL_ERAM_TEMP_R', 'UNB2_FPGA_POL_ERAM_VOUT_R', 'UNB2_FPGA_POL_HGXB_IOUT_R', 'UNB2_FPGA_POL_HGXB_TEMP_R', 'UNB2_FPGA_POL_HGXB_VOUT_R', 'UNB2_FPGA_POL_PGM_IOUT_R', 'UNB2_FPGA_POL_PGM_TEMP_R', 'UNB2_FPGA_POL_PGM_VOUT_R', 'UNB2_FPGA_POL_RXGXB_IOUT_R', 'UNB2_FPGA_POL_RXGXB_TEMP_R', 'UNB2_FPGA_POL_RXGXB_VOUT_R', 'UNB2_FPGA_POL_TXGXB_IOUT_R', 'UNB2_FPGA_POL_TXGXB_TEMP_R', 'UNB2_FPGA_POL_TXGXB_VOUT_R', 'UNB2_FPGA_QSFP_CAGE_LOS_R', 'UNB2_FPGA_QSFP_CAGE_TEMP_R', 'UNB2_Front_Panel_LED_R', 'UNB2_Front_Panel_LED_RW', 'UNB2_I2C_bus_DDR4_error_R', 'UNB2_I2C_bus_error_R', 'UNB2_I2C_bus_FPGA_PS_error_R', 'UNB2_I2C_bus_PS_error_R', 'UNB2_I2C_bus_QSFP_error_R', 'UNB2_mask_RW', 'UNB2_POL_CLOCK_IOUT_R', 'UNB2_POL_CLOCK_TEMP_R', 'UNB2_POL_CLOCK_VOUT_R', 'UNB2_POL_QSFP_N01_IOUT_R', 'UNB2_POL_QSFP_N01_TEMP_R', 'UNB2_POL_QSFP_N01_VOUT_R', 'UNB2_POL_QSFP_N23_IOUT_R', 'UNB2_POL_QSFP_N23_TEMP_R', 'UNB2_POL_QSFP_N23_VOUT_R', 'UNB2_POL_SWITCH_1V2_IOUT_R', 'UNB2_POL_SWITCH_1V2_TEMP_R', 'UNB2_POL_SWITCH_1V2_VOUT_R', 'UNB2_POL_SWITCH_PHY_IOUT_R', 'UNB2_POL_SWITCH_PHY_TEMP_R', 'UNB2_POL_SWITCH_PHY_VOUT_R', 'UNB2_PWR_off_R', 'UNB2_PWR_off_RW', 'State', 'Status'] ['version_R', 'opcua_missing_attributes_R', 'UNB2TR_translator_busy_R', 'UNB2_DC_DC_48V_12V_IOUT_R', 'UNB2_DC_DC_48V_12V_TEMP_R', 'UNB2_DC_DC_48V_12V_VIN_R', 'UNB2_DC_DC_48V_12V_VOUT_R', 'UNB2_EEPROM_Serial_Number_R', 'UNB2_EEPROM_Unique_ID_R', 'UNB2_FPGA_DDR4_SLOT_TEMP_R', 'UNB2_FPGA_POL_CORE_IOUT_R', 'UNB2_FPGA_POL_CORE_TEMP_R', 'UNB2_FPGA_POL_CORE_VOUT_R', 'UNB2_FPGA_POL_ERAM_IOUT_R', 'UNB2_FPGA_POL_ERAM_TEMP_R', 'UNB2_FPGA_POL_ERAM_VOUT_R', 'UNB2_FPGA_POL_HGXB_IOUT_R', 'UNB2_FPGA_POL_HGXB_TEMP_R', 'UNB2_FPGA_POL_HGXB_VOUT_R', 'UNB2_FPGA_POL_PGM_IOUT_R', 'UNB2_FPGA_POL_PGM_TEMP_R', 'UNB2_FPGA_POL_PGM_VOUT_R', 'UNB2_FPGA_POL_RXGXB_IOUT_R', 'UNB2_FPGA_POL_RXGXB_TEMP_R', 'UNB2_FPGA_POL_RXGXB_VOUT_R', 'UNB2_FPGA_POL_TXGXB_IOUT_R', 'UNB2_FPGA_POL_TXGXB_TEMP_R', 'UNB2_FPGA_POL_TXGXB_VOUT_R', 'UNB2_FPGA_QSFP_CAGE_LOS_R', 'UNB2_FPGA_QSFP_CAGE_TEMP_R', 'UNB2_Front_Panel_LED_R', 'UNB2_Front_Panel_LED_RW', 'UNB2_I2C_bus_DDR4_error_R', 'UNB2_I2C_bus_error_R', 'UNB2_I2C_bus_FPGA_PS_error_R', 'UNB2_I2C_bus_PS_error_R', 'UNB2_I2C_bus_QSFP_error_R', 'UNB2_mask_RW', 'UNB2_POL_CLOCK_IOUT_R', 'UNB2_POL_CLOCK_TEMP_R', 'UNB2_POL_CLOCK_VOUT_R', 'UNB2_POL_QSFP_N01_IOUT_R', 'UNB2_POL_QSFP_N01_TEMP_R', 'UNB2_POL_QSFP_N01_VOUT_R', 'UNB2_POL_QSFP_N23_IOUT_R', 'UNB2_POL_QSFP_N23_TEMP_R', 'UNB2_POL_QSFP_N23_VOUT_R', 'UNB2_POL_SWITCH_1V2_IOUT_R', 'UNB2_POL_SWITCH_1V2_TEMP_R', 'UNB2_POL_SWITCH_1V2_VOUT_R', 'UNB2_POL_SWITCH_PHY_IOUT_R', 'UNB2_POL_SWITCH_PHY_TEMP_R', 'UNB2_POL_SWITCH_PHY_VOUT_R', 'UNB2_PWR_off_R', 'UNB2_PWR_off_RW', 'State', 'Status']
Attributes: Attributes:
>>> version_R >>> version_R
>>> opcua_missing_attributes_R >>> opcua_missing_attributes_R
>>> UNB2TR_translator_busy_R >>> UNB2TR_translator_busy_R
>>> UNB2_DC_DC_48V_12V_IOUT_R >>> UNB2_DC_DC_48V_12V_IOUT_R
>>> UNB2_DC_DC_48V_12V_TEMP_R >>> UNB2_DC_DC_48V_12V_TEMP_R
>>> UNB2_DC_DC_48V_12V_VIN_R >>> UNB2_DC_DC_48V_12V_VIN_R
>>> UNB2_DC_DC_48V_12V_VOUT_R >>> UNB2_DC_DC_48V_12V_VOUT_R
>>> UNB2_EEPROM_Serial_Number_R >>> UNB2_EEPROM_Serial_Number_R
>>> UNB2_EEPROM_Unique_ID_R >>> UNB2_EEPROM_Unique_ID_R
>>> UNB2_FPGA_DDR4_SLOT_TEMP_R >>> UNB2_FPGA_DDR4_SLOT_TEMP_R
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2_FPGA_QSFP_CAGE_LOS_R
>>> UNB2_FPGA_QSFP_CAGE_TEMP_R >>> UNB2_FPGA_QSFP_CAGE_TEMP_R
>>> UNB2_Front_Panel_LED_R >>> UNB2_Front_Panel_LED_R
>>> UNB2_Front_Panel_LED_RW >>> UNB2_Front_Panel_LED_RW
>>> UNB2_I2C_bus_DDR4_error_R >>> UNB2_I2C_bus_DDR4_error_R
>>> UNB2_I2C_bus_error_R >>> UNB2_I2C_bus_error_R
>>> UNB2_I2C_bus_FPGA_PS_error_R >>> UNB2_I2C_bus_FPGA_PS_error_R
>>> UNB2_I2C_bus_PS_error_R >>> UNB2_I2C_bus_PS_error_R
>>> UNB2_I2C_bus_QSFP_error_R >>> UNB2_I2C_bus_QSFP_error_R
>>> UNB2_mask_RW >>> UNB2_mask_RW
>>> UNB2_POL_CLOCK_IOUT_R >>> UNB2_POL_CLOCK_IOUT_R
>>> UNB2_POL_CLOCK_TEMP_R >>> UNB2_POL_CLOCK_TEMP_R
>>> UNB2_POL_CLOCK_VOUT_R >>> UNB2_POL_CLOCK_VOUT_R
>>> UNB2_POL_QSFP_N01_IOUT_R >>> UNB2_POL_QSFP_N01_IOUT_R
>>> UNB2_POL_QSFP_N01_TEMP_R >>> UNB2_POL_QSFP_N01_TEMP_R
>>> UNB2_POL_QSFP_N01_VOUT_R >>> UNB2_POL_QSFP_N01_VOUT_R
>>> UNB2_POL_QSFP_N23_IOUT_R >>> UNB2_POL_QSFP_N23_IOUT_R
>>> UNB2_POL_QSFP_N23_TEMP_R >>> UNB2_POL_QSFP_N23_TEMP_R
>>> UNB2_POL_QSFP_N23_VOUT_R >>> UNB2_POL_QSFP_N23_VOUT_R
>>> UNB2_POL_SWITCH_1V2_IOUT_R >>> UNB2_POL_SWITCH_1V2_IOUT_R
>>> UNB2_POL_SWITCH_1V2_TEMP_R >>> UNB2_POL_SWITCH_1V2_TEMP_R
>>> UNB2_POL_SWITCH_1V2_VOUT_R >>> UNB2_POL_SWITCH_1V2_VOUT_R
>>> UNB2_POL_SWITCH_PHY_IOUT_R >>> UNB2_POL_SWITCH_PHY_IOUT_R
>>> UNB2_POL_SWITCH_PHY_TEMP_R >>> UNB2_POL_SWITCH_PHY_TEMP_R
>>> UNB2_POL_SWITCH_PHY_VOUT_R >>> UNB2_POL_SWITCH_PHY_VOUT_R
>>> UNB2_PWR_off_R >>> UNB2_PWR_off_R
>>> UNB2_PWR_off_RW >>> UNB2_PWR_off_RW
>>> State >>> State
>>> Status >>> Status
Missing Attributes: Missing Attributes:
('2:UNB2TR_translator_busy_R', '2:UNB2_EEPROM_Serial_Number_R', '2:UNB2_I2C_bus_DDR4_error_R', '2:UNB2_I2C_bus_error_R', '2:UNB2_I2C_bus_FPGA_PS_error_R', '2:UNB2_I2C_bus_PS_error_R', '2:UNB2_I2C_bus_QSFP_error_R', '2:UNB2_PWR_off_R', '2:UNB2_PWR_off_RW') ('2:UNB2TR_translator_busy_R', '2:UNB2_EEPROM_Serial_Number_R', '2:UNB2_I2C_bus_DDR4_error_R', '2:UNB2_I2C_bus_error_R', '2:UNB2_I2C_bus_FPGA_PS_error_R', '2:UNB2_I2C_bus_PS_error_R', '2:UNB2_I2C_bus_QSFP_error_R', '2:UNB2_PWR_off_R', '2:UNB2_PWR_off_RW')
%% Cell type:code id:sporting-current tags: %% Cell type:code id:252e49de tags:
``` python ``` python
d.RCU_mask_RW = [False, False, False, False, False, False, False, False, False, False, False, False, d.UNB2_POL_QSFP_N23_TEMP_R
False, False, False, False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False,]
time.sleep(1)
print(d.RCU_mask_RW)
monitor_rate = d.RCU_monitor_rate_RW
print("current monitoring rate: {}, setting to {}".format(monitor_rate, monitor_rate + 1))
monitor_rate = monitor_rate + 1
time.sleep(1)
``` ```
%% Output %% Output
[False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False, False] array([0., 0.])
---------------------------------------------------------------------------
ConnectionFailed Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py in __DeviceProxy__getattr(self, name)
326 try:
--> 327 self.__refresh_cmd_cache()
328 except Exception as e:
/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py in __DeviceProxy__refresh_cmd_cache(self)
241 def __DeviceProxy__refresh_cmd_cache(self):
--> 242 cmd_list = self.command_list_query()
243 cmd_cache = {}
ConnectionFailed: DevFailed[
DevError[
desc = Device lts/sst/1 is not exported (hint: try starting the device server)
origin = DeviceProxy::get_corba_name()
reason = API_DeviceNotExported
severity = ERR]
]
The above exception was the direct cause of the following exception:
AttributeError Traceback (most recent call last)
/tmp/ipykernel_22/1020840340.py in <module>
5 print(d.RCU_mask_RW)
6
----> 7 monitor_rate = d.RCU_monitor_rate_RW
8 print("current monitoring rate: {}, setting to {}".format(monitor_rate, monitor_rate + 1))
9 monitor_rate = monitor_rate + 1
/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py in __DeviceProxy__getattr(self, name)
353 return self.read_pipe(name)
354
--> 355 six.raise_from(AttributeError(name), cause)
356
357
/usr/local/lib/python3.7/dist-packages/six.py in raise_from(value, from_value)
AttributeError: RCU_monitor_rate_RW
%% Cell type:code id:sharing-mechanics tags:
``` python
```
%% Cell type:code id:ruled-tracy tags: %% Cell type:code id:d348a3c6 tags:
``` python ``` python
``` ```
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment