From e20c70089945a9155bb0be989b73673b2af0595a Mon Sep 17 00:00:00 2001 From: "Hadaq@styx" Date: Sat, 30 Nov 2013 03:58:54 +0100 Subject: [PATCH] Scripts update --- users/cosy_test/bin/nxall | 11 +++++ users/cosy_test/bin/nxi2c | 23 +++++++++ users/cosy_test/bin/nxi2cr | 19 +++++++ users/cosy_test/bin/nxi2cw | 21 ++++++++ users/cosy_test/config/cts.sh | 3 +- users/cosy_test/config/dhcp/addresses_trb3.db | 4 +- .../config/gbe/register_configgbe.db | 2 - .../config/gbe/register_configgbe_ip.db | 7 ++- users/cosy_test/config/hubconfig.sh | 49 ++++++++++++++----- users/cosy_test/config/nxyter.sh | 19 ++++++- .../config/nxyter/nxsetup_0x3800.dat | 2 +- .../config/nxyter/nxsetup_0x3801.dat | 16 +++--- .../{nxsetup.dat => nxsetup_0x3802.dat} | 6 +-- .../config/nxyter/nxsetup_0x3803.dat | 49 +++++++++++++++++++ users/cosy_test/config/padiwa_cfg.sh | 12 ++--- users/cosy_test/nxscripts/mode_p.sh | 9 ++-- users/cosy_test/nxscripts/mode_st.sh | 8 +-- users/cosy_test/nxscripts/mode_t.sh | 9 ++-- users/cosy_test/nxscripts/mode_tp.sh | 12 +++-- users/cosy_test/nxscripts/quicklook.sh | 6 +-- users/cosy_test/nxscripts/reset.sh | 2 +- users/cosy_test/nxscripts/set_dacs.sh | 30 ++++++------ users/cosy_test/nxscripts/trig_no.sh | 2 +- users/cosy_test/nxscripts/trig_pulser.sh | 20 ++++---- users/cosy_test/trbnet_env_pexor.sh | 25 ++++++++++ users/cosy_test/trbnet_env_trb3.sh | 9 ++++ 26 files changed, 294 insertions(+), 81 deletions(-) create mode 100755 users/cosy_test/bin/nxall create mode 100755 users/cosy_test/bin/nxi2c create mode 100755 users/cosy_test/bin/nxi2cr create mode 100755 users/cosy_test/bin/nxi2cw rename users/cosy_test/config/nxyter/{nxsetup.dat => nxsetup_0x3802.dat} (89%) create mode 100644 users/cosy_test/config/nxyter/nxsetup_0x3803.dat create mode 100755 users/cosy_test/trbnet_env_pexor.sh create mode 100755 users/cosy_test/trbnet_env_trb3.sh diff --git a/users/cosy_test/bin/nxall b/users/cosy_test/bin/nxall new file mode 100755 index 0000000..4b9c805 --- /dev/null +++ b/users/cosy_test/bin/nxall @@ -0,0 +1,11 @@ +#!/bin/bash + +nxarr=(0x3800 0x3801 0x3802 0x3803) + +for i in ${nxarr[*]}; do + cmd="exec $1 $i" +# echo execute $cmd... +# echo $1 $i + $1 $i +# time $cmd +done diff --git a/users/cosy_test/bin/nxi2c b/users/cosy_test/bin/nxi2c new file mode 100755 index 0000000..372cfcb --- /dev/null +++ b/users/cosy_test/bin/nxi2c @@ -0,0 +1,23 @@ +#!/bin/bash + +base=0x8200 + +while getopts "b:" opt; do + case "${opt}" in + b) + base=$1 + ;; + esac +done + +shift $(( OPTIND-1 )) + +addr=$1 +reg=$2 + +if [ -n "$3" ]; then + val=$3 + trbcmd w $addr $(( base + reg )) $val +else + trbcmd r $addr $(( base + reg )) +fi diff --git a/users/cosy_test/bin/nxi2cr b/users/cosy_test/bin/nxi2cr new file mode 100755 index 0000000..1aa8e35 --- /dev/null +++ b/users/cosy_test/bin/nxi2cr @@ -0,0 +1,19 @@ +#!/bin/bash + +base=0x8200 + +while getopts "b:" opt; do + case "${opt}" in + b) + base=$1 + ;; + esac +done + +shift $(( OPTIND-1 )) + +[ -n $1 ] && addr=0x3800 || addr=$1 + +reg=$2 + +trbcmd r $addr $(( base + reg )) diff --git a/users/cosy_test/bin/nxi2cw b/users/cosy_test/bin/nxi2cw new file mode 100755 index 0000000..d0693a5 --- /dev/null +++ b/users/cosy_test/bin/nxi2cw @@ -0,0 +1,21 @@ +#!/bin/bash + +base=0x8200 + +while getopts "b:" opt; do + case "${opt}" in + b) + base=$1 + ;; + esac +done + +shift $(( OPTIND-1 )) + +[ -n $1 ] && addr=0x3800 || addr=$1 + +reg=$2 + +val=$3 + +trbcmd w $addr $(( base + reg )) $val diff --git a/users/cosy_test/config/cts.sh b/users/cosy_test/config/cts.sh index d8a78b9..aaec015 100755 --- a/users/cosy_test/config/cts.sh +++ b/users/cosy_test/config/cts.sh @@ -2,4 +2,5 @@ echo "Doing CTS configuration" -trbcmd w 0x8000 0xa137 0x000f4240 \ No newline at end of file +trbcmd w 0x8000 0xa140 0x000f4240 # pulser freq +trbcmd setbit 0x8000 0xa101 0x2 # turn on pulser diff --git a/users/cosy_test/config/dhcp/addresses_trb3.db b/users/cosy_test/config/dhcp/addresses_trb3.db index 7175b94..95d065e 100755 --- a/users/cosy_test/config/dhcp/addresses_trb3.db +++ b/users/cosy_test/config/dhcp/addresses_trb3.db @@ -11,4 +11,6 @@ 0x8900 33 5 0x8000 69 5 -0x8001 69 0 \ No newline at end of file +0x8001 69 0 +0x3820 69 1 +0x3810 69 3 diff --git a/users/cosy_test/config/gbe/register_configgbe.db b/users/cosy_test/config/gbe/register_configgbe.db index cf4f541..ec57f2c 100755 --- a/users/cosy_test/config/gbe/register_configgbe.db +++ b/users/cosy_test/config/gbe/register_configgbe.db @@ -17,5 +17,3 @@ 0x8000 0 0x8000 0x00020001 0x00030062 0xFDE8 0x578 1 0 0 0xffffff 0x7 0x8800 0 0x8800 0x00020001 0x00030062 0xFDE8 0x578 1 0 0 0xffffff 0x7 0x8900 0 0x8900 0x00020001 0x00030062 0xFDE8 0x578 1 0 0 0xffffff 0x7 - - diff --git a/users/cosy_test/config/gbe/register_configgbe_ip.db b/users/cosy_test/config/gbe/register_configgbe_ip.db index 2385588..b8f2839 100755 --- a/users/cosy_test/config/gbe/register_configgbe_ip.db +++ b/users/cosy_test/config/gbe/register_configgbe_ip.db @@ -33,7 +33,6 @@ # 0x8800 0 0x607bf78c 0x001d 0x0a9b3b46 0xc350 0xdead8800 0x0230 0x0a9b3b12 0xc350 0x0578 - 0x8000 0 0xe5103b84 0xd067 0x0a9b3b2f 0xc350 0xdead8000 0x0230 0x0a9b3bd8 0xc350 0x0578 - 0x8800 0 0xe5103b84 0xd067 0x0a9b3b2f 0xc358 0xdead8800 0x0230 0x0a9b3bd8 0xc358 0x0578 - 0x8900 0 0xe5103b84 0xd067 0x0a9b3b2f 0xc359 0xdead8900 0x0230 0x0a9b3bd8 0xc359 0x0578 - + 0x8000 0 0x4c80c43e 0xd85d 0xc0a80001 0xc350 0xdead8000 0x0230 0xc0a80216 0xc350 0x0578 + 0x8800 0 0x4c80c43e 0xd85d 0xc0a80001 0xc358 0xdead8800 0x0230 0xc0a80216 0xc358 0x0578 + 0x8900 0 0x4c80c43e 0xd85d 0xc0a80001 0xc359 0xdead8900 0x0230 0xc0a80216 0xc359 0x0578 diff --git a/users/cosy_test/config/hubconfig.sh b/users/cosy_test/config/hubconfig.sh index c836c6e..afeddbf 100755 --- a/users/cosy_test/config/hubconfig.sh +++ b/users/cosy_test/config/hubconfig.sh @@ -3,27 +3,54 @@ echo "Loading hub configuration" #CTS sees only one peripheral FPGA (hub), SFP1 only for slow-control - trbcmd w 0x8000 0xc0 0xffe1 - trbcmd w 0x8000 0xc1 0xffe1 - trbcmd w 0x8000 0xc3 0xfff1 + # 0x8000 + # 1111 1111 111x xxxx + # |- fpga 0 - hub + # |- fpga 1 - 32bit addon / TDC + # |- fpga 3 - padiwa + # |- Pexor! + + trbcmd w 0x8000 0xc0 0xffe1 # + trbcmd w 0x8000 0xc1 0xffe1 # + trbcmd w 0x8000 0xc3 0xfffb + + # 0x8001 + # 1111 1111 111x xxxx + # |- sfp 0 - pion tracker + # |- sfp 1 - hub/0x8081 + + trbcmd w 0x8001 0xc0 0xffff + trbcmd w 0x8001 0xc1 0xffff + trbcmd w 0x8001 0xc3 0xffff #Timeouts trbcmd w 0xfffe 0xc5 0x40ff #Trb3 for nxyter -# trbcmd w 0x8900 0xc0 0xfff1 -# trbcmd w 0x8900 0xc1 0xfff1 -# trbcmd w 0x8900 0xc3 0xfff5 + # 0x8900 + # 1111 1111 1111 1111 + # |- fpga 0 - nxyter + # |- fpga 1 - nxyter + # |- fpga 2 - nxyter + # |- fpga 3 - nxyter - trbcmd w 0x8900 0xc0 0xfff3 - trbcmd w 0x8900 0xc1 0xfff3 - trbcmd w 0x8900 0xc3 0xfff7 + trbcmd w 0x8900 0xc0 0xffff + trbcmd w 0x8900 0xc1 0xffff + trbcmd w 0x8900 0xc3 0xffff +# my +# trbcmd w 0x8001 0xc0 0xfff5 +# trbcmd w 0x8001 0xc1 0xfff5 +# trbcmd w 0x8001 0xc3 0xfff5 + + trbcmd w 0x8801 0xc0 0xffff + trbcmd w 0x8801 0xc1 0xffff + trbcmd w 0x8801 0xc3 0xffff + +# /my #Gbe configuration echo "Load GbE configuration" ../../../tools/loadregisterdb.pl gbe/register_configgbe.db ../../../tools/loadregisterdb.pl gbe/register_configgbe_ip.db - - diff --git a/users/cosy_test/config/nxyter.sh b/users/cosy_test/config/nxyter.sh index 18aa09e..ebf0063 100755 --- a/users/cosy_test/config/nxyter.sh +++ b/users/cosy_test/config/nxyter.sh @@ -2,7 +2,22 @@ cd nxyter -./trb3_setup.sh 0x3800 -./trb3_setup.sh 0x3801 +nxarr=(0x3800 0x3801 0x3802 0x3803) + +for i in ${nxarr[*]}; do + echo "nxyter: $i" + res=$(trbcmd i $i 2> /dev/null | wc -l) + if [ $res -eq 0 ]; then + msg="${COLOR_RED}No nxyter found${COLOR_NC}" + echo -e $msg + continue + fi + ./trb3_setup.sh $i +done + +#./trb3_setup.sh 0x3800 +#./trb3_setup.sh 0x3801 +#./trb3_setup.sh 0x3802 +#./trb3_setup.sh 0x3803 cd .. diff --git a/users/cosy_test/config/nxyter/nxsetup_0x3800.dat b/users/cosy_test/config/nxyter/nxsetup_0x3800.dat index 65c920d..2d765d1 100644 --- a/users/cosy_test/config/nxyter/nxsetup_0x3800.dat +++ b/users/cosy_test/config/nxyter/nxsetup_0x3800.dat @@ -22,7 +22,7 @@ 0x00000041 # 18 Common Threshold, default 0x80 0x0000001e # 19 0x0000005f # 20 -0x0000008c # 21 +0x00000074 # 21 0x00000064 # 22 0x00000089 # 23 0x000000ff # 24 Testpulse Strength, default 0x80 diff --git a/users/cosy_test/config/nxyter/nxsetup_0x3801.dat b/users/cosy_test/config/nxyter/nxsetup_0x3801.dat index ea8e796..830702d 100644 --- a/users/cosy_test/config/nxyter/nxsetup_0x3801.dat +++ b/users/cosy_test/config/nxyter/nxsetup_0x3801.dat @@ -4,16 +4,16 @@ 0x00000000 # 0 Channel Masks BEGIN 0x00000000 # 1 0x00000000 # 2 -0x000000c8 # 3 -0x000000a8 # 4 +0x00000000 # 3 +0x00000000 # 4 0x00000000 # 5 -0x00000002 # 6 +0x00000000 # 6 0x00000000 # 7 -0x000000ff # 8 +0x00000000 # 8 0x00000000 # 9 -0x0000003f # 10 -0x0000003f # 11 -0x00000001 # 12 +0x00000000 # 10 +0x00000000 # 11 +0x00000000 # 12 0x00000000 # 13 0x00000000 # 14 0x00000000 # 15 Channel Masks END @@ -22,7 +22,7 @@ 0x0000005a # 18 Common Threshold, default 0x80 0x0000001e # 19 0x0000005f # 20 -0x00000057 # 21 +0x00000088 # 21 0x00000064 # 22 0x00000089 # 23 0x000000ff # 24 Testpulse Strength, default 0x80 diff --git a/users/cosy_test/config/nxyter/nxsetup.dat b/users/cosy_test/config/nxyter/nxsetup_0x3802.dat similarity index 89% rename from users/cosy_test/config/nxyter/nxsetup.dat rename to users/cosy_test/config/nxyter/nxsetup_0x3802.dat index 78ed9b6..65c920d 100644 --- a/users/cosy_test/config/nxyter/nxsetup.dat +++ b/users/cosy_test/config/nxyter/nxsetup_0x3802.dat @@ -19,15 +19,15 @@ 0x00000000 # 15 Channel Masks END 0x000000a0 # 16 0x000000ff # 17 -0x000000aa # 18 Common Threshold, default 0x80 +0x00000041 # 18 Common Threshold, default 0x80 0x0000001e # 19 0x0000005f # 20 -0x00000057 # 21 +0x0000008c # 21 0x00000064 # 22 0x00000089 # 23 0x000000ff # 24 Testpulse Strength, default 0x80 0x00000045 # 25 -0x00000080 # 26 iDUR (26) Analog dead time (changes nxtimer CVT) +0x0000000f # 26 iDUR (26) Analog dead time (changes nxtimer CVT) 0x00000036 # 27 0x0000005c # 28 0x00000045 # 29 diff --git a/users/cosy_test/config/nxyter/nxsetup_0x3803.dat b/users/cosy_test/config/nxyter/nxsetup_0x3803.dat new file mode 100644 index 0000000..4e42fa6 --- /dev/null +++ b/users/cosy_test/config/nxyter/nxsetup_0x3803.dat @@ -0,0 +1,49 @@ +#------------------------------------------ +# Value I2C RegisterAddress +#------------------------------------------ +0x00000000 # 0 Channel Masks BEGIN +0x00000000 # 1 +0x00000000 # 2 +0x00000000 # 3 +0x00000000 # 4 +0x00000000 # 5 +0x00000000 # 6 +0x00000000 # 7 +0x00000000 # 8 +0x00000000 # 9 +0x00000000 # 10 +0x00000000 # 11 +0x00000000 # 12 +0x00000000 # 13 +0x00000000 # 14 +0x00000000 # 15 Channel Masks END +0x000000a0 # 16 +0x000000ff # 17 +0x0000005a # 18 Common Threshold, default 0x80 +0x0000001e # 19 +0x0000005f # 20 +0x0000008c # 21 +0x00000064 # 22 +0x00000089 # 23 +0x000000ff # 24 Testpulse Strength, default 0x80 +0x00000045 # 25 +0x0000000f # 26 iDUR (26) Analog dead time (changes nxtimer CVT) +0x00000036 # 27 +0x0000005c # 28 +0x00000045 # 29 +0x000000be # 30 +0x000000be # 31 +0x00000000 # 32 TestTrigger setup etc. , default 0x00 +0x0000000c # 33 clock input 256A, set bit #3, default 0x08 (normal mode) +0x000000be # 34 +0x000000be # 35 +0x000000be # 36 +0x000000be # 37 +0x00000000 # 38 +0x00000000 # 39 +0x000000be # 40 +0x000000be # 41 +0x000000be # 42 Channel shutdown register, FIFO, do not touch +0x00000000 # 43 +0x00000000 # 44 +0x000000ff # 45 diff --git a/users/cosy_test/config/padiwa_cfg.sh b/users/cosy_test/config/padiwa_cfg.sh index 446fb42..f5cb418 100755 --- a/users/cosy_test/config/padiwa_cfg.sh +++ b/users/cosy_test/config/padiwa_cfg.sh @@ -1,11 +1,11 @@ #!/bin/bash -~/trbsoft/daqtools/padiwa.pl 0x3802 0 disable 0xfffe #only first channel active -~/trbsoft/daqtools/padiwa.pl 0x3802 0 monitor 0x18 #use or of all inputs, stretched to >16ns as trigger out -~/trbsoft/daqtools/padiwa.pl 0x3802 0 comp 0 #no temperature compensation -~/trbsoft/daqtools/padiwa.pl 0x3802 0 invert 0 #no inverter on inputs -~/trbsoft/daqtools/padiwa.pl 0x3802 0 stretch 0 #no stretching of raw signals -~/trbsoft/daqtools/padiwa.pl 0x3802 0 pwm 0 8a00 #pwm of first channel to 1.778mV +~/trbsoft/daqtools/padiwa.pl 0x3810 0 disable 0xfffe #only first channel active +~/trbsoft/daqtools/padiwa.pl 0x3810 0 monitor 0x18 #use or of all inputs, stretched to >16ns as trigger out +~/trbsoft/daqtools/padiwa.pl 0x3810 0 comp 0 #no temperature compensation +~/trbsoft/daqtools/padiwa.pl 0x3810 0 invert 0 #no inverter on inputs +~/trbsoft/daqtools/padiwa.pl 0x3810 0 stretch 0 #no stretching of raw signals +~/trbsoft/daqtools/padiwa.pl 0x3810 0 pwm 0 8a00 #pwm of first channel to 1.778mV diff --git a/users/cosy_test/nxscripts/mode_p.sh b/users/cosy_test/nxscripts/mode_p.sh index 3a2426b..69a5754 100755 --- a/users/cosy_test/nxscripts/mode_p.sh +++ b/users/cosy_test/nxscripts/mode_p.sh @@ -1,7 +1,10 @@ #!/bin/bash -[ -n $1 ] && addr=0x3800 || addr=$1 +[ -z $1 ] && addr=0xfe49 || addr=$1 # TP -trb_i2c w $addr 0x0008 32 0x01 -trb_i2c w $addr 0x0008 33 15 +trbcmd setbit $addr $(( 0x8200 + 32 )) 0x01 +trbcmd clearbit $addr $(( 0x8200 + 32 )) 0x08 + +trbcmd w $addr 0x8160 1 +trbcmd w $addr 0x8140 100 diff --git a/users/cosy_test/nxscripts/mode_st.sh b/users/cosy_test/nxscripts/mode_st.sh index c0d497f..ee88388 100755 --- a/users/cosy_test/nxscripts/mode_st.sh +++ b/users/cosy_test/nxscripts/mode_st.sh @@ -1,8 +1,10 @@ #!/bin/bash -[ -n $1 ] && addr=0x3800 || addr=$1 +[ -z $1 ] && addr=0xfe49 || addr=$1 # cfg reg # TP TT -trb_i2c w $addr 0x0008 32 0x00 -trb_i2c w $addr 0x0008 33 0x0f +trbcmd clearbit $addr $(( 0x8200 + 32 )) 0x01 +trbcmd clearbit $addr $(( 0x8200 + 32 )) 0x08 + +trbcmd w $addr 0x8160 0 diff --git a/users/cosy_test/nxscripts/mode_t.sh b/users/cosy_test/nxscripts/mode_t.sh index f796aba..5c36483 100755 --- a/users/cosy_test/nxscripts/mode_t.sh +++ b/users/cosy_test/nxscripts/mode_t.sh @@ -1,7 +1,10 @@ #!/bin/bash -[ -n $1 ] && addr=0x3800 || addr=$1 +[ -z $1 ] && addr=0xfe49 || addr=$1 # TT -trb_i2c w $addr 0x0008 32 0x08 -trb_i2c w $addr 0x0008 33 15 +trbcmd clearbit $addr $(( 0x8200 + 32 )) 0x01 +trbcmd setbit $addr $(( 0x8200 + 32 )) 0x08 + +trbcmd w $addr 0x8160 1 +trbcmd w $addr 0x8140 100 diff --git a/users/cosy_test/nxscripts/mode_tp.sh b/users/cosy_test/nxscripts/mode_tp.sh index 5e9fa59..c8a9322 100755 --- a/users/cosy_test/nxscripts/mode_tp.sh +++ b/users/cosy_test/nxscripts/mode_tp.sh @@ -1,8 +1,14 @@ #!/bin/bash -[ -n $1 ] && addr=0x3800 || addr=$1 +[ -z $1 ] && addr=0xfe49 || addr=$1 # cfg reg # TP TT -trb_i2c w $addr 0x0008 32 0x09 -trb_i2c w $addr 0x0008 33 0x0f +#nxi2c $addr 32 0x09 +#nxi2c $addr 33 0x0f + +trbcmd setbit $addr $(( 0x8200 + 32 )) 0x01 +trbcmd setbit $addr $(( 0x8200 + 32 )) 0x08 + +trbcmd w $addr 0x8160 1 +trbcmd w $addr 0x8140 100 diff --git a/users/cosy_test/nxscripts/quicklook.sh b/users/cosy_test/nxscripts/quicklook.sh index cf6d477..f0e55e1 100755 --- a/users/cosy_test/nxscripts/quicklook.sh +++ b/users/cosy_test/nxscripts/quicklook.sh @@ -1,8 +1,8 @@ #!/bin/bash watch -n 1 " \ -trbcmd -d1 r 0x3800 0x8124; \ -trbcmd -d1 r 0x3800 0x8125; \ -trbcmd -d1 r 0x3800 0x8162; \ +trbcmd -d1 r 0xfe49 0x8124; \ +trbcmd -d1 r 0xfe49 0x8125; \ +trbcmd -d1 r 0xfe49 0x8162; \ " diff --git a/users/cosy_test/nxscripts/reset.sh b/users/cosy_test/nxscripts/reset.sh index fc28403..0d12bed 100755 --- a/users/cosy_test/nxscripts/reset.sh +++ b/users/cosy_test/nxscripts/reset.sh @@ -1,6 +1,6 @@ #!/bin/bash -[ -n $1 ] && addr=0x3800 || addr=$1 +[ -n $1 ] && addr=0xfe49 || addr=$1 trbcmd w $addr 0x8100 1 trbcmd w $addr 0x8101 1 diff --git a/users/cosy_test/nxscripts/set_dacs.sh b/users/cosy_test/nxscripts/set_dacs.sh index 5af4ede..e61a00a 100755 --- a/users/cosy_test/nxscripts/set_dacs.sh +++ b/users/cosy_test/nxscripts/set_dacs.sh @@ -1,20 +1,20 @@ #!/bin/bash -[ -n $1 ] && addr=0x3800 || addr=$1 +[ -n $1 ] && addr=0xfe49 || addr=$1 # nx settings -trb_i2c w $addr 0x0008 16 160 -trb_i2c w $addr 0x0008 17 255 -trb_i2c w $addr 0x0008 18 35 -trb_i2c w $addr 0x0008 19 30 -trb_i2c w $addr 0x0008 20 95 -trb_i2c w $addr 0x0008 21 87 -trb_i2c w $addr 0x0008 22 100 -trb_i2c w $addr 0x0008 23 137 -trb_i2c w $addr 0x0008 24 255 -trb_i2c w $addr 0x0008 25 69 -trb_i2c w $addr 0x0008 26 15 -trb_i2c w $addr 0x0008 27 54 -trb_i2c w $addr 0x0008 28 92 -trb_i2c w $addr 0x0008 29 69 +nxi2c $addr 0x0008 16 160 +nxi2c $addr 0x0008 17 255 +nxi2c $addr 0x0008 18 35 +nxi2c $addr 0x0008 19 30 +nxi2c $addr 0x0008 20 95 +nxi2c $addr 0x0008 21 87 +nxi2c $addr 0x0008 22 100 +nxi2c $addr 0x0008 23 137 +nxi2c $addr 0x0008 24 255 +nxi2c $addr 0x0008 25 69 +nxi2c $addr 0x0008 26 15 +nxi2c $addr 0x0008 27 54 +nxi2c $addr 0x0008 28 92 +nxi2c $addr 0x0008 29 69 diff --git a/users/cosy_test/nxscripts/trig_no.sh b/users/cosy_test/nxscripts/trig_no.sh index c1d0ead..4002bcd 100755 --- a/users/cosy_test/nxscripts/trig_no.sh +++ b/users/cosy_test/nxscripts/trig_no.sh @@ -1,6 +1,6 @@ #!/bin/bash -[ -n $1 ] && addr=0x3800 || addr=$1 +[ -n $1 ] && addr=0xfe49 || addr=$1 trbcmd w $addr 0x8180 0 trbcmd w $addr 0x8181 0 diff --git a/users/cosy_test/nxscripts/trig_pulser.sh b/users/cosy_test/nxscripts/trig_pulser.sh index a595f69..f3db702 100755 --- a/users/cosy_test/nxscripts/trig_pulser.sh +++ b/users/cosy_test/nxscripts/trig_pulser.sh @@ -1,18 +1,18 @@ #!/bin/bash -[ -n $1 ] && addr=0x3800 || addr=$1 +[ -z $1 ] && addr=0xfe49 || addr=$1 -trbcmd w $addr 0x8180 0 -trbcmd w $addr 0x8181 0 -trbcmd w $addr 0x8182 250 -trbcmd w $addr 0x8183 100 +#trbcmd w $addr 0x8180 0 +#trbcmd w $addr 0x8181 0 +#trbcmd w $addr 0x8182 250 +#trbcmd w $addr 0x8183 100 #trbcmd w $addr 0x8140 1 #trbcmd w $addr 0x8144 1 -trbcmd w $addr 0x8160 0 -trbcmd w $addr 0x8161 1 -#trbcmd w $addr 0x8144 1 +trbcmd w $addr 0x8160 1 +#trbcmd w $addr 0x8161 1 +##trbcmd w $addr 0x8144 1 -trbcmd w $addr 0x8102 1 -trbcmd w $addr 0x8103 0 +#trbcmd w $addr 0x8102 1 +#trbcmd w $addr 0x8103 0 diff --git a/users/cosy_test/trbnet_env_pexor.sh b/users/cosy_test/trbnet_env_pexor.sh new file mode 100755 index 0000000..d0b1efb --- /dev/null +++ b/users/cosy_test/trbnet_env_pexor.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +export WD="/home/hadaq/trbsoft/daqtools/users/cosy_test/" + +EXTRALIB=${HOME}/usr/lib64:${HOME}/projects/install/lib +HADESLIB=${HOME}/trbsoft/trbnettools/lib + +export LD_LIBRARY_PATH=${HADESLIB}:${EXTRALIB}:${LD_LIBRARY_PATH} +export PATH=${HOME}/bin:${HOME}/usr/bin:${PATH} + +TRBSOFT=${HOME}/trbsoft + +export DAQHOSTNAME=localhost +export TRBNETID=0 + +export DAQOPSERVER=${DAQHOSTNAME}:${TRBNETID} + +echo "TRB Soft dir : ${TRBSOFT}" +echo "TRBnet environment ready to use!" +echo "================================" +echo "" + +PS1=${COLOR_YELLOW}'\u@\h\[\033[01;34m\] \w$(parse_git_branch)'${COLOR_NC}' ' + +[ -z "$(pidof trbnetd)" ] && /home/hadaq/trbsoft/trbnettools/binlocal/trbnetd diff --git a/users/cosy_test/trbnet_env_trb3.sh b/users/cosy_test/trbnet_env_trb3.sh new file mode 100755 index 0000000..149a229 --- /dev/null +++ b/users/cosy_test/trbnet_env_trb3.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +export TRB3_SERVER=trb3069 + +if [ -z "$(pidof trbnetd)" ]; then + /home/hadaq/trbsoft/trbnettools_trb3/binlocal/trbnetd +fi + +. /home/hadaq/trbsoft/daqtools/users/cosy_test/trbnet_env_pexor.sh -- 2.43.0