From: Cbm Rich Date: Sat, 22 Nov 2014 11:02:02 +0000 (+0100) Subject: Billboard: Added documentation and Thresh-Offset X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=31772c292a97af10befb8a56f2b2845813836f5e;p=daqtools.git Billboard: Added documentation and Thresh-Offset --- diff --git a/dmon/scripts/dmon_billboard.pl b/dmon/scripts/dmon_billboard.pl index 2af2384..4208e60 100755 --- a/dmon/scripts/dmon_billboard.pl +++ b/dmon/scripts/dmon_billboard.pl @@ -1,5 +1,91 @@ #!/usr/bin/perl -w +# Comments: +# - Some values had to be multiplied to achive a fixed-point representation. +# To decode just divide by the factor specified for each value +# +# - We added values (by appending) during the beam time so earlier files +# might miss values from the bottom of the table +# +# Word Bits Factor Epics-Name Description +# 0 0 : 8 10 CBM:BMP180:GetTemp Gas Temperatur in °C measured in Box +# 29: 9 1 CBM:BMP180:GetPressure Gas Pressure in Pa measured in Box +# 31:30 Data Format version: 0x00 +# +# 1 15: 0 1 CBM:PWRSWITCH:GetCurrent00 Current measured for Padiwa-Supply 1 in mA +# 31:15 1 CBM:PWRSWITCH:GetCurrent01 Current measured for Padiwa-Supply 2 in mA +# 2 15: 0 1 CBM:PWRSWITCH:GetCurrent02 Current measured for Padiwa-Supply 3 in mA +# 31:15 1 CBM:PWRSWITCH:GetCurrent03 Current measured for Padiwa-Supply 4 in mA +# 3 15: 0 1 CBM:PWRSWITCH:GetCurrent04 Current measured for Padiwa-Supply 5 in mA +# 31:15 1 CBM:PWRSWITCH:GetCurrent05 Current measured for Padiwa-Supply 6 in mA +# 4 15: 0 1 CBM:PWRSWITCH:GetCurrent06 Current measured for Padiwa-Supply 7 in mA +# 31:15 1 CBM:PWRSWITCH:GetCurrent07 Current measured for Padiwa-Supply 8 in mA +# 5 15: 0 1 CBM:PWRSWITCH:GetCurrent08 Current measured for Padiwa-Supply 9 in mA +# 31:15 1 CBM:PWRSWITCH:GetCurrent09 Current measured for Padiwa-Supply 10 in mA +# 6 15: 0 1 CBM:PWRSWITCH:GetCurrent0A Current measured for Padiwa-Supply 11 in mA +# 31:15 1 CBM:PWRSWITCH:GetCurrent0B Current measured for Padiwa-Supply 12 in mA +# 7 15: 0 1 CBM:PWRSWITCH:GetCurrent0C Current measured for Padiwa-Supply 13 in mA +# 31:15 1 CBM:PWRSWITCH:GetCurrent0D Current measured for Padiwa-Supply 14 in mA +# 8 15: 0 1 CBM:PWRSWITCH:GetCurrent0E Current measured for Padiwa-Supply 15 in mA +# 31:15 1 CBM:PWRSWITCH:GetCurrent0F Current measured for Padiwa-Supply 16 in mA +# +# 9 31:0 1 Unix-Timestamp of Threshold file used (based on the time information found in the first line of the Threshold-Log file) +# +# 10 15: 0 100 OUTPUT_TERMINAL_VOLTAGE_U0 HV Voltage of PMT 1 in V +# 31:16 1 MEASUREMENT_CURRENT_U0 HV Current of PMT 1 in uA +# 11 15: 0 100 OUTPUT_TERMINAL_VOLTAGE_U1 HV Voltage of PMT 2 in V +# 31:16 1 MEASUREMENT_CURRENT_U1 HV Current of PMT 2 in uA +# 12 15: 0 100 OUTPUT_TERMINAL_VOLTAGE_U2 HV Voltage of PMT 3 in V +# 31:16 1 MEASUREMENT_CURRENT_U2 HV Current of PMT 3 in uA +# 13 15: 0 100 OUTPUT_TERMINAL_VOLTAGE_U3 HV Voltage of PMT 4 in V +# 31:16 1 MEASUREMENT_CURRENT_U3 HV Current of PMT 4 in uA +# 14 15: 0 100 OUTPUT_TERMINAL_VOLTAGE_U4 HV Voltage of PMT 5 in V +# 31:16 1 MEASUREMENT_CURRENT_U4 HV Current of PMT 5 in uA +# 15 15: 0 100 OUTPUT_TERMINAL_VOLTAGE_U5 HV Voltage of PMT 6 in V +# 31:16 1 MEASUREMENT_CURRENT_U5 HV Current of PMT 6 in uA +# 16 15: 0 100 OUTPUT_TERMINAL_VOLTAGE_U6 HV Voltage of PMT 7 in V +# 31:16 1 MEASUREMENT_CURRENT_U6 HV Current of PMT 7 in uA +# 17 15: 0 100 OUTPUT_TERMINAL_VOLTAGE_U7 HV Voltage of PMT 8 in V +# 31:16 1 MEASUREMENT_CURRENT_U7 HV Current of PMT 8 in uA +# 18 15: 0 100 OUTPUT_TERMINAL_VOLTAGE_U8 HV Voltage of PMT 9 in V +# 31:16 1 MEASUREMENT_CURRENT_U8 HV Current of PMT 9 in uA +# 19 15: 0 100 OUTPUT_TERMINAL_VOLTAGE_U9 HV Voltage of PMT 10 in V +# 31:16 1 MEASUREMENT_CURRENT_U9 HV Current of PMT 10 in uA +# 20 15: 0 100 OUTPUT_TERMINAL_VOLTAGE_U10 HV Voltage of PMT 11 in V +# 31:16 1 MEASUREMENT_CURRENT_U10 HV Current of PMT 11 in uA +# 21 15: 0 100 OUTPUT_TERMINAL_VOLTAGE_U11 HV Voltage of PMT 12 in V +# 31:16 1 MEASUREMENT_CURRENT_U11 HV Current of PMT 12 in uA +# 22 15: 0 100 OUTPUT_TERMINAL_VOLTAGE_U12 HV Voltage of PMT 13 in V +# 31:16 1 MEASUREMENT_CURRENT_U12 HV Current of PMT 13 in uA +# 23 15: 0 100 OUTPUT_TERMINAL_VOLTAGE_U13 HV Voltage of PMT 14 in V +# 31:16 1 MEASUREMENT_CURRENT_U13 HV Current of PMT 14 in uA +# 24 15: 0 100 OUTPUT_TERMINAL_VOLTAGE_U14 HV Voltage of PMT 15 in V +# 31:16 1 MEASUREMENT_CURRENT_U14 HV Current of PMT 15 in uA +# 25 15: 0 100 OUTPUT_TERMINAL_VOLTAGE_U15 HV Voltage of PMT 16 in V +# 31:16 1 MEASUREMENT_CURRENT_U15 HV Current of PMT 16 in uA +# +# 26 15: 0 100 CBM:RICH:Mirror:Pos:ActualPosition1 Mirror Position 1 in ° +# 31:16 100 CBM:RICH:Mirror:Pos:ActualPosition2 Mirror Position 2 in ° +# +# 27 15: 0 32 CBM:RICH:Gas:O2 O2 concentration of gas in ppm +# 31:16 32 CBM:RICH:Gas:H2O H2O concentration of gas in ppm +# +# 28 15: 0 12800 CBM:RICH:Gas:PT-1 ? +# 31:16 32 CBM:RICH:Gas:PTB ? +# +# 29 15: 0 32 CBM:RICH:Gas:PT-2 ? +# 31:16 32 CBM:RICH:Gas:PT-3 ? +# +# 30 15: 0 128 CBM:RICH:Gas:TT-1 ? +# 31:16 128 CBM:RICH:Gas:TT-2 ? +# +# 31 15: 0 16384 CBM:RICH:Gas:PT-4 ? +# 31:16 512 CBM:RICH:Gas:FM-1 ? +# +# 32 31: 0 128e6 CBM:RICH:Gas:RefrIndex ? +# +# 33 15: 0 1 Padiwa Threshold offset +32768 + use warnings; use POSIX qw(strftime); use FileHandle; @@ -72,7 +158,7 @@ while(1) { # padiwa currents for(my $i = 0; $i < 16; $i++) { - my $milAmp = $epicsData->{"PC".$i}->{"val"} * 1000; + my $milAmp = ($epicsData->{"PC".$i}->{"val"} or 0) * 1000; $reg = 0 unless $i & 1; $reg |= ($milAmp & 0xffff) << (16 * ($i&1)); @@ -80,7 +166,8 @@ while(1) { } # threshold timestamp - my $threshTime = do($config{UserDirectory} . '/thresh/billboard_info'); + my $threshTime = (do($config{UserDirectory} . '/thresh/billboard_timestamp')) or 0; + my $threshOffset = (do($config{UserDirectory} . '/thresh/billboard_offset')) or 0; push @billboardValues, ($threshTime & 0xffffffff); # hv values @@ -102,6 +189,9 @@ while(1) { push @billboardValues, encInt($epicsData->{"RefrIndex"}->{"val"} , 128000000.0); + push @billboardValues, ($threshOffset & 0xffff); + + #print Dumper $epicsData; trb_register_write_mem($config{BillboardAddress}, 0xb100, 0, \@billboardValues, scalar @billboardValues); # copy data