diff --git a/LCU/StationTest/test/hbatest/determinepeak.py b/LCU/StationTest/test/hbatest/determinepeak.py index e93ad1899e917a86753318b70d83b077c7b978d4..fe885c7c33e84c20ed3a0456fd6fa09566871cb2 100644 --- a/LCU/StationTest/test/hbatest/determinepeak.py +++ b/LCU/StationTest/test/hbatest/determinepeak.py @@ -79,8 +79,11 @@ def main() : #--------------------------------------------- # capture reference data (all HBA elements off) rm_files(dir_name,'*') - os.popen("rspctl --rcumode=5 2>/dev/null") - os.popen("rspctl --enable 2>/dev/null") + os.popen3("swlevel 3"); + time.sleep(5) + os.popen("beamctl --array=HBA --rcus=0:95 --rcumode=5 --subbands=100:110 --beamlets=0:10 --direction=0,0,J2000&") + #os.popen("rspctl --rcumode=5 2>/dev/null") + #os.popen("rspctl --rcuenable=1 2>/dev/null") for ind in range(hba_elements) : ctrl_string=ctrl_string + '128,' strlength=len(ctrl_string) diff --git a/LCU/StationTest/test/hbatest/hbaelementtest.py b/LCU/StationTest/test/hbatest/hbaelementtest.py index 790ea2da509ccc8abf81054573fc7464959e214f..61ca38b1aa3143e95d04244bb549881603d5d2bd 100644 --- a/LCU/StationTest/test/hbatest/hbaelementtest.py +++ b/LCU/StationTest/test/hbatest/hbaelementtest.py @@ -45,7 +45,7 @@ def open_file(files, file_nr) : f=open(file_name,'rb') max_frames = size/(512*8) frames_to_process=max_frames - rcu_nr = int(files[file_nr][-7:-4]) + rcu_nr = int(files[file_nr][-6:-4]) #print 'File nr ' + str(file_nr) + ' RCU nr ' + str(rcu_nr) + ' ' + files[file_nr][-6:-4] else : frames_to_process=0 @@ -121,8 +121,11 @@ def main() : #--------------------------------------------- # capture reference data (all HBA elements off) rm_files(dir_name,'*') - os.popen("rspctl --rcumode=5 2>/dev/null") - os.popen("rspctl --rcuenable=1 2>/dev/null") + os.popen3("swlevel 3"); + time.sleep(5) + os.popen("beamctl --array=HBA --rcus=0:95 --rcumode=5 --subbands=100:110 --beamlets=0:10 --direction=0,0,J2000&") + #os.popen("rspctl --rcumode=5 2>/dev/null") + #os.popen("rspctl --rcuenable=1 2>/dev/null") time.sleep(2) for ind in range(hba_elements) : ctrl_string=ctrl_string + '2,' diff --git a/LCU/StationTest/test/hbatest/hbaquicktest.py b/LCU/StationTest/test/hbatest/hbaquicktest.py index 4d325b67b2727dbcce87c11f854378749eba88d5..8bbcc028820e767b912b7334a205f3778ae59d7e 100644 --- a/LCU/StationTest/test/hbatest/hbaquicktest.py +++ b/LCU/StationTest/test/hbatest/hbaquicktest.py @@ -94,10 +94,11 @@ def main() : #--------------------------------------------- # capture reference data (all HBA elements off) rm_files(dir_name,'*') - os.popen("rspctl --rcumode=5 2>/dev/null") - time.sleep(2) - os.popen("rspctl --rcuenable=1 2>/dev/null") - time.sleep(2) + os.popen3("swlevel 3"); + time.sleep(5) + os.popen("beamctl --array=HBA --rcus=0:95 --rcumode=5 --subbands=100:110 --beamlets=0:10 --direction=0,0,J2000&") + #os.popen("rspctl --rcumode=5 2>/dev/null") + #os.popen("rspctl --rcuenable=1 2>/dev/null") for ind in range(hba_elements) : ctrl_string=ctrl_string + '2,' strlength=len(ctrl_string) diff --git a/LCU/StationTest/test/hbatest/modemtest.sh b/LCU/StationTest/test/hbatest/modemtest.sh index 485460998ea21d70abf4ea7489af50102aefe166..e9be466d016ebe60a917d76a47de93de59c304c4 100644 --- a/LCU/StationTest/test/hbatest/modemtest.sh +++ b/LCU/StationTest/test/hbatest/modemtest.sh @@ -3,18 +3,37 @@ # Send delays from RCU to HBA and compare results with the expected golden result. # To verify modem communication between RCU and HBA # -# Version 1.1 55555 2009 M.J.Norden +# Version 1.2 18-01-10 M.J.Norden rm -f hba_modem*.log rm -f hba_modem*.diff -declare ontime=4 - +let ontime=4 let hbamode=5 -eval "rspctl --rcumode=$hbamode" +station=`hostname -s` + +if [ -e /opt/lofar/etc/RemoteStation.conf ]; then + let rspboards=`sed -n 's/^\s*RS\.N_RSPBOARDS\s*=\s*\([0-9][0-9]*\).*$/\1/p' /opt/lofar/etc/RemoteStation.conf` + let rcus=$rspboards*8 + let nrcus=$rcus-1 +else + echo "Could not find /opt/lofar/etc/RemoteStation.conf" + let rspboards=12 + let rcus=$rspboards*8 + let nrcus=$rcus-1 +fi + +echo "This is station "$station +echo "The number of RCU's is "$rcus + +rspctl --splitter=0 sleep 2 -eval "rspctl --rcuenable=1" + +swlevel 3 +beamctl --array=HBA --rcus=0:$nrcus --rcumode=$hbamode --subbands=100:110 --beamlets=0:10 --direction=0,0,J2000& + +sleep 5 echo "The rcumode is "$hbamode sleep 2