diff --git a/config/APSCTTR.yaml b/config/APSCTTR.yaml index 13a38f8e7677b87b840b07c78969e75a9a1f07df..ac79008c7565016b5c9b98bfca5f0a4830d7152e 100644 --- a/config/APSCTTR.yaml +++ b/config/APSCTTR.yaml @@ -243,6 +243,7 @@ variables: devreg: VSENSE.Temp width: 23 scale: 3.8265e-3 + convert_unit: Kelvin2Celsius rw: ro dtype: double monitor: true diff --git a/config/APSPUTR.yaml b/config/APSPUTR.yaml index 25d5f3b181bd79a27c67fbb83ed29b16e1e0e42b..ed17c84ee6d433fd5b808ade0524a261df2b86a0 100644 --- a/config/APSPUTR.yaml +++ b/config/APSPUTR.yaml @@ -103,7 +103,7 @@ variables: rw: ro dtype: double scale: 1.52588e-5 #FAN_TACHS/TACH_COUNT_FREQ/TACH_PERIODS = 1/8192/16 *2 -# monitor: true + monitor: true methods: - name: APSPUTR_Init #Called after startup to load. Should have all stored registers diff --git a/config/RECVTR.yaml b/config/RECVTR.yaml index 48df9453992079a3f891f4796f4c7626c5926ff6..58cdd33cba6203d5dc14acc53e2300bd946afa19 100644 --- a/config/RECVTR.yaml +++ b/config/RECVTR.yaml @@ -304,6 +304,7 @@ variables: devreg: AN.Temp width: 23 scale: 4.21e-3 + convert_unit: Kelvin2Celsius rw: ro dtype: double dim: 32 diff --git a/opcuaserv/yamlreader.py b/opcuaserv/yamlreader.py index 1ee0836e71c89d52f36b65f1b8aa4c3cd6f23df3..6be87499895b68272e596e1e0201b658fd7cb9ea 100644 --- a/opcuaserv/yamlreader.py +++ b/opcuaserv/yamlreader.py @@ -4,6 +4,7 @@ import time from yamlconfig import * import logging from .smbus_float import * +from .convert_unit import * def bytes2int(bts): x=0; for b in bts: @@ -196,6 +197,9 @@ class yamlreader(yamlconfig): else: scale=float(scale) data2=[(d*scale) for d in data2] + convert=v.get("convert_unit") + if convert: data2=[eval(convert)(d) for d in data2] + var1=v.get('OPCR') if not(var1): var1=v.get('OPCW') if not(var1): diff --git a/scripts/Ant_Pwr.py b/scripts/Ant_Pwr.py index fc382be7b910dc6adf0b27bc17dde1f18ba17e50..3b3b0e948497156c8d19c78c719905408fafc7f8 100644 --- a/scripts/Ant_Pwr.py +++ b/scripts/Ant_Pwr.py @@ -1,7 +1,7 @@ from test_common import * name="RCU_PWR_ANT_on" -RCU=[0,1,2,3]; +RCU=[2]; On=[True,True,True] #On=[False,False,False] #Att=[10,10,10] diff --git a/scripts/CLK.py b/scripts/CLK.py index b0ff702772de24ea817243e62642f7bf5507d891..3d23ffb05e48d3a31548737f90e73e217f6abbb1 100644 --- a/scripts/CLK.py +++ b/scripts/CLK.py @@ -3,8 +3,8 @@ connect("opc.tcp://localhost:4843/") #callmethod("APSCT_off") #time.sleep(1) -#callmethod("APSCT_200MHz_on") -callmethod("APSCT_160MHz_on") +callmethod("APSCT_200MHz_on") +#callmethod("APSCT_160MHz_on") for x in range(10): busy=get_value("APSCTTR_translator_busy_R") print(busy) diff --git a/scripts/RCUupdate.py b/scripts/RCUupdate.py index 6182e25724fdc5bbfdc5356fc6d1452b795cc162..6f314be64f61d124f037b6fbacd8eaeaaa957ab1 100644 --- a/scripts/RCUupdate.py +++ b/scripts/RCUupdate.py @@ -1,5 +1,5 @@ from test_common import * - +connect() RCUs=[0,1,2,3]; setRCUmask(RCUs) #for RCU in RCUs: diff --git a/scripts/SetMonitor.py b/scripts/SetMonitor.py index 76f9d2d5631c2f74fd85f0a1abb8f001e2673943..d90e1a494a4fb47443378f936fcb5d5f9c4e54be 100644 --- a/scripts/SetMonitor.py +++ b/scripts/SetMonitor.py @@ -1,7 +1,7 @@ from test_common import * - -rate= 0 #seconds -name="RCU_monitor_rate_RW" +connect() +rate= 30 #seconds +name="RECVTR_monitor_rate_RW" print("old:",get_value(name)) set_value(name,rate)