From: www@jspc55 Date: Fri, 31 Jan 2014 13:39:03 +0000 (+0100) Subject: progress on adc monitor plotting system X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=fe3304348255cb8caef191c5d0144ccd154caaec;p=mvdsensorcontrol.git progress on adc monitor plotting system --- diff --git a/layout/adcmon.css b/layout/adcmon.css index e259f60..7228c59 100644 --- a/layout/adcmon.css +++ b/layout/adcmon.css @@ -49,4 +49,13 @@ z-index: +1; } #plotAreaBg { -} \ No newline at end of file +} + +div.header { + font-size:13pt; + position:absolute; + top:-22px; + color:#444; + z-index:-2; + + } diff --git a/tools/HPlot.pm b/tools/HPlot.pm deleted file mode 120000 index 7a86abf..0000000 --- a/tools/HPlot.pm +++ /dev/null @@ -1 +0,0 @@ -../../daqtools/web/htdocs/commands/HPlot.pm \ No newline at end of file diff --git a/tools/HPlot.pm b/tools/HPlot.pm new file mode 100644 index 0000000..437f382 --- /dev/null +++ b/tools/HPlot.pm @@ -0,0 +1,160 @@ +package HPlot; +use POSIX qw/floor ceil strftime/; +use Data::Dumper; +use warnings; +use strict; +use FileHandle; + +my $p; + +use constant {TYPE_HISTORY => 1}; + +use constant {OUT_PNG => 1, + OUT_SVG => 2, #n/a + OUT_SCREEN => 3}; #n/a + +my @color= ('#2222dd','#dd2222','#22dd22','#dd8822','#dd22dd','#22dddd'); + +sub plot_write { + my ($file,$str,$no) = @_; + return unless $str; + if($no || 0) { + print $file $str; + } + else { + print $file $str."\n"; + } + } + + +sub makeTimeString{ + return strftime("set label 100 \"%H:%M:%S\" at screen 0.02,0.02 left tc rgb \"#000044\" font \"monospace,8\"\n", localtime()) + } + + +sub PlotInit { + my ($c) = @_; + + my $name = $c->{name}; + + my $fn = "gnuplot"; + my $fh = new FileHandle ("|$fn") or die "error: no gnuplot"; + $fh->autoflush(1); + + + + $p->{$name} = $c; + $p->{$name}->{fh} = $fh; + $p->{$name}->{run} = 0; + $p->{$name}->{sizex} = $p->{$name}->{sizex} || 600 ; + $p->{$name}->{sizey} = $p->{$name}->{sizey} || 400 ; + $p->{$name}->{file} = $p->{$name}->{file} || "dummy" ; + $p->{$name}->{curves} = $p->{$name}->{curves} || 1 ; + $p->{$name}->{xscale} = $p->{$name}->{xscale} || 1; + $p->{$name}->{type} or die "No plot type specified"; + $p->{$name}->{output} or die "No destination specified"; + + @color = @{$p->{$name}->{colors}} if($p->{$name}->{colors}); + + foreach my $i (0..($c->{entries}-1)) { + for my $j (0..($c->{curves}-1)) { + push(@{$p->{$name}->{value}->[$j]},"NaN") ; + } + } + + if($p->{$name}->{output} == OUT_PNG) { + $p->{$name}->{file} or die "No filename specified"; + plot_write($fh,"set term png size ".$p->{$name}->{sizex}.",".$p->{$name}->{sizey}." font \"monospace,8\""); + plot_write($fh,"set out \"".$p->{$name}->{file}.".png\""); + } + elsif($p->{$name}->{output} == OUT_SCREEN) { + plot_write($fh,"set term x11 size ".$p->{$name}->{sizex}.",".$p->{$name}->{sizey}); + } + else { + die "Output mode not supported yet"; + } + + if ($p->{$name}->{nokey}) { + plot_write($fh,"unset key"); + } + + plot_write($fh,"set datafile missing \"NaN\""); + plot_write($fh,"set xlabel \"".$p->{$name}->{xlabel}."\"") if $p->{$name}->{xlabel}; + plot_write($fh,"set ylabel \"".$p->{$name}->{ylabel}."\"") if $p->{$name}->{ylabel}; + + if(defined $p->{$name}->{ymin} && defined $p->{$name}->{ymax}) { + plot_write($fh,"set yrange [".$p->{$name}->{ymin}.":".$p->{$name}->{ymax}."]"); + } + elsif(defined $p->{$name}->{ymax}) { + plot_write($fh,"set yrange [:".$p->{$name}->{ymax}."]"); + } + elsif(defined $p->{$name}->{ymin}) { + plot_write($fh,"set yrange [".$p->{$name}->{ymin}.":]"); + } + + if($p->{$name}->{type} == TYPE_HISTORY) { + if($p->{$name}->{fill}) { + plot_write($fh,"set style fill solid 1.00"); + } + else { + plot_write($fh,"set style fill solid 0"); + } + plot_write($fh,"set boxwidth 2 absolute"); + plot_write($fh,"set autoscale fix"); + plot_write($fh,"set xtics autofreq"); #$p->{$name}->{entries} + plot_write($fh,"set grid"); +# plot_write($fh,"set style fill solid 1.0"); + plot_write($fh,"plot ",1); + for(my $j=0; $j<$p->{$name}->{curves};$j++) { + if($p->{$name}->{fill}) { + plot_write($fh,"'-' using 1:2 with filledcurves x1 lt rgb \"$color[$j]\" title \"".($p->{$name}->{titles}->[$j] || "$j")."\" ",1); + } + elsif($p->{$name}->{dots}) { + plot_write($fh,"'-' using 1:2 with points pointsize 0.6 pointtype 2 lt rgb \"$color[$j]\" title \"".($p->{$name}->{titles}->[$j] || "$j")."\" ",1); + } + else { + plot_write($fh,"'-' using 1:2 with lines lt rgb \"$color[$j]\" title \"".($p->{$name}->{titles}->[$j] || "$j")."\" ",1); + } + plot_write($fh,', ',1) unless ($j+1==$p->{$name}->{curves}); + } + plot_write($fh," "); + } + else { + die "Plot type not supported"; + } + + } + + +sub PlotDraw { + my($name) = @_; + if($p->{$name}->{run}>=1) { + plot_write($p->{$name}->{fh},"set out \"".$p->{$name}->{file}.".png\""); + plot_write($p->{$name}->{fh},makeTimeString()); + plot_write($p->{$name}->{fh},"replot"); + } + for(my $j=0; $j<$p->{$name}->{curves}; $j++) { + for(my $i=0; $i< scalar @{$p->{$name}->{value}->[$j]}; $i++) { + plot_write($p->{$name}->{fh},(($i-$p->{$name}->{entries})/$p->{$name}->{xscale})." ".$p->{$name}->{value}->[$j]->[$i]) unless $p->{$name}->{countup}; + plot_write($p->{$name}->{fh},($i/$p->{$name}->{xscale})." ".$p->{$name}->{value}->[$j]->[$i]) if $p->{$name}->{countup}; +# print $j." ".$i." ".$p->{$name}->{entries}." ".$p->{$name}->{xscale}." ".$p->{$name}->{value}->[$j]->[$i]."\n"; + } + plot_write($p->{$name}->{fh},"e"); + } + $p->{$name}->{run}++; + } + + +sub PlotAdd { + my($name,$value,$curve) = @_; + $curve = 0 unless $curve; + + if($p->{$name}->{type} == TYPE_HISTORY) { + push(@{$p->{$name}->{value}->[$curve]},$value||0); + shift(@{$p->{$name}->{value}->[$curve]}); + } + + } + + +1; \ No newline at end of file diff --git a/tools/adcmon.js b/tools/adcmon.js index 692d7fe..ca9fed1 100644 --- a/tools/adcmon.js +++ b/tools/adcmon.js @@ -2,24 +2,13 @@ var timer; function activateSelectorFunctions() { - $("#btn1").click(function(){ - $("#test1").text(function(i,origText){ - return "Old text: " + origText + " New text: Hello world! (index: " + i + ")"; - }); - }); - - $("#btn2").click(function(){ - $("#test2").html(function(i,origText){ - return "Old html: " + origText + " New html: Hello world! (index: " + i + ")"; - }); - }); - $("#comm_ajax").click(function(){ refreshPlots(); }); var counter= 0; $(".selectorsReloadTrigger").change(function(){ + timer.stop(); var DAQOPSERVER = $("#input_DAQOPSERVER").val(); var FPGA = $("#FPGA_selector :selected").val(); var CB = $("#CB_selector :selected").val(); @@ -43,25 +32,22 @@ function activateSelectorFunctions() { }); }); - - - $("#test_but").click(function(){ - var collector = []; - $(".channelCheckbox:checked").each(function(){ - var cb_id = $(this).attr('id'); - collector.push( cb_id.replace(/checkbox_/,"")); - }); - alert(collector.join(",")); }); $("#startStopButton").click(function(){ + if(timer.isActive){ timer.stop(); $(this).text("start"); } else { - $(this).text("stop"); - timer.set({time:1000,autostart: true}); + var FPGA = $("#FPGA_selector :selected").val(); + var CB = $("#CB_selector :selected").val(); + var chip = $("#chip_selector :selected").val(); + if( (FPGA!="...") && (CB!="...") && (chip!="...")) { + $(this).text("stop"); + timer.set({time:1000,autostart: true}); + } } }); @@ -70,7 +56,6 @@ function activateSelectorFunctions() { $(document).ready(function(){ - timer = $.timer(function() { refreshPlots(); }); @@ -95,27 +80,21 @@ function refreshPlots(){ cache: false, async: false, dataType: "text", - data: { sub: 'plot_request', + data: { + sub: 'plot_request', requestStrings: requestStrings, - DAQOPSERVER: DAQOPSERVER}, + DAQOPSERVER: DAQOPSERVER + }, success: function(result) { -// var tempScrollTop = $(window).scrollTop(); if(BgFg) { - $("#plotAreaBg").html(result); $("#plotAreaFg").fadeOut(fadeSpeed); - BgFg = false; }else{ - $("#plotAreaFg").html(result); $("#plotAreaFg").fadeIn(fadeSpeed); - BgFg = true; } -// $(window).scrollTop(tempScrollTop); } }); - - } diff --git a/tools/adcmon.pl b/tools/adcmon.pl index dc82882..97bbd72 100755 --- a/tools/adcmon.pl +++ b/tools/adcmon.pl @@ -8,15 +8,12 @@ use warnings; use POSIX; use CGI ':standard'; use CGI::Carp qw(fatalsToBrowser); -# use HTML::Entities; use PlotScheduler; use MIME::Base64; use Widgets; use HADES::TrbNet; use AccessXmlDb; require Common; - - use FindBin; use lib "$FindBin::Bin/.."; use Environment; @@ -27,45 +24,35 @@ use Environment; ############## my $CBsPerFpga=2; my $ChipsPerCB=2; +my $plotWidth=600; +my $plotHeight=400; +my $xmldbEntityFile = "../../daqtools/xml-db/cache/CbController.entity"; +############## +## global variables +############## +# - none - - - - - - - -# subs that are callable via http request +############## +## dispatch table (subs that are callable via CGI) +############## my $dispatch = { table_hash => \&table_hash, plot_request => \&plot_request, print_selectors => \&print_selectors }; -my $q = CGI->new; - -# for accessing the xml-db stuff -my $entityFile = "../../daqtools/xml-db/cache/CbController.entity"; -my $xmldb; - -my $plotWidth=600; -my $plotHeight=400; +#recieve new CGI request +my $q = CGI->new; $ENV{'DAQOPSERVER'} = $q->param('DAQOPSERVER') if defined $q->param('DAQOPSERVER'); - my $daqopserver = $ENV{'DAQOPSERVER'}; print header; - -# unless (defined( $FPGA ) && defined( $CB ) && defined( $chip ) && defined( $channel ) && defined( $daqopserver )) { -# print "

