From: Jan Michel Date: Thu, 18 Aug 2016 09:49:37 +0000 (+0200) Subject: adding modes for DiRich to ADC reader X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=fb4735dc86f23f45f63ea2e0bbbd99ba2e3df6fb;p=daqtools.git adding modes for DiRich to ADC reader --- diff --git a/tools/hadplot b/tools/hadplot index dc6da35..ecc455a 100755 --- a/tools/hadplot +++ b/tools/hadplot @@ -154,7 +154,7 @@ if($style == 5) {$curvestyle="histostacked"; $xticks=1;} #Open Gnuplot our $fh; -my $fn = "gnuplot -noraise -geometry $geom -bg 'ghost white'"; +my $fn = "tee /dev/stderr | gnuplot -noraise -geometry $geom -bg 'ghost white'"; $fh = new FileHandle ("|$fn") or die "error: no gnuplot"; $fh->autoflush(1); @@ -273,7 +273,7 @@ sub plot_reset { if ($plotendedbefore != 0) { $plotendedbefore = 0; print $fh makeTimeString(); - print $fh "replot\n"; + print $fh "replot \n"; } } else { @@ -726,7 +726,7 @@ sub genreg { plot_write("set autoscale xfix "); } - plot_write("plot",1); + plot_write("plot ",1); for(my $i = 0; $i[$mode]."\n\n"; + + #2 MHz SPI system("trbcmd w $board 0xd41a 25"); my $cmd; my $s; $cmd = 0xc3830000; -$s = Dmon::PadiwaSendCmd($cmd,$board,7); +$s = Dmon::PadiwaSendCmd($cmd,$board,$channel->[$mode]); -usleep(1000); +usleep(5000); $cmd = 0xd3830000; -$s = Dmon::PadiwaSendCmd($cmd,$board,7); -printf("0x%08x\t%i mV\n",$s->{$board},($s->{$board}>>19&0xfff)*2); +$s = Dmon::PadiwaSendCmd($cmd,$board,$channel->[$mode]); +printf("0x%08x\t%i %s\n",$s->{$board},($s->{$board}>>19&0xfff)*$multiplier->[$mode][0],$t->[$mode][0]); -usleep(1000); -$cmd = 0xe5830000; -$s = Dmon::PadiwaSendCmd($cmd,$board,7); -printf("0x%08x\t%i mV\n",$s->{$board},($s->{$board}>>19)&0xfff); +usleep(5000); +$cmd = 0xe3830000; +$s = Dmon::PadiwaSendCmd($cmd,$board,$channel->[$mode]); +printf("0x%08x\t%i %s\n",$s->{$board},($s->{$board}>>19&0xfff)*$multiplier->[$mode][1],$t->[$mode][1]); usleep(1000); $cmd = 0xf3830000; -$s = Dmon::PadiwaSendCmd($cmd,$board,7); -printf("0x%08x\t%i mV\n",$s->{$board},($s->{$board}>>19&0xfff)/2); - +$s = Dmon::PadiwaSendCmd($cmd,$board,$channel->[$mode]); +printf("0x%08x\t%i %s\n",$s->{$board},($s->{$board}>>19&0xfff)*$multiplier->[$mode][2],$t->[$mode][2]); -usleep(1000); +usleep(5000); $cmd = 0xf3930000; -$s = Dmon::PadiwaSendCmd($cmd,$board,7); -printf("0x%08x\t%i mV\n",$s->{$board},($s->{$board}>>19&0xfff)*2); +$s = Dmon::PadiwaSendCmd($cmd,$board,$channel->[$mode]); +printf("0x%08x\t%i %s\n",$s->{$board},($s->{$board}>>19&0xfff)*$multiplier->[$mode][3],$t->[$mode][3]); -usleep(1000); -$s = Dmon::PadiwaSendCmd(0,$board,7); +usleep(5000); +$s = Dmon::PadiwaSendCmd(0,$board,$channel->[$mode]); printf("0x%08x\t%.2f °C\n",$s->{$board},(($s->{$board}>>19)&0xfff)/16.); #back to normal SPI speed system("trbcmd w $board 0xd41a 7"); +print "\n"; \ No newline at end of file diff --git a/web/htdocs/tools/pwr/pwr.conf b/web/htdocs/tools/pwr/pwr.conf index f139388..1255652 100644 --- a/web/htdocs/tools/pwr/pwr.conf +++ b/web/htdocs/tools/pwr/pwr.conf @@ -1,9 +1,8 @@ -Content-type: text/html - //PWRSPLY:/path/to/device:speed:Name:Type:Channels //type can be HMP, PSP, PST -PWRSPLY:/dev/ttyUSB0:9600:PST3202:PST:3 +//PWRSPLY:/dev/ttyUSB0:9600:PST3202:PST:3 //PWRSPLY:/dev/ttyUSB0:115200:HMP4030:HMP:3 -//PWRSPLY:/dev/ttyUSB1:2400:PSP405:PSP:1 +PWRSPLY:/dev/FTDI_FT232R_USB_UART_AH02HFZW:2400:PSP2010:PSP:1 +PWRSPLY:/dev/FTDI_FT232R_USB_UART_A702HE33:2400:PSP405:PSP:1