]> jspc29.x-matter.uni-frankfurt.de Git - hades_mdc_settings.git/commitdiff
new MBos in plane 0 and T-sensors
authorhadaq <hadaq@hades33.gsi.de>
Mon, 6 Jan 2025 14:59:17 +0000 (15:59 +0100)
committerhadaq <hadaq@hades33.gsi.de>
Mon, 6 Jan 2025 15:03:08 +0000 (16:03 +0100)
installation/mbo_positions.db
installation/powerdistributor_positions.db
installation/temperature_sensors.db
scripts/MDC.pm
scripts/MDCPower.pm
scripts/powerboard_status.pl
scripts/read_1wire_sensors.pl
serials/serials_mdcmbo.db
settings_power/settings_voltage.db
settings_tdc/common_50_settingsselect.trbcmd

index b492a6f6349bea5c3eebd846550f12a1979f9018..a3d39bf83b914612a94a6c617edbf5bbfb7dd679 100644 (file)
@@ -53,7 +53,7 @@
 0        3        5        0        339
 0        3        6        1        826
 0        3        7        1        823
-0        3        8        0        352
+0        3        8        0        431
 0        3        9        0        355
 0        3        10       1        842
 0        3        11       0        351
@@ -76,7 +76,7 @@
 0        4        13       0        435
 
 0        5        0        0        312
-0        5        1        1        809
+0        5        1        1        911 ## 809
 0        5        2        1        800
 0        5        3        0        361
 0        5        4        0        354
@@ -87,8 +87,8 @@
 0        5        9        0        302
 0        5        10       1        847
 0        5        11       0        311
-0        5        12       1        819
-0        5        13       0        310
+0        5        12       1        844  ## 819
+0        5        13       0        508  ## 310
 
 ##########################################
 
 1        3        11       0        391
 1        3        12       0        374
 1        3        13       0        304
-1        3        14       1        850
+1        3        14       1        916 #850 4.12.24
 1        3        15       1        857
 
 1        4        0        0        415
 1        5        11       0        318
 1        5        12       0        317
 1        5        13       0        319
-1        5        14       1        802
+1        5        14       1        918
 1        5        15       1        801
 
 ##########################################                                
index 7d09d1a680137918e07464c66f5226bf4fdc6a2f..61e0d3839dbc8f2abcb8e13990e9eeaa646fe139 100644 (file)
@@ -10,7 +10,7 @@
     0           4          059
     0           5          062
 
-    1           0          073
+    1           0          054
     1           1          064
     1           2          072
     1           3          077
index 22053dff64631c322b88955a4467cbe2ea0404fe..a8db480ef4563024aadd12c1c06c087a40b57b64 100644 (file)
@@ -1,23 +1,23 @@
 #  Plane   #  Sector  #     inner short     #     outer short     #     inner long      #     outer long      #     inner center    #
 #####################################################################################################################################
-    0           0        A3000001f1408528      1F000001f14F7D28      B7000001f110A428      78000001F149E028     A2000001F1194E28
-    0           1        22000001f1438f28      54000001f130e628      7e000001f12f9e28      81000001f1496e28      72000001F10CD428      
+    0           0        A3000001f1408528      1F000001f14F7D28      B7000001f110A428      78000001F149E028      A2000001F1194E28
+    0           1        22000001f1438f28      54000001f130e628      54??                  81000001f1496e28      72000001F10CD428      
     0           2        96000001f1132328      a6000001f14adc28      55000001f141EE28      AD000001F12B0228      0D000001F10B8428
-    0           3        df000001f1508528      1f000001f1449e28      68000001f1438228      2d000001f1299428      94000001F1CF2628
+    0           3        df000001f1508528      1f000001f1449e28      d7000001f130d428      2d000001f1299428      94000001F1CF2628
     0           4        3b000001f159ad28      21000001f110ad28      1c0000028f6efa28      e4000001f12a8028      D4000001F12B2828
-    0           5        3f000001f10c6928      1e000001f12efc28      ce000001f1108e28      53000001f122ed28      66000001F140D028
+    0           5        3f000001f10c6928      1e000001f12efc28      10000001f1432d28      53000001f122ed28      66000001F140D028
 
     1           0        5c000001f111b828      0                     46000001F1325F28      3A000001F13F6328      70000001f14cd128