usage:

"; -# print "

adcmon?DAQOPSERVER=...&FPGA=...&CB=...&chip=...&channel=...

"; -# exit; - if ($q->param('sub')){ my $subname = $q->param('sub'); $dispatch->{$subname}->($q); # give the sub the query @@ -73,209 +60,30 @@ if ($q->param('sub')){ page_body($q); } exit; -# } - - - - - -sub plot_request { - - my $q= shift; - - - my @requestStrings = split(",",$q->param('requestStrings')); - -# print join("
",@requestStrings); - - return if (@requestStrings == 0); - - - $ENV{'DAQOPSERVER'} = $q->param('DAQOPSERVER') if defined $q->param('DAQOPSERVER'); - my $daqopserver = $ENV{'DAQOPSERVER'}; - -# unless (defined( $FPGA ) && defined( $CB ) && defined( $chip ) && defined( $channel ) && defined( $daqopserver )) { - unless (defined($daqopserver)){ - die "DAQOPSERVER undefined!"; - } - my $ps = PlotScheduler->new( shm => SHMSYMLINK."adcmon-$daqopserver" ); - # $ps->addRequest( FPGA => "0xd882", CB => "0", chip => "1", channel => "TEMP"); - # $ps->storeRequests(); - $ps->startPlotService() unless $ps->plotServiceRunning(); - $ps->retrieveRequests(); -# $ps->addRequest( FPGA => $FPGA, CB => $CB, chip => $chip, channel => $channel); - for my $reqStr (@requestStrings){ - $ps->addRequest( requestString => $reqStr ); - } - # $ps->listRequests(); - $ps->storeRequests(); -# my $plotfile = $ps->{plotDir}."/$FPGA-$CB-$chip-$channel.png"; -# } -# system("echo 'blah'>".$ps->{plotDir}."/test.txt"); - for my $reqStr (@requestStrings){ - print "$reqStr"; - print br; - } -} -# sub plot_request { -# -# my $q= shift; -# -# $ENV{'DAQOPSERVER'} = $q->param('DAQOPSERVER') if defined $q->param('DAQOPSERVER'); -# my $FPGA = $q->param('FPGA'); -# my $CB = $q->param('CB'); -# my $chip = $q->param('chip'); -# my $channel = $q->param('channel'); -# my $daqopserver = $ENV{'DAQOPSERVER'}; -# -# unless (defined( $FPGA ) && defined( $CB ) && defined( $chip ) && defined( $channel ) && defined( $daqopserver )) { -# -# my $ps = PlotScheduler->new( shm => SHMSYMLINK."adcmon-$daqopserver" ); -# # $ps->addRequest( FPGA => "0xd882", CB => "0", chip => "1", channel => "TEMP"); -# # $ps->storeRequests(); -# $ps->startPlotService() unless $ps->plotServiceRunning(); -# -# $ps->retrieveRequests(); -# $ps->addRequest( FPGA => $FPGA, CB => $CB, chip => $chip, channel => $channel); -# # $ps->listRequests(); -# $ps->storeRequests(); -# my $plotfile = $ps->{plotDir}."/$FPGA-$CB-$chip-$channel.png"; -# } -# } +#################### SUBLAND ###################### -sub print_selectors { +############################### +## subs generating html output +############################### -my $FPGA = $q->param('FPGA'); -my $CB = $q->param('CB'); -my $chip = $q->param('chip'); -my $channel = $q->param('channel'); - - -my $q=shift; - -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; -print ""; - -print ""; -print ""; -print ""; -print ""; -print ""; - -print "
DAQOPSERVER
FPGACBchip
"; -my $FPGA_selector = fileSelector->new( - id=>"FPGA_selector", - name=>"FPGA_selectionDropdown", - selected=>lc($q->param("FPGA")), - class=>"selectorsReloadTrigger" -); -$FPGA_selector->add_item(value=>'...'); -for my $element (activeTRBs()) { - $FPGA_selector->add_item(value=>lc(any2hex($element))); -} -$FPGA_selector->print_html(); -print ""; -my $CB_selector = fileSelector->new( - id=>"CB_selector", - name=>"CB_selectionDropdown", - selected=>$q->param("CB"), - class=>"selectorsReloadTrigger" -); -$CB_selector->add_item(value=>'...'); -for( my $i = 0; $i < $CBsPerFpga; $i++){ - $CB_selector->add_item(value=>$i); -} -# $CB_selector->add_item(value=>$q->param("CB")) if defined $q->param("CB"); -$CB_selector->print_html(); -print ""; -my $chip_selector = fileSelector->new( - id=>"chip_selector", - name=>"chip_selectionDropdown", - selected=>$q->param("chip"), - class=>"selectorsReloadTrigger" -); -$chip_selector->add_item(value=>'...'); -for( my $i = 0; $i < $ChipsPerCB; $i++){ - $chip_selector->add_item(value=>$i); -} -# $chip_selector->add_item(value=>$q->param("chip")) if defined $q->param("chip"); -$chip_selector->print_html(); -print "
"; - -print ""; -print ""; - -print ""; -print ""; - - -print ""; -print ""; -print ""; -print ""; -print ""; - - -print "
"; -print ""; -print "
"; -print ""; -print ""; -print ""; -print ""; -print ""; -print "
"; - - - - -print ""; -$xmldb = AccessXmlDb->new( entityFile => $entityFile ); -for my $element ( @{$xmldb->channelList()}) { - print ""; - print ""; - print ""; - print ""; -} -print "
"; - print "$element"; - print ""; - print ""; - print "
"; - - -} sub page_body{ init_html(); my $q = shift; - - - - - print '
'; print_selectors($q); print '
'; print '
'; +print "
Plots
"; # print "plotAreaBg"; print '
'; -print '
'; +print '
'; # print "plotAreaFg"; print '
'; @@ -283,9 +91,117 @@ print '
'; print_debugStuff($q); print '
'; - } +sub print_selectors { + + my $q=shift; + my $FPGA = $q->param('FPGA'); + my $CB = $q->param('CB'); + my $chip = $q->param('chip'); + my $channel = $q->param('channel'); + + print "
Settings
"; + + print h3 "select chip"; + + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print "
DAQOPSERVER +
FPGACBchip
"; + my $FPGA_selector = fileSelector->new( + id=>"FPGA_selector", + name=>"FPGA_selectionDropdown", + selected=>lc($q->param("FPGA")), + class=>"selectorsReloadTrigger" + ); + $FPGA_selector->add_item(value=>'...'); + for my $element (activeTRBs()) { + $FPGA_selector->add_item(value=>lc(any2hex($element))); + } + $FPGA_selector->print_html(); + print ""; + my $CB_selector = fileSelector->new( + id=>"CB_selector", + name=>"CB_selectionDropdown", + selected=>$q->param("CB"), + class=>"selectorsReloadTrigger" + ); + $CB_selector->add_item(value=>'...'); + for( my $i = 0; $i < $CBsPerFpga; $i++){ + $CB_selector->add_item(value=>$i); + } + $CB_selector->print_html(); + print ""; + my $chip_selector = fileSelector->new( + id=>"chip_selector", + name=>"chip_selectionDropdown", + selected=>$q->param("chip"), + class=>"selectorsReloadTrigger" + ); + $chip_selector->add_item(value=>'...'); + for( my $i = 0; $i < $ChipsPerCB; $i++){ + $chip_selector->add_item(value=>$i); + } + $chip_selector->print_html(); + print "
"; + + print ""; + + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + print ""; + + print "
"; + print ""; + print "
"; + print ""; + print ""; + print ""; + print ""; + print ""; + print "
"; + + print h3 "adc channel"; + + print ""; + + my $xmldb = AccessXmlDb->new( entityFile => $xmldbEntityFile ); + for my $element ( @{$xmldb->channelList()}) { + print ""; + print ""; + print ""; + print ""; + } + + print "
"; + print "$element"; + print ""; + print ""; + print "
"; +} sub print_debugStuff{ @@ -293,14 +209,6 @@ sub print_debugStuff{ my $q=shift(); print "

