From: hadaq@countinghouse Date: Sat, 23 Aug 2014 19:36:57 +0000 (+0200) Subject: latest changes to hmon X-Git-Tag: pre2018~61 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=028751617e4a196c006710b5790b3d7557b13f49;p=hadesdaq.git latest changes to hmon --- diff --git a/control/gui/expert/Restart_Sequencer b/control/gui/expert/Restart_Sequencer new file mode 100755 index 0000000..e69de29 diff --git a/control/mdcLVgui/S0/Plane_0 b/control/mdcLVgui/S0/Plane_0 deleted file mode 100755 index 5804121..0000000 --- a/control/mdcLVgui/S0/Plane_0 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AA5E702000000A4 1'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AA5E702000000A4 0'" \ No newline at end of file diff --git a/control/mdcLVgui/S0/Plane_1 b/control/mdcLVgui/S0/Plane_1 deleted file mode 100755 index 46f2eb7..0000000 --- a/control/mdcLVgui/S0/Plane_1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A14E3020000008B 1'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A14E3020000008B 0'" diff --git a/control/mdcLVgui/S0/Plane_2 b/control/mdcLVgui/S0/Plane_2 deleted file mode 100755 index 422f613..0000000 --- a/control/mdcLVgui/S0/Plane_2 +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A5CDB02000000E5 1'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A5CDB02000000E5 0'" - diff --git a/control/mdcLVgui/S0/Plane_3 b/control/mdcLVgui/S0/Plane_3 deleted file mode 100755 index 3400905..0000000 --- a/control/mdcLVgui/S0/Plane_3 +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 1'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 0'" - - diff --git a/control/mdcLVgui/S1/Plane_0 b/control/mdcLVgui/S1/Plane_0 deleted file mode 100755 index 3799388..0000000 --- a/control/mdcLVgui/S1/Plane_0 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AA5E702000000A4 2'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AA5E702000000A4 0'" \ No newline at end of file diff --git a/control/mdcLVgui/S1/Plane_1 b/control/mdcLVgui/S1/Plane_1 deleted file mode 100755 index ee55a3c..0000000 --- a/control/mdcLVgui/S1/Plane_1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A14E3020000008B 2'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A14E3020000008B 0'" diff --git a/control/mdcLVgui/S1/Plane_2 b/control/mdcLVgui/S1/Plane_2 deleted file mode 100755 index b81ec71..0000000 --- a/control/mdcLVgui/S1/Plane_2 +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A5CDB02000000E5 2'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A5CDB02000000E5 0'" - diff --git a/control/mdcLVgui/S1/Plane_3 b/control/mdcLVgui/S1/Plane_3 deleted file mode 100755 index 6d24b1e..0000000 --- a/control/mdcLVgui/S1/Plane_3 +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 2'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3ABEF0020000002A 0'" - - diff --git a/control/mdcLVgui/S2/Plane_0 b/control/mdcLVgui/S2/Plane_0 deleted file mode 100755 index 387e6c1..0000000 --- a/control/mdcLVgui/S2/Plane_0 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A11DA0200000017 1'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A11DA0200000017 0'" \ No newline at end of file diff --git a/control/mdcLVgui/S2/Plane_1 b/control/mdcLVgui/S2/Plane_1 deleted file mode 100755 index a4896e3..0000000 --- a/control/mdcLVgui/S2/Plane_1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A3AD90200000017 1'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A3AD90200000017 0'" diff --git a/control/mdcLVgui/S2/Plane_2 b/control/mdcLVgui/S2/Plane_2 deleted file mode 100755 index f0affe5..0000000 --- a/control/mdcLVgui/S2/Plane_2 +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A05E5020000007B 1'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A05E5020000007B 0'" - diff --git a/control/mdcLVgui/S2/Plane_3 b/control/mdcLVgui/S2/Plane_3 deleted file mode 100755 index ce0233f..0000000 --- a/control/mdcLVgui/S2/Plane_3 +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A53E602000000A9 1'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A53E602000000A9 0'" - - diff --git a/control/mdcLVgui/S3/Plane_0 b/control/mdcLVgui/S3/Plane_0 deleted file mode 100755 index f4ad3fb..0000000 --- a/control/mdcLVgui/S3/Plane_0 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A11DA0200000017 2'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A11DA0200000017 0'" \ No newline at end of file diff --git a/control/mdcLVgui/S3/Plane_1 b/control/mdcLVgui/S3/Plane_1 deleted file mode 100755 index 8959932..0000000 --- a/control/mdcLVgui/S3/Plane_1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A3AD90200000017 2'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A3AD90200000017 0'" diff --git a/control/mdcLVgui/S3/Plane_2 b/control/mdcLVgui/S3/Plane_2 deleted file mode 100755 index bdeb03c..0000000 --- a/control/mdcLVgui/S3/Plane_2 +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A05E5020000007B 2'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A05E5020000007B 0'" - diff --git a/control/mdcLVgui/S3/Plane_3 b/control/mdcLVgui/S3/Plane_3 deleted file mode 100755 index cbdca2a..0000000 --- a/control/mdcLVgui/S3/Plane_3 +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A53E602000000A9 2'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A53E602000000A9 0'" - - diff --git a/control/mdcLVgui/S4/Plane_0 b/control/mdcLVgui/S4/Plane_0 deleted file mode 100755 index b2342bf..0000000 --- a/control/mdcLVgui/S4/Plane_0 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6EE302000000DC 1'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6EE302000000DC 0'" \ No newline at end of file diff --git a/control/mdcLVgui/S4/Plane_1 b/control/mdcLVgui/S4/Plane_1 deleted file mode 100755 index 912ebf7..0000000 --- a/control/mdcLVgui/S4/Plane_1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6FDA020000009C 1'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6FDA020000009C 0'" diff --git a/control/mdcLVgui/S4/Plane_2 b/control/mdcLVgui/S4/Plane_2 deleted file mode 100755 index a0d620b..0000000 --- a/control/mdcLVgui/S4/Plane_2 +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A1FF4020000005E 1'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A1FF4020000005E 0'" - diff --git a/control/mdcLVgui/S4/Plane_3 b/control/mdcLVgui/S4/Plane_3 deleted file mode 100755 index 06b44fc..0000000 --- a/control/mdcLVgui/S4/Plane_3 +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AF6DB0200000076 1'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AF6DB0200000076 0'" - - diff --git a/control/mdcLVgui/S5/Plane_0 b/control/mdcLVgui/S5/Plane_0 deleted file mode 100755 index f1b9351..0000000 --- a/control/mdcLVgui/S5/Plane_0 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6EE302000000DC 2'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6EE302000000DC 0'" \ No newline at end of file diff --git a/control/mdcLVgui/S5/Plane_1 b/control/mdcLVgui/S5/Plane_1 deleted file mode 100755 index 79e7b67..0000000 --- a/control/mdcLVgui/S5/Plane_1 +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6FDA020000009C 2'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A6FDA020000009C 0'" diff --git a/control/mdcLVgui/S5/Plane_2 b/control/mdcLVgui/S5/Plane_2 deleted file mode 100755 index 25b042f..0000000 --- a/control/mdcLVgui/S5/Plane_2 +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A1FF4020000005E 2'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3A1FF4020000005E 0'" - diff --git a/control/mdcLVgui/S5/Plane_3 b/control/mdcLVgui/S5/Plane_3 deleted file mode 100755 index 42783d3..0000000 --- a/control/mdcLVgui/S5/Plane_3 +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AF6DB0200000076 2'" -sleep 5 -command_client.pl -e etraxp204 -c "/home/hadaq/bin/writetty.sh 'OWDS 3AF6DB0200000076 0'" - - diff --git a/hmon/HPlot.pm b/hmon/HPlot.pm index 26093da..826e34a 100755 --- a/hmon/HPlot.pm +++ b/hmon/HPlot.pm @@ -233,7 +233,7 @@ sub PlotDraw { } plot_write($p->{$name}->{fh},"e"); plot_write($p->{$name}->{fh},"e"); -# } + for(my $j=0; $j<$p->{$name}->{curves}; $j++) { for(my $i=0; $i< $p->{$name}->{entries}; $i++) { plot_write($p->{$name}->{fh},($p->{$name}->{value}->[$j]->[$i]||0)." ",1); @@ -258,7 +258,6 @@ sub PlotDraw { sub PlotAdd { my($name,$value,$curve) = @_; $curve = 0 unless $curve; - push(@{$p->{$name}->{value}->[$curve]},$value||0); shift(@{$p->{$name}->{value}->[$curve]}); diff --git a/hmon/QA.pm b/hmon/QA.pm index 8cb7bb4..ef9c631 100644 --- a/hmon/QA.pm +++ b/hmon/QA.pm @@ -33,7 +33,7 @@ our $entries->{'cats'} = ["main", # Order of entries in each cat $entries->{'main'} = ['time', 'rate','onlineqa','up','speech']; -$entries->{'daq'} = ['trbnet', 'timeouts', 'busy','readout']; +$entries->{'daq'} = ['trbnet', 'timeouts', 'busy','readout','spillcount']; $entries->{'trg'} = ['spill', 'accepted', 'source','pt1rate', 'start']; #, $entries->{'rate'} = ['pt1','start','hodo','pion1','pion2']; $entries->{'server'} = ['fill', 'cpu', 'icinga', 'etrax', 'pwrsup']; @@ -41,7 +41,7 @@ $entries->{'eb'} = ['run', 'rate','bytes', 'lostevt', 'errbits']; $entries->{'mdc'} = ['token', 'blocked', 'temp', 'linkqual', 'voltage']; $entries->{'endp'} = ['mdc','rich', 'tof', 'rpc', 'other']; $entries->{'feeerr'} = ['rich', 'trb', 'feeerr','trginp','trgqual']; -$entries->{'pion'} = ['nxstatus', 'HV', 'HVcurr', 'cooling']; +$entries->{'pion'} = ['nxstatus', 'HV', 'HVcurr', 'cooling','seu']; $entries->{'other'} = ['magnet','rich','shower','mdcinvalid','sequencer']; diff --git a/hmon/doc/eb-lostevt.htt b/hmon/doc/eb-lostevt.htt index e58e8c4..9295daf 100644 --- a/hmon/doc/eb-lostevt.htt +++ b/hmon/doc/eb-lostevt.htt @@ -1,5 +1,6 @@

