From: hadaq@countinghouse Date: Fri, 13 Jun 2014 16:14:54 +0000 (+0200) Subject: update to mdc hv plots X-Git-Tag: pre2018~79 X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=18a046d7243363cf5377e7b6d7b7f743b94740f2;p=hadesdaq.git update to mdc hv plots --- diff --git a/hmon/QA.pm b/hmon/QA.pm index 9e22721..4932e6f 100644 --- a/hmon/QA.pm +++ b/hmon/QA.pm @@ -94,7 +94,7 @@ use constant {CTSAddress => 0x0003}; # Missing Boards ############################################################################### -our @mdc_boards_removed =(); +# our @mdc_boards_removed =(0x2233,0x2257); our @mdc_chambers_removed =(); our @rich_boards_removed =(); our @tof_boards_removed =(); diff --git a/hmon/hmon_mdchv_plottemplate.pl b/hmon/hmon_mdchv_plottemplate.pl index e79a004..04c0871 100755 --- a/hmon/hmon_mdchv_plottemplate.pl +++ b/hmon/hmon_mdchv_plottemplate.pl @@ -4,78 +4,93 @@ use warnings; use POSIX qw(strftime); use Hmon; - - -my $title = qq$ - - - - - - Hmon MDC HV Trends - - -
-

Hmon MDC HV Trends

-
-
- $; - -my $foot = qq$ - - - $; - -my $out = $title; +# +# +# my $title = qq$ +# +# +# +# +# +# Hmon MDC HV Trends +# +# +#
+#

Hmon MDC HV Trends

+#
+#
+# $; +# +# my $foot = qq$ +# +# +# $; +# +# my $out = $title; +# +# foreach my $i (0..3) { +# $out .= "

Plane ".($i+1)."

"; +# $out .= qq%
%; +# # $out .= qq%Sector 2

%; +# # $out .= qq%Sector 3

%; +# # $out .= qq%Sector 4

%; +# # $out .= qq%Sector 5

%; +# # $out .= qq%Sector 6

%; +# } +# +# my $fh; +# open ($fh,"> ".Hmon::HMONDIR."/files/MDCHVvoltagetrends.htm") or die; +# print $fh $out; +# close $fh; +# +# +# +# $title = qq$ +# +# +# +# +# +# Hmon MDC HV Current Trends +# +# +#
+#

Hmon MDC HV Current Trends

+#
+#
+# $; +# +# $foot = qq$ +# +# +# $; +# +# $out = $title; +# +# foreach my $i (0..3) { +# $out .= "

Plane ".($i+1)."

"; +# $out .= qq%
%; +# } +# +# open ($fh,"> ".Hmon::HMONDIR."/files/MDCHVcurrenttrends.htm") or die; +# print $fh $out; +# close $fh; foreach my $i (0..3) { + my $out = Hmon::MakeTitle(11, 19, "MDC High Voltage "); $out .= "

Plane ".($i+1)."

"; - $out .= qq%
%; -# $out .= qq%Sector 2

%; -# $out .= qq%Sector 3

%; -# $out .= qq%Sector 4

%; -# $out .= qq%Sector 5

%; -# $out .= qq%Sector 6

%; + $out .= qq%
%; + $out .= Hmon::MakeFooter(); + Hmon::WriteFile("mdchvV$i",$out); } -my $fh; -open ($fh,"> ".Hmon::HMONDIR."/files/MDCHVvoltagetrends.htm") or die; -print $fh $out; -close $fh; - - - -$title = qq$ - - - - - - Hmon MDC HV Current Trends - - -
-

Hmon MDC HV Current Trends