-    1           1        4d000001f14ebd28      0                     d4000001f12b2828      0a0000028f9a8b28      87000001f12C3B28
+    1           1        4d000001f14ebd28      0                     7e000001f12f9e28      0a0000028f9a8b28      87000001f12C3B28
     1           2        42000001f1188828      0                     d1000001f116bc28      df000001f128d928      E3000001f1278528
-    1           3        fb000001f129cf28      0                     F6000001F1162528      00000001F1485628      C2000001f1424928
+    1           3        5C000001F116F728      0                     F6000001F1162528      00000001F1485628      C2000001f1424928
     1           4        0f000001f12b9c28      0                     70000001f1217928      b2000001f1284d28      D5000001f13C6B28
-    1           5        0                     0                     0c000001f14e6a28      a40000028f6ac728      18000001f10BBF28
+    1           5        a4000001f130a128      0                     0c000001f14e6a28      a40000028f6ac728      18000001f10BBF28
 
     2           0        0                     0                     0                     0
     2           1        0                     0                     0                     0
     2           2        0                     0                     0                     0
-    2           3        5C000001F116F728      0                     0                     0
+    2           3        0                     0                     0                     0
     2           4        0                     0                     0                     0
     2           5        0                     0                     0                     0
 
     3           3        0                     0                     0                     0
     3           4        0                     0                     0                     0
     3           5        0                     0                     0                     0
+
+    
+    
+#changed entries with !! on 6.12.24. Jan
+#    0           0        A3000001f1408528      1F000001f14F7D28      B7000001f110A428      78000001F149E028      A2000001F1194E28
+#    0           1        22000001f1438f28      54000001f130e628    !!7e000001f12f9e28      81000001f1496e28      72000001F10CD428     
+#    0           2        96000001f1132328      a6000001f14adc28      55000001f141EE28      AD000001F12B0228      0D000001F10B8428
+#    0           3        df000001f1508528      1f000001f1449e28      68000001f1438228      2d000001f1299428      94000001F1CF2628
+#    0           4        3b000001f159ad28      21000001f110ad28      1c0000028f6efa28      e4000001f12a8028      D4000001F12B2828
+#    0           5        3f000001f10c6928      1e000001f12efc28      ce000001f1108e28      53000001f122ed28      66000001F140D028
+#
+#    1           0        5c000001f111b828      0                     46000001F1325F28      3A000001F13F6328      70000001f14cd128
+#    1           1        4d000001f14ebd28      0                     d4000001f12b2828      0a0000028f9a8b28      87000001f12C3B28
+#    1           2        42000001f1188828      0                     d1000001f116bc28      df000001f128d928      E3000001f1278528
+#    1           3      !!fb000001f129cf28      0                     F6000001F1162528      00000001F1485628      C2000001f1424928
+#    1           4        0f000001f12b9c28      0                     70000001f1217928      b2000001f1284d28      D5000001f13C6B28
+#    1           5        a4000001f130a128      0                     0c000001f14e6a28      a40000028f6ac728      18000001f10BBF28
+
+     
index 0c0d0d94859a976f3abf453260ade3e689f0d0d6..fdc48c7af3df7e880f5e08ea07be9f94dbe55e8e 100644 (file)
@@ -5,7 +5,9 @@ no warnings "portable";
 use FileHandle;
 use Getopt::Long;
 use Data::Dumper;
+use File::Basename qw(dirname);
 
