]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
Better resolution for ADC read-out
authorJan Michel <j.michel@gsi.de>
Thu, 25 Aug 2016 15:13:49 +0000 (17:13 +0200)
committerJan Michel <j.michel@gsi.de>
Thu, 25 Aug 2016 15:13:49 +0000 (17:13 +0200)
users/frankfurt_test/trb3scadc.pl

index ce5e225bb2fdfcb9b7dd1b6adb2bfe55118bfc9c..7da9fda7e498106f7f845f71f7eb7c59c376b578 100755 (executable)
@@ -13,18 +13,19 @@ trb_init_ports() or die trb_strerror();
 my $board = hex($ARGV[0]);
 
 #0 for TRB3sc, 1 for DiRich, 2 for Concentrator, 3 for PowerVoltages, 4 for PowerCurrents
-my $modedesc = ['Trb3sc','DiRich','Concentrator','Power-Voltages','Power-Currents'];
 my $mode = $ARGV[1] || 0;
-my $multiplier= [[1,1,0.5,2],[1,1,0.5,0],[1,1,0.5,3.125],[1,1,0.5,0.5],[5,1.25,1,0.5]];
 my $t = [['mV (3.3)','mV (2.5)','mV (1.2)','mV (6)'],
          ['mV (3.3)','mV (2.5)','mV (1.1)',''],
          ['mV (3.3)','mV (2.5)','mV (1.2)','mA (@1.2)'],
          ['mV (3.3)','mV (2.5)','mV (1.2)','mV (1.1)'],
          ['mA (@1.1)','mA (@1.2)','mA (@2.5)','mA (@3.3)']];
-my $channel = [7,7,7,6,5];
+my $channel = [7,7,7,6,5]; #SPI interface number
 
 #1:4V, 2:2V, 3:1V
-my $resolution = [[2,1,2,1],[2,2,2,1],[2,2,2,4],[2,2,2,2],[2,3,2,2]];
+my $resolution = [[2,1,2,1],  [2,2,2,1],  [2,2,2,4],      [2,2,2,2],       [3,3,2,2]];
+my $multiplier=  [[1,1,0.5,2],[1,1,0.5,0],[1,1,0.5,3.125],[1,1,0.5,0.5],   [2.5,1.25,1,0.5]];
+my $modedesc =   [ 'Trb3sc',  'DiRich',   'Concentrator', 'Power-Voltages','Power-Currents'];
+
 print "\nRunning in mode ".$modedesc->[$mode]."\n\n";