Number of discarded events

-This button gives you the number of discarded events in the Eventbuilders. -
The reason can be a overloaded CPU in the EB or any other error. Try to restart the Eventbuilders. - +This button gives you the number of discarded events in the Eventbuilders. Few discarded events are fine. + +
If many events are discarded, try to restart the Eventbuilders. +
ery likely cause: Failed Ethernet transmission from Pion Tracker. Click "Reboot TRB3" followed by a DAQ restart. diff --git a/hmon/doc/other-rich.htt b/hmon/doc/other-rich.htt new file mode 100644 index 0000000..945291d --- /dev/null +++ b/hmon/doc/other-rich.htt @@ -0,0 +1,16 @@ +

Magnet

+

+This button shows the status of the RICH high voltage. +
Button is yellow if any sector has a high voltage below 2200 Volts. This can happen every now and then when the detector has a trip and does automatic recovery. +
Button is red if high voltage is too low for more than three minutes, which should not happen. +

+ + +

Error Handling in case it is RED:

+ +

If you know how, you can reenable high voltage on the corresponding sector manually in the Epics GUI. If not: +
Call RICH detector expert (if not on shift) + + + + diff --git a/hmon/doc/other-sequencer.htt b/hmon/doc/other-sequencer.htt index 892de8e..d76c428 100644 --- a/hmon/doc/other-sequencer.htt +++ b/hmon/doc/other-sequencer.htt @@ -3,4 +3,5 @@