+my $dir = dirname(__FILE__);
 
 
 my $longboards = [[0,1,1,0,0,0,1,1,0,0,1,0,1,0],
@@ -83,7 +85,7 @@ sub get_power_output {
   my ($p,$s,$b,$e) = get_position($addr);
   my $id=-1;
   
-  open FILE, "../installation/powerdistributor_positions.db" or die $!."\npowerdistributor_positions.db not found.";
+  open FILE, "$dir/../installation/powerdistributor_positions.db" or die $!."\n$dir/../installation/powerdistributor_positions.db not found.";
   while (my $a = <FILE>) {
     if(my @values = $a =~ /^\s*(\d)\s+(\d)\s+(\d+)/) {
       my $pd_p  = shift @values;
@@ -98,7 +100,7 @@ sub get_power_output {
   return(-1,0,0) if $id==-1;
   return(-1,0,0) if $id==0;
      
-  open FILE, "../installation/power_outputs.db" or die $!."\npower_outputs.db not found.";
+  open FILE, "$dir/../installation/power_outputs.db" or die $!."\npower_outputs.db not found.";
   while (my $a = <FILE>) {
     if(my @values = $a =~ /^\s*(\d)\s+(\d)\s+(\d+)\s+(\d)\s+(\d)/) {
       if($values[0] == $p && $values[1] == $s && $values[2] == $b) {
@@ -123,7 +125,7 @@ sub get_connected_board {
   my $pd_p; 
   my $pd_s;
   
-  open FILE, "../installation/powerdistributor_positions.db" or die $!."\npowerdistributor_positions.db not found.";
+  open FILE, "$dir/../installation/powerdistributor_positions.db" or die $!."\npowerdistributor_positions.db not found.";
   while (my $a = <FILE>) {
     if(my @values = $a =~ /^\s*(\d)\s+(\d)\s+(\d+)/) {
       $pd_p  = shift @values;
@@ -135,7 +137,7 @@ sub get_connected_board {
   close FILE;  
 
      
-  open FILE, "../installation/power_outputs.db" or die $!."\npower_outputs.db not found.";
+  open FILE, "$dir/../installation/power_outputs.db" or die $!."\npower_outputs.db not found.";
   while (my $a = <FILE>) {
     if(my @values = $a =~ /^\s*(\d)\s+(\d)\s+(\d+)\s+(\d)\s+(\d)/) {
       if($values[0] == $pd_p && $values[1] == $pd_s && $values[3] == $b && $values[4] == $o) {
index 64fdfaddb17677eccb7160d50d0339677ee6940d..32bcfd692a7639b4c41a809943572bbeda0d5f6c 100644 (file)
@@ -10,6 +10,9 @@ use MDC;
 use IO::Socket;
 use IO::Handle;
 use Time::HiRes qw( usleep);
+use File::Basename;
+
+my $dir = dirname(__FILE__);
 
 my $powerboard_registers = {
   'switch' => 0, 'sw' => 0,
@@ -26,13 +29,14 @@ my $powerboard_registers = {
 #ping a power board
 ###############################################################################
 sub power_ping {
-  my ($addr) = @_;
+  my ($addr,$silent) = @_;
 
   my ($host,$board,$outp) = MDC::get_power_output($addr);
 #  print "$addr $host\n";
   return if $host eq "-1";
-  system("ping -c 1 -W 1 $host");
-
+  system("ping -c 1 -W 1 $host 1>/dev/null 2>/dev/null") if $silent;
+  system("ping -c 1 -W 1 $host")                         unless $silent;
+  return $? >> 8;
   }
 
 ###############################################################################  
index eb7648eec70a6a83db856de60fbcdd1d55aebcb5..87e70dc5ebbb654582aa38caf62796879c2258a3 100755 (executable)
@@ -13,12 +13,14 @@ my $help;
 my $board;
 my $plane;
 my $sector;
+my $raw;
 Getopt::Long::Configure(qw(gnu_getopt));
 GetOptions(
            'help|h'      => \$help,
            'board|b=s'   => \$board,
            'plane|p=s'   => \$plane,
-           'sector|s=s'   => \$sector,
+           'sector|s=s'  => \$sector,
+           'raw|r'       => \$raw,
            );
            
 if($help) {
@@ -30,6 +32,7 @@ Options
   -b 0xnnnn    Board address
   -p (0..3)    Plane
   -s (0..5)    Sector
+  -r           raw output
 
 All values are given in units Â°C, mV, mA or unitless.
 
@@ -43,13 +46,13 @@ exit;
 
 $board = hex($board) if defined $board;
 if(defined $board && ($board < 0x8e00 || $board > 0x8fff)) {
-  die "Wrong board address (8e00 - 8fff)\n";
+  die "Wrong board address $board (8e00 - 8fff)\n";
   }
 if(defined $plane && ($plane < 0 || $plane > 3)) {
-  die "Wrong plane number\n";
+  die "Wrong plane number $plane\n";
   } 
 if(defined $sector && ($sector < 0 || $sector > 5)) {
-  die "Wrong sector number\n";
+  die "Wrong sector number $sector\n";
   }
 
 my $host;
@@ -57,9 +60,13 @@ $board = MDC::get_address($plane,$sector,0,5) if defined $plane;
 ($host) = MDC::get_power_output($board) if defined $board;
 
 if(!defined $host || $host == -1) {
-  die "Powerboard not found\n";
+  die "Powerboard for $board not found\n";
   }
 
+if (MDCPower::power_ping($board,1)) {
+  die "Powerboard $host not responding\n";
+  }
+  
 my $data;
 
 
@@ -78,6 +85,14 @@ for my $b (0..3) {
     }
   }
 
+if ($raw) {
+  $Data::Dumper::Terse = 1;
+  $Data::Dumper::Indent = 0;
+  print Dumper $data;
+  exit;
+  }
+  
+  
 my ($mdcp,$mdcs) = MDC::get_position($board);
   
 printf("\nMDC Powerboard \t Plane $mdcp \t Sector $mdcs\n");
index af9a1506f5665ed4a220f462e2398220cb424fc3..695c20289ae5df43642d5f871862718539e45073 100755 (executable)
@@ -6,7 +6,6 @@ use Time::HiRes qw(usleep);
 use Data::Dumper;
 use POSIX qw/strftime/;
 
-
 trb_init_ports() or die trb_strerror();
 
 
@@ -25,7 +24,6 @@ foreach my $b (keys %$res) {
     $boards->{$b}=();
     }
   }
-
 #print Dumper $res;
 #exit;
 #Loop through buses and find sensors  
@@ -60,7 +58,8 @@ sub searchROM {
   my $currentROM = 0;
   my $lastROM = 0;
   my $direction = 0;
-#   printf("%04x\n",$board);
+  my $countsensors = 0;
+  printf(STDERR "%04x\n",$board);
   while(1) {
     $currentROM = 0;
     $LastZero = -1;
@@ -85,11 +84,12 @@ sub searchROM {
       $LastZero = $i if ($realdir == 0 && $idbit == 0 && $notidbit == 0);
       $currentROM |= ($realdir << $i);
       }
-#     printf("%08x %i %i\n",$currentROM,$LastZero,$LastDiscrepancy);
+    printf(STDERR "%016x %i %i\n",$currentROM,$LastZero,$LastDiscrepancy);
     $LastDiscrepancy = $LastZero;
     $boards->{$board}{$currentROM}=0;
     $lastROM = $currentROM;
     last if $LastDiscrepancy == -1;
+    last if $countsensors++ > 5;
     }
     
   return;
@@ -126,6 +126,7 @@ sub readData {
     printf("%04x\t%016x\t---\n",$board,$uid) and next if $temp == 0xffff;
     $temp /= 16;
     printf("%04x\t%016x\t%2.2f\n",$board,$uid,$temp);
+    printf(STDERR "%04x\t%016x\t%2.2f\n",$board,$uid,$temp);
     $boards->{$board}{$uid} = $temp;
     }
   }
index 849a62681917d0205778d5c1bbee74d37f51083d..d8d2e414fd376911593546c31ac69afdeeada3d2 100644 (file)
 4870  0x0000851a00822941  
 4871  0x0000cde600822941  
 
+<<<<<<< HEAD
 4885  0x0000b15a00822941  
 4880  0x000026bf00822941  
 4881  0x0000ba3500822941  
index 6b4631d5e970356aead00ba944735638b96ddf26..6df513455a7d76a7e1f6968397aff4f3099f9039 100644 (file)
@@ -49,9 +49,9 @@
   0x8e2c          4              4
   0x8e2d          3              3
   0x8e30          4              5
-  0x8e31          3              5
-  0x8e32          3              3
-  0x8e33          4              5
+  0x8e31          3              7
+  0x8e32          3              1
+  0x8e33          6              5
   0x8e34          4              5
   0x8e35          2              3
   0x8e36          3              3
   0x8e3b          3              3
   0x8e3c          4              4
   0x8e3d          3              3
-  0x8e40          4              4
-  0x8e41          4              5
-  0x8e42          4              4
-  0x8e43          5              6
-  0x8e44          5              6
-  0x8e45          5              5
-  0x8e46          4              4
-  0x8e47          4              4
-  0x8e48          5              6
-  0x8e49          5              6
-  0x8e4a          4              4
-  0x8e4b          4              5
-  0x8e4c          4              4
-  0x8e4d          4              5
+  0x8e40          0              0
+  0x8e41          0              1
+  0x8e42          0              0
+  0x8e43          3              4
+  0x8e44          3              4
+  0x8e45          1              3
+  0x8e46          0              0
+  0x8e47          0              0
+  0x8e48          3              4
+  0x8e49          1              4
+  0x8e4a          0              0
+  0x8e4b          0              1
+  0x8e4c          0              0
+  0x8e4d          0              1
   0x8e50          5              5
-  0x8e51          3              4
-  0x8e52          3              3
-  0x8e53          4              7
+  0x8e51          4              4
+  0x8e52          4              4
+  0x8e53          5              6
   0x8e54          4              5
-  0x8e55          5              7
-  0x8e56          4              4
+  0x8e55          3              4
+  0x8e56          5              4
   0x8e57          4              4
   0x8e58          5              6
-  0x8e59          5              6
-  0x8e5a          4              5
-  0x8e5b          4              4
+  0x8e59          6              6
+  0x8e5a          4              6
+  0x8e5b          4              5
   0x8e5c          4              5
   0x8e5d          4              4
-  0x8e60          7              7
-  0x8e61          3              4
-  0x8e62          3              4
-  0x8e63          3              4
-  0x8e64          3              3
-  0x8e65          4              4
-  0x8e66          3              4
-  0x8e67          3              4
-  0x8e68          3              4
-  0x8e69          3              4
-  0x8e6a          3              3
-  0x8e6b          4              4
-  0x8e6c          3              3
-  0x8e6d          3              3
-  0x8e6e          3              3
-  0x8e6f          7              7
-  0x8e70          2              2
-  0x8e71          2              3
-  0x8e72          2              3
-  0x8e73          2              3
-  0x8e74          2              3
-  0x8e75          3              4
-  0x8e76          3              3
-  0x8e77          3              3
-  0x8e78          2              3
-  0x8e79          2              3
-  0x8e7a          2              2
-  0x8e7b          3              4
-  0x8e7c          2              2
+  0x8e60          1              2
+  0x8e61          2              2
+  0x8e62          2              2
+  0x8e63          2              2
+  0x8e64          1              2
+  0x8e65          2              3
+  0x8e66          3              2
+  0x8e67          1              2
+  0x8e68          2              2
+  0x8e69          2              2
+  0x8e6a          1              2
+  0x8e6b          2              3
+  0x8e6c          1              1
+  0x8e6d          2              3
+  0x8e6e          1              1
+  0x8e6f          3              3
+  0x8e70          1              2
+  0x8e71          2              2
+  0x8e72          2              2
+  0x8e73          2              2
+  0x8e74          1              2
+  0x8e75          3              3
+  0x8e76          2              2
+  0x8e77          2              2
+  0x8e78          2              2
+  0x8e79          2              2
+  0x8e7a          1              2
+  0x8e7b          2              3
+  0x8e7c          1              2
   0x8e7d          2              3
-  0x8e7e          2              2
+  0x8e7e          1              2
   0x8e7f          3              3
-  0x8e80          2              2
-  0x8e81          2              3
-  0x8e82          4              4
-  0x8e83          2              3
-  0x8e84          2              3
-  0x8e85          3              4
-  0x8e86          2              3
-  0x8e87          2              3
-  0x8e88          3              3
-  0x8e89          2              3
-  0x8e8a          2              3
-  0x8e8b          4              4
-  0x8e8c          2              2
-  0x8e8d          2              2
+  0x8e80          1              2
+  0x8e81          2              2
+  0x8e82          2              3
+  0x8e83          2              2
+  0x8e84          2              2
+  0x8e85          3              3
+  0x8e86          2              2
+  0x8e87          2              2
+  0x8e88          2              2
+  0x8e89          2              2
+  0x8e8a          2              2
+  0x8e8b          3              4
+  0x8e8c          1              2
+  0x8e8d          1              2
   0x8e8e          2              2
   0x8e8f          2              2
-  0x8e90          2              3
-  0x8e91          3              3
-  0x8e92          3              3
-  0x8e93          3              3
-  0x8e94          2              3
-  0x8e95          3              3
-  0x8e96          7              7
-  0x8e97          2              3
-  0x8e98          3              3
-  0x8e99          3              3
-  0x8e9a          2              3
-  0x8e9b          3              3
-  0x8e9c          2              2
-  0x8e9d          2              2
-  0x8e9e          2              2
-  0x8e9f          2              2
-  0x8ea0          7              7
-  0x8ea1          7              7
-  0x8ea2          7              7
-  0x8ea3          7              7
-  0x8ea4          7              7
-  0x8ea5          7              7
-  0x8ea6          7              7
-  0x8ea7          7              7
-  0x8ea8          7              7
-  0x8ea9          7              7
-  0x8eaa          7              7
-  0x8eab          7              7
-  0x8eac          7              7
-  0x8ead          7              7
-  0x8eae          7              7
-  0x8eaf          7              7
-  0x8eb0          3              3
-  0x8eb1          3              4
-  0x8eb2          3              4
-  0x8eb3          3              4
-  0x8eb4          3              4
-  0x8eb5          4              4
-  0x8eb6          4              4
-  0x8eb7          3              4
-  0x8eb8          4              4
-  0x8eb9          3              4
-  0x8eba          3              4
-  0x8ebb          4              4
-  0x8ebc          4              4
-  0x8ebd          7              7
-  0x8ebe          3              3
-  0x8ebf          4              4
+  0x8e90          1              2
+  0x8e91          2              2
+  0x8e92          2              2
+  0x8e93          2              2
+  0x8e94          1              2
+  0x8e95          3              4
+  0x8e96          2              2
+  0x8e97          2              2
+  0x8e98          2              2
+  0x8e99          2              2
+  0x8e9a          2              2
+  0x8e9b          2              3
+  0x8e9c          1              2
+  0x8e9d          1              1
+  0x8e9e          1              2
+  0x8e9f          1              2
+  0x8ea0          1              2
+  0x8ea1          1              2
+  0x8ea2          1              2
+  0x8ea3          1              2
+  0x8ea4          1              2
+  0x8ea5          2              3
+  0x8ea6          1              2
+  0x8ea7          1              2
+  0x8ea8          1              2
+  0x8ea9          1              1
+  0x8eaa          1              1
+  0x8eab          2              2
+  0x8eac          1              1
+  0x8ead          1              1
+  0x8eae          1              1
+  0x8eaf          1              1
+  0x8eb0          1              2
+  0x8eb1          2              2
+  0x8eb2          2              2
+  0x8eb3          2              2
+  0x8eb4          2              2
+  0x8eb5          3              3
+  0x8eb6          2              2
+  0x8eb7          2              3
+  0x8eb8          2              2
+  0x8eb9          2              2
+  0x8eba          2              2
+  0x8ebb          3              3
+  0x8ebc          2              3
+  0x8ebd          2              3
+  0x8ebe          1              2
+  0x8ebf          3              3
   0x8f00          7              7
   0x8f01          7              7
   0x8f02          7              7
index 33a5a83bc8fdcfea3e740f4c7c1ec3514e58534e..ab5ee0d92dca14ab08a3b93d9d39ab870f1ce00a 100644 (file)
@@ -1,3 +1,7 @@
 #Select memory location 40,50,60,70 for the four Pasttrec chips, activate autoload of 12 values
 0xa002 0x4c504c40
 0xa003 0x4c704c60
+#min event size 2
+0x7114 0x00020000
+#SEU on
+0xd500 0x00000001