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
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
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
##########################################
0 4 059
0 5 062
- 1 0 073
+ 1 0 054
1 1 064
1 2 072
1 3 077
# 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
+
+
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],
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;
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) {
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;
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) {
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,
#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;
}
###############################################################################
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) {
-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.
$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;
($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;
}
}
+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");
use Data::Dumper;
use POSIX qw/strftime/;
-
trb_init_ports() or die trb_strerror();
$boards->{$b}=();
}
}
-
#print Dumper $res;
#exit;
#Loop through buses and find sensors
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;
$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;
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;
}
}
4870 0x0000851a00822941
4871 0x0000cde600822941
+<<<<<<< HEAD
4885 0x0000b15a00822941
4880 0x000026bf00822941
4881 0x0000ba3500822941
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
+ 0x8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