Some high voltage control is not working any more. Please inform the MDC operator before taking any action.

Error Handling

Click the 'Restart Sequencer' button in the control window or run on lxhadeb06: -

ssh scs@lxhadeb06 'echo -en "\x18" | netcat -w 1 localhost 4813
\ No newline at end of file +
ssh scs@lxhadeb06 'echo -en "\x18" | netcat -w 1 localhost 4813
+
Restarting might take a minute until the button is green again. diff --git a/hmon/doc/other-speech.htt b/hmon/doc/other-speech.htt deleted file mode 100644 index b0a88fb..0000000 --- a/hmon/doc/other-speech.htt +++ /dev/null @@ -1,11 +0,0 @@ -

Speech Output

-

-This button shows the status of the speech deamon which gives you accustic informations in case of critical problems -with any subsystem. - -

Error Handling if the button is not Green

- -It can only be switched off. If that is the case, turn it on. - - - diff --git a/hmon/doc/pion-nxstatus.htt b/hmon/doc/pion-nxstatus.htt new file mode 100644 index 0000000..02c8321 --- /dev/null +++ b/hmon/doc/pion-nxstatus.htt @@ -0,0 +1,20 @@ +

+Pion Tracker Nxyter FEB Status, tells the status of all Nxyter Frontends. As +long as the button is green everything is O.K. +

+

Error Handling in case it is not Green

+In most cases a DAQ restart helps. In rare cases a power-cycle has to be performed. + +

Check the short Error Messgage Indicator dislayed on the button

+ + diff --git a/hmon/doc/rate-hodo.htt b/hmon/doc/rate-hodo.htt new file mode 100644 index 0000000..f3cad26 --- /dev/null +++ b/hmon/doc/rate-hodo.htt @@ -0,0 +1,4 @@ +

Rate from the Hodoscope detector

+

Shows the rate seen on the Hodoscope detector before and after substraction of noise rate. +

The button will be red if the Start shows a high rate and the Hodoscope shows a low rate which might +point to a problem with sending the trigger signal from Hodoscope to the CTS. Ask an expert for help... \ No newline at end of file diff --git a/hmon/doc/rate-start.htt b/hmon/doc/rate-start.htt new file mode 100644 index 0000000..d668e0b --- /dev/null +++ b/hmon/doc/rate-start.htt @@ -0,0 +1,4 @@ +

Rate from the Start detector

+

Shows the rate seen on the start detector before and after substraction of noise rate. +

The button will be red if the hodoscope shows a high rate and the start shows a low rate which might +point to a problem with sending the trigger signal from start to the CTS. Ask an expert for help... \ No newline at end of file diff --git a/hmon/hmon_diamond.pl b/hmon/hmon_diamond.pl index 1f08e54..65a539f 100755 --- a/hmon/hmon_diamond.pl +++ b/hmon/hmon_diamond.pl @@ -28,20 +28,45 @@ $plot2->{xmin} = 0.5; $plot2->{xmax} = 6.5; $plot2->{ymin} = 6.5; $plot2->{ymax} = 0.5; +$plot2->{cbmin} = "0"; $plot2->{cbmax} = "100<*"; $plot2->{showvalues} = 1; $plot2->{xlabel} = "column"; $plot2->{ylabel} = "row"; - - HPlot::PlotInit($plot2); +HPlot::PlotInit({ + name => "DiamondProfile", + file => "files/DiamondProfile", + entries => 6, + curves => 2, + type => HPlot::TYPE_HISTORY, + output => HPlot::OUT_PNG, + nokey => 1, + countup => 1, + titles => [""], + xlabel => "Stripe", + ylabel => "Rate [Hz]", + sizex => 350, + sizey => 220, + ymin => 0, + ymax => "100<*", + buffer => 1 + }); + + + + my $str = Hmon::MakeTitle(9, 10, "Diamond Hit Rate"); $str .= qq@
\n@; $str .= Hmon::MakeFooter(); Hmon::WriteFile("DiamondRate",$str); +$str = Hmon::MakeTitle(5, 5, "Diamond Hit Profile"); +$str .= qq@
\n@; +$str .= Hmon::MakeFooter(); +Hmon::WriteFile("DiamondProfile",$str); # Nino 1: FPGA 1, connector 1 @@ -112,6 +137,8 @@ trb_init_ports() or die trb_strerror(); while (1) { + my @sumx; + my @sumy; my $o; foreach my $b (0x5000,0x5002,0x5003) { my $t = trb_register_read_mem($b,0xc000,0,33); @@ -131,12 +158,24 @@ while (1) { for my $x (0..5) { for my $y (0..5) { + $sumx[$x] = ($sumx[$x]||0) + $diff->{$fpga->[$y]->[$x]+0x5000}->[$chan->[$y]->[$x]]; + $sumy[$y] = ($sumy[$y]||0) + $diff->{$fpga->[$y]->[$x]+0x5000}->[$chan->[$y]->[$x]]; + HPlot::PlotFill('DiamondRate',$diff->{$fpga->[$y]->[$x]+0x5000}->[$chan->[$y]->[$x]],$x+1,$y+1); } } HPlot::PlotDraw('DiamondRate'); } + + for my $x (0..5) { + HPlot::PlotFill('DiamondProfile',$sumx[$x],$x,0); + HPlot::PlotFill('DiamondProfile',$sumy[$x],$x,1); + } + + HPlot::PlotDraw('DiamondProfile') if(defined $sumx[3] && $sumx[3] >= 5); + + $old = $o; $oldtime = time(); sleep(1); diff --git a/hmon/hmon_hodo_hist.pl b/hmon/hmon_hodo_hist.pl index e6fead9..e3c2ad8 100755 --- a/hmon/hmon_hodo_hist.pl +++ b/hmon/hmon_hodo_hist.pl @@ -238,10 +238,10 @@ while (1) { $o->{$a} = $t->{$a}; } } - $t = trb_registertime_read(0xfe49,0x8130); + $t = trb_registertime_read(0xfe49,0x8132); if (defined $t) { foreach my $b (keys $t) { - $o2->{$b}->{0x8130} = $t->{$b}; + $o2->{$b}->{0x8132} = $t->{$b}; } } @@ -315,20 +315,20 @@ while (1) { # print $totalstart; if($total > 1000) { - HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3800}->{0x8130}||0)-$offset->{0x3800})/(($totalstart-$offset->{0x8880})||1),0); - HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3801}->{0x8130}||0)-$offset->{0x3801})/(($totalstart-$offset->{0x8880})||1),1); - HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3810}->{0x8130}||0)-$offset->{0x3810})/(($totalstart-$offset->{0x8880})||1),2); - HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3811}->{0x8130}||0)-$offset->{0x3811})/(($totalstart-$offset->{0x8880})||1),3); + HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3800}->{0x8132}||0)-$offset->{0x3800})/(($totalstart-$offset->{0x8880})||1),0); + HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3801}->{0x8132}||0)-$offset->{0x3801})/(($totalstart-$offset->{0x8880})||1),1); + HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3810}->{0x8132}||0)-$offset->{0x3810})/(($totalstart-$offset->{0x8880})||1),2); + HPlot::PlotAdd("HitRatioHist",(($diff2->{0x3811}->{0x8132}||0)-$offset->{0x3811})/(($totalstart-$offset->{0x8880})||1),3); - HPlot::PlotFill("HitRatios",(($diff2->{0x3800}->{0x8130}||0)-$offset->{0x3800})/(($totalstart-$offset->{0x8880})||1),0); - HPlot::PlotFill("HitRatios",(($diff2->{0x3801}->{0x8130}||0)-$offset->{0x3801})/(($totalstart-$offset->{0x8880})||1),1); - HPlot::PlotFill("HitRatios",(($diff2->{0x3810}->{0x8130}||0)-$offset->{0x3810})/(($totalstart-$offset->{0x8880})||1),2); - HPlot::PlotFill("HitRatios",(($diff2->{0x3811}->{0x8130}||0)-$offset->{0x3811})/(($totalstart-$offset->{0x8880})||1),3); + HPlot::PlotFill("HitRatios",(($diff2->{0x3800}->{0x8132}||0)-$offset->{0x3800})/(($totalstart-$offset->{0x8880})||1),0); + HPlot::PlotFill("HitRatios",(($diff2->{0x3801}->{0x8132}||0)-$offset->{0x3801})/(($totalstart-$offset->{0x8880})||1),1); + HPlot::PlotFill("HitRatios",(($diff2->{0x3810}->{0x8132}||0)-$offset->{0x3810})/(($totalstart-$offset->{0x8880})||1),2); + HPlot::PlotFill("HitRatios",(($diff2->{0x3811}->{0x8132}||0)-$offset->{0x3811})/(($totalstart-$offset->{0x8880})||1),3); - $spillsum->{0x3800} += (($diff2->{0x3800}->{0x8130}||0)-$offset->{0x3800})/5; - $spillsum->{0x3801} += (($diff2->{0x3801}->{0x8130}||0)-$offset->{0x3801})/5; - $spillsum->{0x3810} += (($diff2->{0x3810}->{0x8130}||0)-$offset->{0x3810})/5; - $spillsum->{0x3811} += (($diff2->{0x3811}->{0x8130}||0)-$offset->{0x3811})/5; + $spillsum->{0x3800} += (($diff2->{0x3800}->{0x8132}||0)-$offset->{0x3800})/5; + $spillsum->{0x3801} += (($diff2->{0x3801}->{0x8132}||0)-$offset->{0x3801})/5; + $spillsum->{0x3810} += (($diff2->{0x3810}->{0x8132}||0)-$offset->{0x3810})/5; + $spillsum->{0x3811} += (($diff2->{0x3811}->{0x8132}||0)-$offset->{0x3811})/5; $spillsum->{0x8880} += (($totalstart||0)-$offset->{0x8880})/5; $spillsum->{0x8890} += (($total||0)-$offset->{0x8890})/5/2; $spillsum->{0x3000} += $diffe->{0x3000}; @@ -346,12 +346,12 @@ while (1) { $offset->{0x8880} += (($totalstart||0) - $offset->{0x8880})/32; $offset->{0x8890} += (($total||0) - $offset->{0x8890})/32; - $offset->{0x3800} += (($diff2->{0x3800}->{0x8130}) - $offset->{0x3800})/32; - $offset->{0x3801} += (($diff2->{0x3801}->{0x8130}) - $offset->{0x3801})/32; - $offset->{0x3810} += (($diff2->{0x3810}->{0x8130}) - $offset->{0x3810})/32; - $offset->{0x3811} += (($diff2->{0x3811}->{0x8130}) - $offset->{0x3811})/32; + $offset->{0x3800} += (($diff2->{0x3800}->{0x8132}) - $offset->{0x3800})/32; + $offset->{0x3801} += (($diff2->{0x3801}->{0x8132}) - $offset->{0x3801})/32; + $offset->{0x3810} += (($diff2->{0x3810}->{0x8132}) - $offset->{0x3810})/32; + $offset->{0x3811} += (($diff2->{0x3811}->{0x8132}) - $offset->{0x3811})/32; - if($spillsum->{0x3810} != 0) { + if($spillsum->{0x8880} >= 10) { HPlot::PlotAdd('SpillSumHist',$spillsum->{0x3810},0); HPlot::PlotAdd('SpillSumHist',$spillsum->{0x3811},1); HPlot::PlotAdd('SpillSumHist',$spillsum->{0x8880},2); @@ -366,20 +366,21 @@ while (1) { } } - HPlot::PlotAdd('HitSumHist',(($diff2->{0x3800}->{0x8130})||0)-$offset->{0x3800},0); - HPlot::PlotAdd('HitSumHist',(($diff2->{0x3801}->{0x8130})||0)-$offset->{0x3801},1); - HPlot::PlotAdd('HitSumHist',(($diff2->{0x3810}->{0x8130})||0)-$offset->{0x3810},2); - HPlot::PlotAdd('HitSumHist',(($diff2->{0x3811}->{0x8130})||0)-$offset->{0x3811},3); + HPlot::PlotAdd('HitSumHist',(($diff2->{0x3800}->{0x8132})||0)-$offset->{0x3800},0); + HPlot::PlotAdd('HitSumHist',(($diff2->{0x3801}->{0x8132})||0)-$offset->{0x3801},1); + HPlot::PlotAdd('HitSumHist',(($diff2->{0x3810}->{0x8132})||0)-$offset->{0x3810},2); + HPlot::PlotAdd('HitSumHist',(($diff2->{0x3811}->{0x8132})||0)-$offset->{0x3811},3); HPlot::PlotAdd('HitSumHist',(($total||0)-$offset->{0x8890})/2,4); HPlot::PlotAdd('HitSumHist',($totalstart||0)-$offset->{0x8880},5); + #print (((($total||0)-$offset->{0x8890})/2)."\n"); - HPlot::PlotAdd('HitSumHistInner',(($diff2->{0x3810}->{0x8130})||0)-$offset->{0x3810},0); - HPlot::PlotAdd('HitSumHistInner',(($diff2->{0x3811}->{0x8130})||0)-$offset->{0x3811},1); + HPlot::PlotAdd('HitSumHistInner',(($diff2->{0x3810}->{0x8132})||0)-$offset->{0x3810},0); + HPlot::PlotAdd('HitSumHistInner',(($diff2->{0x3811}->{0x8132})||0)-$offset->{0x3811},1); HPlot::PlotAdd('HitSumHistInner',(($total||0)-$offset->{0x8890})/2,2); HPlot::PlotAdd('HitSumHistInner',($totalstart||0)-$offset->{0x8880},3); - HPlot::PlotAdd('HitSumHistInnerShort',(($diff2->{0x3810}->{0x8130})||0)-$offset->{0x3810},0); - HPlot::PlotAdd('HitSumHistInnerShort',(($diff2->{0x3811}->{0x8130})||0)-$offset->{0x3811},1); + HPlot::PlotAdd('HitSumHistInnerShort',(($diff2->{0x3810}->{0x8132})||0)-$offset->{0x3810},0); + HPlot::PlotAdd('HitSumHistInnerShort',(($diff2->{0x3811}->{0x8132})||0)-$offset->{0x3811},1); HPlot::PlotAdd('HitSumHistInnerShort',(($total||0)-$offset->{0x8890})/2,2); HPlot::PlotAdd('HitSumHistInnerShort',($totalstart||0)-$offset->{0x8880},3); diff --git a/hmon/hmon_mdc_temp.pl b/hmon/hmon_mdc_temp.pl index c065f1a..6638e35 100755 --- a/hmon/hmon_mdc_temp.pl +++ b/hmon/hmon_mdc_temp.pl @@ -34,6 +34,7 @@ my $data = Perl2Epics::GetAll(); #print Dumper $data; #print $data->{'TempAlarmEPICS'}->{'val'} . "\n"; +#print $mailerrstatecnt . "\n"; #exit; while (1) { @@ -80,12 +81,14 @@ while (1) { "Max. temperature in each plane of MDC are " . $str); $store = {}; + if($qastate >= QA::ERROR || ( $data->{'TempAlarmEPICS'}->{'val'} > 0 ) ) { - if($mailerrstatecnt++ >= 30) { - Hmon::SendEmail('c.wendisch@gsi.de',"Error: MDC Temperature too high","MDC temperatures are too high: \n$str"); + if($mailerrstatecnt++ >= 15) { + Hmon::SendEmail('j.michel@gsi.de,c.wendisch@gsi.de',"Error: MDC Temperature too high","MDC temperatures are too high: +\n$str"); $mailerrstatecnt = 0; } } - + sleep 20; } diff --git a/hmon/hmon_nxyter_status.pl b/hmon/hmon_nxyter_status.pl index 5e2ff60..ef54cc5 100755 --- a/hmon/hmon_nxyter_status.pl +++ b/hmon/hmon_nxyter_status.pl @@ -11,25 +11,34 @@ my $flog = QA::OpenQAFile(); trb_init_ports() or die trb_strerror(); +my $reset_timeout_threshold = 45; +my $reset_busy_timeout_ctr = 0; + while (1) { # Default Output Values my $title = "NX Status"; my $shorttext = ""; - my $longtext = "Status of all Nxyter FEBs -- "; + my $longtext = "Status of all Nxyter FEBs:"; my $status = QA::OK; # Read Status Register of all Nxyter my $rh_status = trb_register_read(0xfe49, 0x810c) or sleep $SLEEP_TIME and next; + my $rh_reset = trb_register_read(0xfe49, 0x8501) + or sleep $SLEEP_TIME and next; - my $status_receiver_ctr = 0; - my $status_validate_ctr = 0; + my $status_receiver_ctr = 0; + my $status_validate_ctr = 0; my $status_evtbuffer_ctr = 0; + my $status_offline_ctr = 0; + my $status_reset_ctr = 0; my $status_receiver = "DataReceiver: "; my $status_validate = "DataValidate: "; my $status_evtbuffer = "EventBuffer: "; - + my $status_offline = "Offline: "; + my $status_reset = "ResetBusy: "; + foreach my $board (sort {$a <=> $b} keys %$rh_status) { if (($rh_status->{$board} & 0x01) != 0) { $status_receiver = $status_receiver . @@ -46,21 +55,50 @@ while (1) { sprintf " 0x%04x", $board; $status_evtbuffer_ctr++; } + if (($rh_status->{$board} & 0x08) != 0) { + $status_offline = $status_offline . + sprintf " 0x%04x", $board; + $status_offline_ctr++; + } + } + + #$rh_reset->{0x3801} = 1; + foreach my $board (sort {$a <=> $b} keys %$rh_reset) { + if (($rh_reset->{$board} & 0x01) != 0) { + $status_reset = $status_reset . + sprintf " 0x%04x", $board; + $status_reset_ctr++; + } } + # Reset Busy Timeout Counter + if ($status_reset_ctr > 0) { + $reset_busy_timeout_ctr++; + } else { + $reset_busy_timeout_ctr = 0; + } + # Create Output Messages if (($status_receiver_ctr > 0) || ($status_evtbuffer_ctr > 0) ) { $status = QA::FATAL; - } elsif ($status_validate_ctr > 0) { + } elsif ($status_offline_ctr > 0) { + $status = QA::ERROR; + } elsif (($status_validate_ctr > 0) || + (($status_reset_ctr > 0) && ($reset_busy_timeout_ctr > $reset_timeout_threshold))) { + $status = QA::WARN; + } elsif ($status_reset_ctr > 0) { $status = QA::NOTE; } if ($status != QA::OK) { - $shorttext = "R:${status_receiver_ctr} V:${status_validate_ctr} E:${status_evtbuffer_ctr}"; - $longtext = $longtext . " ${status_receiver} -- ${status_validate} -- ${status_evtbuffer} "; + $shorttext = "${status_offline_ctr}/${status_receiver_ctr}/${status_validate_ctr}/${status_evtbuffer_ctr}/${status_reset_ctr}/$reset_busy_timeout_ctr"; + $longtext = $longtext . "
${status_offline} -- ${status_reset} -- ${status_receiver} -- ${status_validate} -- ${status_evtbuffer} "; + if ($reset_busy_timeout_ctr > $reset_timeout_threshold) { + $longtext = $longtext . "