debug stuff:

"; table_hash($q); -# print qq%

placeholder

%; -# -# print <This is a bold paragraph.

-#

This is another bold paragraph.

-# -# -# EOF } sub table_hash{ @@ -315,12 +223,38 @@ sub table_hash{ print ''; } +sub plot_request { + print "
Plots
"; + my $q= shift; + my @requestStrings = split(",",$q->param('requestStrings')); + return if (@requestStrings == 0); + $ENV{'DAQOPSERVER'} = $q->param('DAQOPSERVER') if defined $q->param('DAQOPSERVER'); + my $daqopserver = $ENV{'DAQOPSERVER'}; -sub init_html{ + unless (defined($daqopserver)){ + die "DAQOPSERVER undefined!"; + } + my $ps = PlotScheduler->new( shm => SHMSYMLINK."adcmon-$daqopserver" ); + $ps->startPlotService() unless $ps->plotServiceRunning(); + $ps->retrieveRequests(); + for my $reqStr (@requestStrings){ + $ps->addRequest( requestString => $reqStr ); + } + # $ps->listRequests(); #debug output + $ps->storeRequests(); + for my $reqStr (@requestStrings){ + $reqStr =~ /-([^-]+)$/; + print h3 $1; +# print br; + print "$reqStr"; +# print br; + } +} +sub init_html{ print start_html( -title=>'ADC Monitor', -style=>[{'src'=>'../layout/styles.css'}, @@ -332,23 +266,17 @@ sub init_html{ { -type => 'text/javascript', -src => './adcmon.js'}, { -type => 'text/javascript', -src => '../scripts/jquery.timer.js'} ] -# # -script=>[ -# # { -type => 'text/javascript', -src => './testgui.js'}, -# # { -type => 'text/javascript', -src => './hideAndShow.js'}, -# # { -type => 'text/javascript', -src => './getdata.js'}, -# # { -type => 'text/javascript', -src => './xmlOperations.js'} -# # ] ); -# print start_html(- - } -sub activeTRBs { +############################### +## misc utilities +############################### +sub activeTRBs { # trb_init_ports() or die trb_strerror(); trb_init_ports() or return (); - # read microsecond counters, return list of active addresses my $read = trb_register_read(0xFFFF,0x50); return (keys %$read); @@ -359,7 +287,6 @@ sub addpng { my ($file) = @_; my $out = "data:image/png;base64,"; open (my $fh, "<$file"); - local $/; my $bin = <$fh>; $fh->close(); diff --git a/tools/plotService.pl b/tools/plotService.pl index 7258682..4e29243 100755 --- a/tools/plotService.pl +++ b/tools/plotService.pl @@ -11,11 +11,8 @@ my $suicideTimeout = 5; use strict; use warnings; use POSIX; -# use CGI ':standard'; -# use CGI::Carp qw(fatalsToBrowser); use Storable qw(lock_store lock_retrieve); use Data::Dumper; -# use HADES::TrbNet; use HPlot; use Getopt::Long; use Time::HiRes; @@ -106,20 +103,18 @@ sub updateTasks { # find new requests, create new jobs for my $requestString ( keys %{$ps->{requests}} ) { - unless( defined( $jobs->{$requestString} ) ) { + + if( defined( $jobs->{$requestString} ) ) { + $jobs->{$requestString}->draw(); + } else { #if job not already started ... $jobs->{$requestString} = PlotJob->new( requestString => $requestString, plotDir => $ps->{plotDir} ); } - - - $jobs->{$requestString}->draw(); } - print Dumper (keys %{$jobs}) if $verbose; - print "number of requests:".$ps->requestCount()."\n" if $verbose; keepAlive($ps->requestCount()); } @@ -140,14 +135,14 @@ sub keepAlive { sub daemonize { -# chdir '/' or die "Can't chdir to /: $!"; -open STDIN, '/dev/null' or die "Can't read /dev/null: $!"; -open STDOUT, '>>/dev/null' or die "Can't write to /dev/null: $!"; -open STDERR, '>>/dev/null' or die "Can't write to /dev/null: $!"; -defined(my $pid = fork) or die "Can't fork: $!"; -exit if $pid; -POSIX::setsid or die "Can't start a new session: $!"; -umask 0; + # chdir '/' or die "Can't chdir to /: $!"; + open STDIN, '/dev/null' or die "Can't read /dev/null: $!"; + open STDOUT, '>>/dev/null' or die "Can't write to /dev/null: $!"; + open STDERR, '>>/dev/null' or die "Can't write to /dev/null: $!"; + defined(my $pid = fork) or die "Can't fork: $!"; + exit if $pid; + POSIX::setsid or die "Can't start a new session: $!"; + umask 0; } @@ -162,9 +157,7 @@ my $xmldb; sub initXmlDb { my $entityFile = shift; - $xmldb = AccessXmlDb->new( entityFile => $entityFile ); - } sub initTrbNet { @@ -195,8 +188,9 @@ sub new { $plot->{output} = HPlot::OUT_PNG; $plot->{titles}->[0] = $self->{requestString}; $plot->{ylabel} = $self->{unit}; - $plot->{ymin} = 0; - $plot->{ymax} = $self->{scale} * 65536; + ## uncomment for resizing y axis to full adc range +# $plot->{ymin} = 0; +# $plot->{ymax} = $self->{scale} * 65536; HPlot::PlotInit($plot); bless($self, $class);