-
-
-$; - - $foot = qq$ - - - $; - - $out = $title; - foreach my $i (0..3) { + my $out = Hmon::MakeTitle(11, 19, "MDC High Voltage Current"); $out .= "

Plane ".($i+1)."

"; - $out .= qq%
%; + $out .= qq%
%; + $out .= Hmon::MakeFooter(); + Hmon::WriteFile("mdchvC$i",$out); } - -open ($fh,"> ".Hmon::HMONDIR."/files/MDCHVcurrenttrends.htm") or die; -print $fh $out; -close $fh; - - + \ No newline at end of file diff --git a/hmon/index.cgi b/hmon/index.cgi index 4174278..784be41 100755 --- a/hmon/index.cgi +++ b/hmon/index.cgi @@ -81,21 +81,21 @@ function openwin(url) { - $str .= Hmon::MakeFooter(); - if(!($timer%2)) { + if(!($timer%1)) { Hmon::WriteFile("MDCHV", $str); } - if(!($timer%6)) { + if(!($timer%3)) { foreach my $s (0..1){ foreach my $p (0..3) { HPlot::PlotDraw("P".$p.($s?'C':'F')."I"); @@ -122,5 +123,5 @@ while(1) { } } $timer++; - sleep(5); + sleep(1); } diff --git a/hmon/permanent/hmon_mdcpressure.pl b/hmon/permanent/hmon_mdcpressure.pl index 8b69663..8a4e5be 100755 --- a/hmon/permanent/hmon_mdcpressure.pl +++ b/hmon/permanent/hmon_mdcpressure.pl @@ -12,8 +12,10 @@ use Perl2Epics; use HPlot; -my @names = qw( reflowPressureAthm reflowPressureCompr reflowInO2 reflowRatioCO2 opensysFreshARGON opensysFreshCO2 reflowFreshArgon reflowFreshIsob pipePressureIsoB ); +my @names = qw( reflowPressureAthm reflowPressureCompr reflowInO2 reflowRatioIsob opensysFreshARGON opensysFreshCO2 reflowFreshArgon reflowFreshIsob pipePressureIsoB ); +my @namesLABEL = qw( AtmosphericPressure reflowPressureCompressor reflow_O2_concentration reflow_Isobutane_fraction planeI_argon planeI_CO2 reflowFreshArgon reflowFreshIsobutane pipePressureIsobutane ); my @names2 = qw(waage_1_net waage_2_net); +my @names2LABEL = qw(Scale_1 Scale_2); my @names3 = qw(targetVakPressure); my $plot = (); @@ -30,6 +32,7 @@ $plot->{sizey} = 220; $plot->{ymin} = 950; $plot->{ymax} = 1050; $plot->{nokey} = 1; +$plot->{buffer} = 1; HPlot::PlotInit($plot); @@ -47,8 +50,75 @@ $plot2->{sizex} = 630; $plot2->{sizey} = 220; $plot2->{nokey} = 0; $plot2->{curves} = 2; +$plot2->{buffer} = 1; HPlot::PlotInit($plot2); +my $plotPrePlane1 = (); +$plotPrePlane1->{name} = "MdcPressurePlane1"; +$plotPrePlane1->{file} = "files/MdcPressurePlane1"; +$plotPrePlane1->{entries} = 720; +$plotPrePlane1->{type} = HPlot::TYPE_HISTORY; +$plotPrePlane1->{output} = HPlot::OUT_PNG; +$plotPrePlane1->{titles}->[0] = "sector 1"; +$plotPrePlane1->{titles}->[1] = "sector 2"; +$plotPrePlane1->{titles}->[2] = "sector 3"; +$plotPrePlane1->{titles}->[3] = "sector 4"; +$plotPrePlane1->{titles}->[4] = "sector 5"; +$plotPrePlane1->{titles}->[5] = "sector 6"; +$plotPrePlane1->{xlabel} = "Minutes"; +$plotPrePlane1->{ylabel} = "Pa"; +$plotPrePlane1->{sizex} = 630; +$plotPrePlane1->{sizey} = 220; +$plotPrePlane1->{nokey} = 0; +$plotPrePlane1->{curves} = 6; +$plotPrePlane1->{buffer} = 1; +$plotPrePlane1->{xscale}; +HPlot::PlotInit($plotPrePlane1); + +my $plotPrePlane2 = (); +$plotPrePlane2->{name} = "MdcPressurePlane2"; +$plotPrePlane2->{file} = "files/MdcPressurePlane2"; +$plotPrePlane2->{entries} = 720; +$plotPrePlane2->{type} = HPlot::TYPE_HISTORY; +$plotPrePlane2->{output} = HPlot::OUT_PNG; +$plotPrePlane2->{titles}->[0] = "sector 1"; +$plotPrePlane2->{titles}->[1] = "sector 2"; +$plotPrePlane2->{titles}->[2] = "sector 3"; +$plotPrePlane2->{titles}->[3] = "sector 4"; +$plotPrePlane2->{titles}->[4] = "sector 5"; +$plotPrePlane2->{titles}->[5] = "sector 6"; +$plotPrePlane2->{xlabel} = "Minutes"; +$plotPrePlane2->{ylabel} = "Pa"; +$plotPrePlane2->{sizex} = 630; +$plotPrePlane2->{sizey} = 220; +$plotPrePlane2->{nokey} = 0; +$plotPrePlane2->{curves} = 6; +$plotPrePlane2->{buffer} = 1; +HPlot::PlotInit($plotPrePlane2); + + +my $plotPrePlane3 = (); +$plotPrePlane3->{name} = "MdcPressurePlane3"; +$plotPrePlane3->{file} = "files/MdcPressurePlane3"; +$plotPrePlane3->{entries} = 720; +$plotPrePlane3->{type} = HPlot::TYPE_HISTORY; +$plotPrePlane3->{output} = HPlot::OUT_PNG; +$plotPrePlane3->{titles}->[0] = "sector 1"; +$plotPrePlane3->{titles}->[1] = "sector 2"; +$plotPrePlane3->{titles}->[2] = "sector 3"; +$plotPrePlane3->{titles}->[3] = "sector 4"; +$plotPrePlane3->{titles}->[4] = "sector 5"; +$plotPrePlane3->{titles}->[5] = "sector 6"; +$plotPrePlane3->{xlabel} = "Minutes"; +$plotPrePlane3->{ylabel} = "Pa"; +$plotPrePlane3->{sizex} = 630; +$plotPrePlane3->{sizey} = 220; +$plotPrePlane3->{nokey} = 0; +$plotPrePlane3->{curves} = 6; +$plotPrePlane3->{buffer} = 1; +HPlot::PlotInit($plotPrePlane3); + + my $str = Hmon::MakeTitle(8,5,"Atmospheric Pressure",0); $str .= qq@@; $str .= Hmon::MakeFooter(); @@ -59,7 +129,22 @@ $str .= qq@@; $str .= Hmon::MakeFooter(); Hmon::WriteFile("MdcScales",$str); - +$str = Hmon::MakeTitle(8,5,"Mdc differential Pressure Plane1",0); +$str .= qq@@; +$str .= Hmon::MakeFooter(); +Hmon::WriteFile("MdcPressurePlane1",$str); + +$str = Hmon::MakeTitle(8,5,"Mdc differential Pressure Plane2",0); +$str .= qq@@; +$str .= Hmon::MakeFooter(); +Hmon::WriteFile("MdcPressurePlane2",$str); + +$str = Hmon::MakeTitle(8,5,"Mdc differential Pressure Plane3",0); +$str .= qq@@; +$str .= Hmon::MakeFooter(); +Hmon::WriteFile("MdcPressurePlane3",$str); + + my $timer = 0; @@ -85,10 +170,10 @@ print "Connected.\n"; while(1) { my $data = Perl2Epics::GetAll(); - $str = Hmon::MakeTitle(8, 18, "MDC Gas Pressure", 1, ""); - $str .= "

p_Delta

\n"; + $str = Hmon::MakeTitle(8, 28, "MDC Gas Pressure", 1, ""); + $str .= "

Chamber differential pressure [Pa]

\n"; $str .= "\n"; #
- $str .= "
123456\n"; + $str .= "
plane/sector123456\n"; for(my $i = 1; $i<=3; $i++) { $str .= "
$i"; for(my $v = 1; $v<=6; $v++) { @@ -99,17 +184,28 @@ while(1) { $str .= "

Gas System

\n"; $str .= "\n"; foreach my $i (0.. (scalar @names)-1) { - $str .= sprintf("
%s%.2f\n",$names[$i],$data->{$names[$i]}->{val} || -1); + $str .= sprintf("
%s%.2f\n",$namesLABEL[$i],$data->{$names[$i]}->{val} || -1); } + $str .= "
\n"; + foreach my $i (0.. (scalar @names2)-1) { + $str .= sprintf("
%s%.2f\n",$names2LABEL[$i],$data->{$names2[$i]}->{val} || -1); + } + $str .= "
\n"; foreach my $i (0.. (scalar @names3)-1) { $str .= sprintf("
%s%.2f\n",$names3[$i],$data->{$names3[$i]}->{val} || -1); } - foreach my $i (0.. (scalar @names2)-1) { - $str .= sprintf("
%s%.2f\n",$names2[$i],$data->{$names2[$i]}->{val} || -1); - } $str .= "
\n"; + $str .= "
Chamber differential pressure
\n"; + $str .= "Plane 1
\n"; + $str .= qq@\n@; + $str .= "
Plane 2
\n"; + $str .= qq@\n@; + $str .= "
Plane 3
\n"; + $str .= qq@\n@; + $str .= "

Isobutane scales

\n"; $str .= qq@\n@; $str .= "
\n"; + $str .= "

Atmospheric Pressure

\n"; $str .= qq@\n@; $str .= Hmon::MakeFooter(); @@ -122,11 +218,21 @@ while(1) { } - if(!($timer++%6)) { + if(!($timer%6)) { HPlot::PlotAdd("AtmosPress",$data->{reflowPressureAthm}->{val}); HPlot::PlotDraw("AtmosPress"); } + if(!($timer%6)) { + for(my $i = 1; $i<=3; $i++) { + for(my $j = 1; $j<=6; $j++) { + HPlot::PlotAdd("MdcPressurePlane$i",$data->{"p$i$j"}->{val},$j); + HPlot::PlotDraw("MdcPressurePlane$i"); + } + } + } + + $timer++; sleep(10); }