------------ PRESS NxyterRescue BUTTON ----------------- " + } } else { $shorttext = "OK"; - $longtext = $longtext . "all is fine"; + $longtext = $longtext . " all is fine"; } QA::WriteQALog($flog, "pion", "nxstatus", $SLEEP_TIME * 2, diff --git a/hmon/hmon_pionseu.pl b/hmon/hmon_pionseu.pl new file mode 100755 index 0000000..32e171a --- /dev/null +++ b/hmon/hmon_pionseu.pl @@ -0,0 +1,31 @@ +#!/usr/bin/perl -w + +use warnings; +use Time::HiRes qw(usleep); +use strict; +use Data::Dumper; +use Hmon; +use QA; +use HADES::TrbNet; + + +trb_init_ports() or die trb_strerror(); + +my $fqa = QA::OpenQAFile(); + +my $lasterrors = 0; + +while(1) { + my $s = trb_register_read(0xfe49,0xd501); + my $errors = 0; + foreach my $b (keys %{$s}) { + $errors += ($s->{$b}&0xFF000000)>>24; + } + + my $state = QA::OK; + if( $errors-$lasterrors > 2) {$state = QA::NOTE;} + QA::WriteQALog($fqa, "pion", "seu", 20, + $state, 'Pion SED', $errors-$lasterrors, "Number of SEU errors (debugging only!): $errors
During last 5 seconds: ".($errors-$lasterrors) ); + $lasterrors = $errors; + sleep(5); + } \ No newline at end of file diff --git a/hmon/hmon_rate2.pl b/hmon/hmon_rate2.pl index 1c0002c..92fecf2 100755 --- a/hmon/hmon_rate2.pl +++ b/hmon/hmon_rate2.pl @@ -14,6 +14,7 @@ my $flog = Hmon::OpenLogfile(); my $fqa = QA::OpenQAFile(); my $offset; +my $starterrorcnt = 0; sub getCorrected { my ($val,$cor) = @_; @@ -162,6 +163,17 @@ while (1) { $state = QA::OK; $shorttext = QA::SciNotation($store{0xa009})." / ".getCorrected($store{0xa009},$offset->{0xa009}); $longtext = sprintf("Trigger Rate from Start: %i Hz / %i Hz after offset correction",$store{0xa009}, getCorrectedValue($store{0xa009},$offset->{0xa009})); + if(getCorrectedValue($store{0xa009},$offset->{0xa009}) < 100 && + getCorrectedValue($store{0xa029},$offset->{0xa029}) > 10000) { + $starterrorcnt+=3; + if($starterrorcnt >= 15) { + $state = QA::ERROR; + $longtext .= "
Something seems to be wrong with the trigger signal from Start"; + } + } + else { + $starterrorcnt = max($starterrorcnt-1,0); + } QA::WriteQALog($fqa, "rate", "start", 10, $state, 'Start Rate', $shorttext, $longtext); diff --git a/hmon/hmon_spill.pl b/hmon/hmon_spill.pl index 021a857..18d1531 100755 --- a/hmon/hmon_spill.pl +++ b/hmon/hmon_spill.pl @@ -8,6 +8,7 @@ use Hmon; use QA; use HADES::TrbNet; use HPlot; +use Perl2Epics; my $lastspill = 1; my $evtrate = 0; @@ -20,7 +21,8 @@ my @spills; my $spillavgshort = 0; my $spillavglong = 0; my $errtime = 0; - +my $lastspillcount = 0; +my $countnochange = 0; my $plot = (); $plot->{name} = "EvtsPerSpill"; @@ -45,12 +47,19 @@ my $fqa = QA::OpenQAFile() or die "No connection to QA Logfile"; trb_init_ports() or die trb_strerror(); +Perl2Epics::Connect("prefix", "HAD:eb01:prefix",'DBR_TIME_STRING'); + while (1) { my $trbneterr = 0; my $rh_result = trb_register_read(QA::CTSAddress, 0xa002) or $trbneterr = 1; #sleep 5 and next; my $stopped = trb_register_read(0x3,0xa0c0) or sleep 5 and next; $stopped = ($stopped->{3} || 0) & 0x400; + my $sc = trb_register_read(0x3830,0xc00d); + my $spillcount = $sc->{0x3830} & 0x00ffffff; + my $inspill = ($sc->{0x3830} & 0x80000000) >> 31; + my $data = Perl2Epics::GetAll(); + $lastspill = $outofspill; $outofspill = ($rh_result->{QA::CTSAddress} || 0) & 0x10; $spilllength++ ; #if($outofspill); @@ -104,11 +113,19 @@ while (1) { $events = 0; $spilllength = 0; } elsif ($spilllength > 20) { - QA::WriteQALog($fqa, "trg", "spill", 30, QA::NOTE, "Spill Sum", + QA::WriteQALog($fqa, "trg", "spill", 30, QA::NOTE, "Spill Sum", "No Spills", "No Spills detected at the moment"); if($spilllength > 30 && !($spilllength%30)) { - Hmon::Speak('nobeam', "No beam") + if($data->{'prefix'}->{val} eq 'be') { + Hmon::Speak('nobeam', "No beam"); + } +# elsif($data->{'prefix'}->{val} eq 'co') { +# Hmon::Speak('nobeam', "No beam, but cosmics are there anyways."); +# } +# else { +# Hmon::Speak('nobeam', "No beam, but nobody cares because test files are written."); +# } } } @@ -132,6 +149,17 @@ while (1) { QA::WriteQALog($fqa, "main", "rate", 5, $qastate, "Current Rate", $qashort, $qalong); + my $spillcountstate = QA::OK; + if ($countnochange > 15) {$spillcountstate = QA::WARN;} + QA::WriteQALog($fqa, "daq", "spillcount", 5, $spillcountstate, "Spill Count", + $spillcount,"Number of spills: $spillcount" ); + if($lastspillcount == $spillcount) { + $countnochange++; + } + else { + $countnochange = 0; + } + $lastspillcount = $spillcount; $lastres = $res; usleep(500000); } else { diff --git a/hmon/index.cgi b/hmon/index.cgi index fc69823..68cfe9a 100755 --- a/hmon/index.cgi +++ b/hmon/index.cgi @@ -55,6 +55,7 @@ function openwin(url) {

  • ADC values on Pion 1
  • ADC values on Pion 2
  • Pion Power & Cooling
  • +
  • Rate on the Diamond
  • Spill Shape from Hodoscope
  • Rate on Hodoscope (heatmap)
  • Rate on Hodoscope (curve)
  • diff --git a/hmon/permanent/hmon_archiver.pl b/hmon/permanent/hmon_archiver.pl old mode 100644 new mode 100755 diff --git a/hmon/permanent/hmon_magnet.pl b/hmon/permanent/hmon_magnet.pl index da501fd..4f316f2 100755 --- a/hmon/permanent/hmon_magnet.pl +++ b/hmon/permanent/hmon_magnet.pl @@ -9,7 +9,7 @@ use QA; use Getopt::Long; use Data::Dumper; -my $magnet_on = 0; +my $magnet_on = 1; my %range_list = ( 'Time' => {}, @@ -57,7 +57,7 @@ my %range_list = ( 'PI1600' => {'min' => 2.94 , 'max' =>2.97 }, 'PI1602' => {'min' => 1.30 , 'max' =>1.37 }, 'PI1604' => {'min' => 2.7 , 'max' =>2.99 }, - 'EV1100R' => {'min' => 27 , 'max' =>36 }, + 'EV1100R' => {'min' => 27 , 'max' =>45 }, 'EV1122R' => {'min' => 55 , 'max' =>61 }, 'EV1128R' => {'min' => 73 , 'max' =>81 }, 'TC1200M' => {'min' => 6.5 , 'max' =>8.5 }, diff --git a/hmon/permanent/hmon_mdchv.pl b/hmon/permanent/hmon_mdchv.pl index aa859ae..73f0671 100755 --- a/hmon/permanent/hmon_mdchv.pl +++ b/hmon/permanent/hmon_mdchv.pl @@ -106,8 +106,8 @@ while(1) { my $tc = strftime("%H:%M:%S",localtime($data->{"$i-$s-$v-I"}->{tme} || 0)); $volt = -1 unless defined $volt; $curr = -1 unless defined $curr; - HPlot::PlotAdd("P".($i-1).(($v)?'F':'C')."I",$curr,$s-1); - HPlot::PlotAdd("P".($i-1).(($v)?'F':'C')."V",$volt,$s-1); + HPlot::PlotAdd("P".($i-1).(($v)?'C':'F')."I",$curr,$s-1); + HPlot::PlotAdd("P".($i-1).(($v)?'C':'F')."V",$volt,$s-1); my $tmp .= sprintf(" %4i V | %2.2f uA",$volt,$curr); $tmp =~ s/\s/ /gi; $str .= "".$tmp; @@ -157,7 +157,8 @@ while(1) { my $value = sprintf("%.1f/%.1f/%.1f/%.1f",$mdcHvMin[1]/1000.,$mdcHvMin[2]/1000.,$mdcHvMin[3]/1000.,$mdcHvMin[4]/1000.); my $longtext = "MDC high voltage in all four planes". "
    Minimum [V]: ".$mdcHvMin[1]." / ".$mdcHvMin[2]." / ".$mdcHvMin[3]." / ".$mdcHvMin[4]. - "
    Maximum [V]: ".$mdcHvMax[1]." / ".$mdcHvMax[2]." / ".$mdcHvMax[3]." / ".$mdcHvMax[4]; + "
    Minimum [V]: ".$mdcHvMin[1]." / ".$mdcHvMin[2]." / ".$mdcHvMin[3]." / ".$mdcHvMin[4]. + "
    Nominal [V]: ".$QA::MdcNominalHV[0]." / ".$QA::MdcNominalHV[1]." / ".$QA::MdcNominalHV[2]." / ".$QA::MdcNominalHV[3]; QA::WriteQALog($flog,"other","mdcinvalid",10,$qastate,"MDC HV",$value,$longtext); $timer++; sleep(1); diff --git a/hmon/permanent/hmon_pionlv.pl b/hmon/permanent/hmon_pionlv.pl old mode 100644 new mode 100755 diff --git a/hmon/permanent/hmon_richhv.pl b/hmon/permanent/hmon_richhv.pl index 90d8fb8..71f7ab9 100755 --- a/hmon/permanent/hmon_richhv.pl +++ b/hmon/permanent/hmon_richhv.pl @@ -6,6 +6,7 @@ use POSIX qw(strftime); use FileHandle; use Data::Dumper; use POSIX qw/floor ceil/; +use List::Util qw/min max/; use Hmon; use QA; use Perl2Epics; @@ -28,8 +29,8 @@ my $plot = { sizey => 260, curves => 6, xscale => 4, + storable=> 1, colors => ["#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd"]}; -$plot->{storable}= 1; HPlot::PlotInit($plot); my $plot2 = { @@ -45,8 +46,8 @@ my $plot2 = { sizey => 260, curves => 6, xscale => 30, + storable=> 1, colors => ["#333333","#00ff00","#ff0000","#0000ff","#dddd00","#dd00dd"]}; -$plot2->{storable}= 1; HPlot::PlotInit($plot2); @@ -75,10 +76,14 @@ my $overcurrent_alarm_flag = 0; my $current_average = 0; my $current_sum = 0; +my $errortimer = 0; + # Only if the current is larger than OVERCURRENT_PERIOD, the alarm will set off. while(1) { + my $min = 1E5; + my $max = 0; my $data = Perl2Epics::GetAll(); $str = Hmon::MakeTitle(12, 13, "RICH HV currents", 1, ""); $str .= "\n"; @@ -90,6 +95,8 @@ while(1) { $str .= "
    Volt."; for(my $v = 1; $v<=6; $v++) { $str .= sprintf(" %i V\n",$data->{"U$v"}->{val} || -1); + $min = min($min,$data->{"U$v"}->{val}||1E6); + $max = max($max,$data->{"U$v"}->{val}||0); } $str .= "
    \n"; $str .= qq@\n@; @@ -110,18 +117,28 @@ while(1) { my $value = ""; my $longtext = ""; + if($min < 2200) { + $qastate = QA::WARN; + $errortimer++; + } + else { + $errortimer = 0; + } + if($errortimer >= 800) { + $qastate = QA::ERROR; + if (!($errortimer%200)) { + Hmon::Speak('richhv', "Rich high voltage error"); + } + } + if( $timer % (4*$OVERCURRENT_period) == 0) { - $value = sprintf("%i nA",$current_average); + $value = sprintf("%.2f / %.2f kV",$min/1000,$max/1000); $longtext = sprintf("Averaged current in RICH HV: %i uA",$current_average); + $longtext.= sprintf("
    HV settings: %i, %i, %i, %i, %i, %i V", $data->{"U1"}->{val}, $data->{"U2"}->{val}, + $data->{"U3"}->{val}, $data->{"U4"}->{val}, + $data->{"U5"}->{val}, $data->{"U6"}->{val}); #print "current_average: $current_average, sum: $current_sum\n"; - if($current_average > $OVERCURRENT_RED) { - $longtext = "RICH overcurrent, please stop the beam request immediately and call the operators!\n"; - $qastate = QA::WARN; - } - elsif ($current_average > $OVERCURRENT_YELLOW) { - $longtext = "RICH overcurrent yellow, please watch the beam intensity and be alert to remove the beam request!\n"; - $qastate = QA::WARN_2; - } + $current_sum = 0; QA::WriteQALog($flog,"other","rich",30,$qastate,"RICH HV",$value,$longtext); } diff --git a/hmon/permanent/hmon_sequencer.pl b/hmon/permanent/hmon_sequencer.pl index 914abca..2836b19 100755 --- a/hmon/permanent/hmon_sequencer.pl +++ b/hmon/permanent/hmon_sequencer.pl @@ -10,6 +10,7 @@ use List::Util qw(min max); use Perl2Epics; my @names; +my $errorcounter; my @variables = qw( HAD:TOFHV:G1:status:alive:roc:average @@ -123,7 +124,16 @@ while(1) { $longtxt = "All sequencers running" if $longtxt eq ""; my $value = ((scalar @names)-$count)."/".(scalar @names); QA::WriteQALog($flog,"other","sequencer",20,$qastate,"HV Sequencer",$value,$longtxt); - + if($qastate == QA::FATAL) { + if(!($errorcounter%15)){ + Hmon::Speak('nobeam', "High Voltage Control is not working"); + } + $errorcounter++; + } + else { + $errorcounter = 0; + } + sleep(10); } diff --git a/hmon/start.sh b/hmon/start.sh index c6625ba..c1e0f04 100755 --- a/hmon/start.sh +++ b/hmon/start.sh @@ -31,7 +31,7 @@ mkdir `pwd`/pion DISPLAY=:0 ssh -f -X lxhadeb06 "ping -i 100 lxhadesdaqp" &>/dev/null & sshfs -o allow_other hades-qa@lxhadeb06:/home/hades-qa/online/jun14/pics/vertex `pwd`/vertex -sshfs -o allow_other hades-qa@lxhadeb06:/home/hades-qa/online/jun14/pics `pwd`/qa +sshfs -o allow_other hades-qa@lxhadeb06:/home/hades-qa/online/aug14/pics `pwd`/qa sshfs -o allow_other hadaq@lxhadeb06:/data01/tmp/ `pwd`/pion