Skip to content
Snippets Groups Projects
Commit a03e2e0f authored by Gijs Schoonderbeek's avatar Gijs Schoonderbeek
Browse files

Added Thermal test script version 0.1

parent 75ebf51c
No related branches found
No related tags found
No related merge requests found
%% Cell type:markdown id:e73610a1 tags:
# DTS-Lab-Light Thermal Testing
Measurements done by: Jeroen and Gijs<br>
## Goal of the measurement
Verify that the DTS can run at summer temperatures
## Measurement setup
- 1x UniBoard2c<br>
- 1x APSCT<br>
- 1x APSPU<br>
- 4x RCU2L_QM<br>
- 28x RCU2_Heater<br>
%% Cell type:code id:c2ace952 tags:
``` python
import time
import numpy as np
import pylab as pl
```
%% Cell type:code id:875c84fc tags:
``` python
ambient_temperature = input("Ambient temperature in °C:")
```
%% Output
Ambient temperature in °C:22.5
%% Cell type:code id:dd54c19e tags:
``` python
#
# Open de OPC-UA devices
#
rcu=DeviceProxy("LTS/RECV/1")
apsct=DeviceProxy("LTS/APSCT/1")
apspu=DeviceProxy("LTS/APSPU/1")
unb2c=DeviceProxy("LTS/UNB2/1")
aps_dev=[]
aps_dev.append(DeviceProxy("LTS/UNB2/1"))
#
# Check RCU interface
#
state = str(rcu.state())
if state == "OFF":
rcu.initialise()
time.sleep(1)
state = str(rcu.state())
if state == "STANDBY":
rcu.on()
state = str(rcu.state())
if state == "ON":
print("RCU device is now in on state")
else:
print("warning, expected RCU device to be in on state, is: ", state)
#
# Check APSCT interface
#
state = str(apsct.state())
if state == "OFF":
apsct.initialise()
time.sleep(1)
state = str(apsct.state())
if state == "STANDBY":
rcu.on()
state = str(apsct.state())
if state == "ON":
print("APSCT device is now in on state")
else:
print("warning, expected APSCT device to be in on state, is: ", state)
#
# Check APSPU interface
#
state = str(apspu.state())
if state == "OFF":
apspu.initialise()
time.sleep(1)
state = str(apspu.state())
if state == "STANDBY":
rcu.on()
state = str(apspu.state())
if state == "ON":
print("APSPU device is now in on state")
else:
print("warning, expected APSPU device to be in on state, is: ", state)
#
# Check is UNB2_HW device is running or else start it up
#
state = str(unb2c.state())
if state == "OFF" or state == "FAULT":
unb2c.initialise()
time.sleep(1)
state = str(unb2c.state())
if state == "STANDBY":
unb2c.on()
state = str(unb2c.state())
if state == "ON":
print("UNB2_HW_MON is now in on state")
else:
print("warning, expected device to be in on state, is: ", state)
```
%% Output
warning, expected RCU device to be in on state, is: FAULT
warning, expected APSCT device to be in on state, is: FAULT
warning, expected APSPU device to be in on state, is: FAULT
---------------------------------------------------------------------------
CommunicationFailed Traceback (most recent call last)
/tmp/ipykernel_117/3795550939.py in <module>
58 state = str(unb2c.state())
59 if state == "OFF" or state == "FAULT":
---> 60 unb2c.initialise()
61 time.sleep(1)
62 state = str(unb2c.state())
/usr/local/lib/python3.7/dist-packages/tango/device_proxy.py in f(*args, **kwds)
273
274 def f(*args, **kwds):
--> 275 return dp.command_inout(name, *args, **kwds)
276
277 f.__doc__ = doc
/usr/local/lib/python3.7/dist-packages/tango/green.py in greener(obj, *args, **kwargs)
193 green_mode = access('green_mode', None)
194 executor = get_object_executor(obj, green_mode)
--> 195 return executor.run(fn, args, kwargs, wait=wait, timeout=timeout)
196
197 return greener
/usr/local/lib/python3.7/dist-packages/tango/green.py in run(self, fn, args, kwargs, wait, timeout)
107 # Sychronous (no delegation)
108 if not self.asynchronous or not self.in_executor_context():
--> 109 return fn(*args, **kwargs)
110 # Asynchronous delegation
111 accessor = self.delegate(fn, *args, **kwargs)
/usr/local/lib/python3.7/dist-packages/tango/connection.py in __Connection__command_inout(self, name, *args, **kwds)
106 *timeout* parameter.
107 """
--> 108 r = Connection.command_inout_raw(self, name, *args, **kwds)
109 if isinstance(r, DeviceData):
110 try:
/usr/local/lib/python3.7/dist-packages/tango/connection.py in __Connection__command_inout_raw(self, cmd_name, cmd_param)
135 """
136 param = __get_command_inout_param(self, cmd_name, cmd_param)
--> 137 return self.__command_inout(cmd_name, param)
138
139
CommunicationFailed: DevFailed[
DevError[
desc = TRANSIENT CORBA system exception: TRANSIENT_CallTimedout
origin = Connection::command_inout()
reason = API_CorbaException
severity = ERR]
DevError[
desc = Timeout (3000 mS) exceeded on device lts/unb2/1, command initialise
origin = Connection::command_inout()
reason = API_DeviceTimedOut
severity = ERR]
]
%% Cell type:code id:2029f51f tags:
``` python
#
# Power consumption of the RCU's
#
if 1:
print("FPGA power consumption")
print("|---------|----------|----------|----------|----------|----------|----------|----------|----------|")
print("| BRD nr. | Node nr. | Core pwr | ERAM pwr | TrRx pwr | TrTx pwr | TxHx pwr | IO pwr | Tot.FPGA |")
print("|---------|----------|----------|----------|----------|----------|----------|----------|----------|")
for brd_cnt in range(2):
fpgas_pwr = np.zeros(2)
for node_cnt in range(4):
stri = "| {} | {} |".format(brd_cnt, node_cnt)
core_pwr = 0.95 * unb2c.UNB2_FPGA_POL_CORE_IOUT_R[brd_cnt][node_cnt]
stri +=" {:4.1f} W |".format(core_pwr)
eram_pwr = unb2c.UNB2_FPGA_POL_ERAM_VOUT_R[brd_cnt][node_cnt]*unb2c.UNB2_FPGA_POL_ERAM_IOUT_R[brd_cnt][node_cnt]
stri +=" {:4.1f} W |".format(eram_pwr)
rxgxb_pwr = unb2c.UNB2_FPGA_POL_RXGXB_VOUT_R[brd_cnt][node_cnt]*unb2c.UNB2_FPGA_POL_RXGXB_IOUT_R[brd_cnt][node_cnt]
stri +=" {:4.1f} W |".format(rxgxb_pwr)
txgxb_pwr = unb2c.UNB2_FPGA_POL_TXGXB_VOUT_R[brd_cnt][node_cnt]*unb2c.UNB2_FPGA_POL_TXGXB_IOUT_R[brd_cnt][node_cnt]
stri +=" {:4.1f} W |".format(txgxb_pwr)
hgxb_pwre = unb2c.UNB2_FPGA_POL_HGXB_VOUT_R[brd_cnt][node_cnt]*unb2c.UNB2_FPGA_POL_HGXB_IOUT_R[brd_cnt][node_cnt]
stri +=" {:4.1f} W |".format(hgxb_pwre)
pgm_pwr = unb2c.UNB2_FPGA_POL_PGM_VOUT_R[brd_cnt][node_cnt]*unb2c.UNB2_FPGA_POL_PGM_IOUT_R[brd_cnt][node_cnt]
stri +=" {:4.1f} W |".format(pgm_pwr)
tot_fpga = core_pwr + eram_pwr + rxgxb_pwr + txgxb_pwr + hgxb_pwre + pgm_pwr
fpgas_pwr += tot_fpga
stri +=" {:4.1f} W |".format(tot_fpga)
print(stri)
print("|---------|----------|----------|----------|----------|----------|----------|----------|----------|\n")
#
# Board Powers
#
print("Board power consumption")
print("|---------|----------|----------|----------|----------|----------|----------|----------|")
print("| BRD nr. | QSFP N01 | QSFP N23 |Switch 1v2|Switch PHY| clk pwr | FPGAs pwr| Tot. BRD |")
print("|---------|----------|----------|----------|----------|----------|----------|----------|")
brd_input=[]
for brd_cnt in range(2):
stri = "| {} |".format(brd_cnt)
qsfp_n01 = unb2c.UNB2_POL_QSFP_N01_VOUT_R[brd_cnt] * unb2c.UNB2_POL_QSFP_N01_IOUT_R[brd_cnt]
stri +=" {:5.2f} W |".format(qsfp_n01)
qsfp_n23 = unb2c.UNB2_POL_QSFP_N23_VOUT_R[brd_cnt] * unb2c.UNB2_POL_QSFP_N23_IOUT_R[brd_cnt]
stri +=" {:5.2f} W |".format(qsfp_n23)
sw_1v2 = unb2c.UNB2_POL_SWITCH_1V2_VOUT_R[brd_cnt] * unb2c.UNB2_POL_SWITCH_1V2_IOUT_R[brd_cnt]
stri +=" {:5.2f} W |".format(sw_1v2)
sw_phy = unb2c.UNB2_POL_SWITCH_PHY_VOUT_R[brd_cnt] * unb2c.UNB2_POL_SWITCH_PHY_IOUT_R[brd_cnt]
stri +=" {:5.2f} W |".format(sw_phy)
clk = unb2c.UNB2_POL_CLOCK_VOUT_R[brd_cnt] * unb2c.UNB2_POL_CLOCK_IOUT_R[brd_cnt]
stri +=" {:5.2f} W |".format(clk)
stri +=" {:5.2f} W |".format(fpgas_pwr[brd_cnt])
brd_input.append(unb2c.UNB2_DC_DC_48V_12V_VOUT_R[brd_cnt] * unb2c.UNB2_DC_DC_48V_12V_IOUT_R[brd_cnt])
stri +=" {:6.2f} W |".format(brd_input[-1])
print(stri)
print("|---------|----------|----------|----------|----------|----------|----------|----------|")
rcu_ana_pwr = apspu.APSPU_RCU2A_IOUT_R*apspu.APSPU_RCU2A_VOUT_R
rcu_dig_pwr = apspu.APSPU_RCU2D_IOUT_R*apspu.APSPU_RCU2D_VOUT_R
print("\nAPS power consumption")
print("|---------|----------|")
print("| BRD | Tot. BRD |")
print("|---------|----------|")
stri= "|32x RCU2 | {:6.2f} W |".format(rcu_ana_pwr + rcu_dig_pwr)
print(stri)
for brd_cnt in range(2):
stri= "| UNB2_{} | {:6.2f} W |".format(brd_cnt, brd_input[brd_cnt])
print(stri)
print("|---------|----------|")
```
%% Output
FPGA power consumption
|---------|----------|----------|----------|----------|----------|----------|----------|----------|
| BRD nr. | Node nr. | Core pwr | ERAM pwr | TrRx pwr | TrTx pwr | TxHx pwr | IO pwr | Tot.FPGA |
|---------|----------|----------|----------|----------|----------|----------|----------|----------|
| 0 | 0 | 5.7 W | 0.1 W | 0.4 W | 0.1 W | 1.1 W | 0.3 W | 7.6 W |
| 0 | 1 | 1.8 W | 0.2 W | 0.3 W | 0.1 W | 1.2 W | 0.3 W | 3.7 W |
| 0 | 2 | 3.6 W | 0.1 W | 0.4 W | 73091088.0 W | 1.6 W | 0.4 W | 73091094.1 W |
| 0 | 3 | 2.8 W | 0.1 W | 0.4 W | 0.1 W | 1.3 W | 0.2 W | 4.8 W |
| 1 | 0 | nan W | nan W | nan W | nan W | nan W | nan W | nan W |
| 1 | 1 | nan W | nan W | nan W | nan W | nan W | nan W | nan W |
| 1 | 2 | nan W | nan W | nan W | nan W | nan W | nan W | nan W |
| 1 | 3 | nan W | nan W | nan W | nan W | nan W | nan W | nan W |
|---------|----------|----------|----------|----------|----------|----------|----------|----------|
Board power consumption
|---------|----------|----------|----------|----------|----------|----------|----------|
| BRD nr. | QSFP N01 | QSFP N23 |Switch 1v2|Switch PHY| clk pwr | FPGAs pwr| Tot. BRD |
|---------|----------|----------|----------|----------|----------|----------|----------|
| 0 | 5.18 W | 4.19 W | 2.11 W | 0.52 W | 2.21 W | nan W | 44.94 W |
| 1 | nan W | nan W | nan W | nan W | nan W | nan W | nan W |
|---------|----------|----------|----------|----------|----------|----------|----------|
APS power consumption
|---------|----------|
| BRD | Tot. BRD |
|---------|----------|
|32x RCU2 | 82.09 W |
| UNB2_0 | 44.94 W |
| UNB2_1 | nan W |
|---------|----------|
%% Cell type:code id:51d0443c tags:
``` python
max_temp=0
attr_names = unb2c.get_attribute_list()
for i in attr_names:
if "TEMP" in i:
exec("value = unb2c.{}".format(i))
for brd_cnt in range(value.shape[0]):
if (len(value.shape) > 1):
for node_cnt in range(value.shape[1]):
if (max_temp < value[brd_cnt][node_cnt]):
stri = "Hottest UniBoard2 device: Board {} Item {} {} Temperature {:3.1f}°C, above ambient +{:3.1f}".format(brd_cnt, node_cnt, i, value[brd_cnt][node_cnt], value[brd_cnt][node_cnt]-float(ambient_temperature))
else:
if (max_temp < value[brd_cnt]):
stri = "Hottest UniBoard2 device: Board {} {} Temperature {:3.1f}°C, above ambient +{:3.1f}".format(brd_cnt, i, value[brd_cnt], value[brd_cnt]-float(ambient_temperature))
print(stri)
max_temp=0
attr_names = recv.get_attribute_list()
for i in attr_names:
if "TEMP" in i:
exec("value = recv.{}".format(i))
for brd_cnt in range(value.shape[0]):
if (max_temp < value[brd_cnt]):
stri = "Hottest RCU2 device: Board {} {} Temperature {:3.1f}°C, above ambient +{:3.1f}".format(brd_cnt, i, value[brd_cnt], value[brd_cnt]-float(ambient_temperature))
print(stri)
max_temp=0
attr_names = apspu.get_attribute_list()
for i in attr_names:
if "TEMP" in i:
exec("value = apspu.{}".format(i))
stri = "Hottest apspu device: {} Temperature {:3.1f}°C, above ambient +{:3.1f}".format(i, value, value-float(ambient_temperature))
print(stri)
max_temp=0
attr_names = apsct.get_attribute_list()
for i in attr_names:
if "TEMP" in i:
exec("value = apsct.{}".format(i))
stri = "Hottest apsct device: {} Temperature {:3.1f}°C, above ambient +{:3.1f}".format(i, value, value-float(ambient_temperature))
print(stri)
```
%% Output
Hottest UniBoard2 device: Board 0 UNB2_POL_SWITCH_PHY_TEMP_R Temperature 42.6°C, above ambient +21.0
Hottest RCU2 device: Board 3 RCU_TEMP_R Temperature 31.8°C, above ambient +10.2
Hottest apspu device: APSPU_RCU2D_TEMP_R Temperature 28.2°C, above ambient +6.6
Hottest apsct device: APSCT_TEMP_R Temperature 24.4°C, above ambient +2.8
%% Cell type:code id:7f18e187 tags:
``` python
```
%% Cell type:code id:d4f54175 tags:
``` python
#
# Print the available attributes
#
print("Atttibutes of pcc are: \n*********")
attr_names = apspu.get_attribute_list()
for i in attr_names:
print(i)
# exec("value = print(i, d.{})".format(i))
print("*********\n")
```
%% Output
Atttibutes of pcc are:
*********
version_R
opcua_missing_attributes_R
APSPUTR_I2C_error_R
APSPUTR_monitor_rate_RW
APSPUTR_translator_busy_R
APSPU_FAN1_RPM_R
APSPU_FAN2_RPM_R
APSPU_FAN3_RPM_R
APSPU_LBA_IOUT_R
APSPU_LBA_TEMP_R
APSPU_LBA_VOUT_R
APSPU_PCB_ID_R
APSPU_PCB_number_R
APSPU_PCB_version_R
APSPU_RCU2A_IOUT_R
APSPU_RCU2A_TEMP_R
APSPU_RCU2A_VOUT_R
APSPU_RCU2D_IOUT_R
APSPU_RCU2D_TEMP_R
APSPU_RCU2D_VOUT_R
State
Status
*********
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment