From 2323717914f1593ca6d13516ac28f269785c0600 Mon Sep 17 00:00:00 2001 From: Jan Michel Date: Fri, 3 Oct 2014 14:25:35 +0200 Subject: [PATCH] more ADC control registers --- web/htdocs/addons/adc.pl | 44 +++++++++++++++++++++++ xml-db/database/ADC.xml | 78 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 122 insertions(+) create mode 100755 web/htdocs/addons/adc.pl create mode 100644 xml-db/database/ADC.xml diff --git a/web/htdocs/addons/adc.pl b/web/htdocs/addons/adc.pl new file mode 100755 index 0000000..9e2c6ad --- /dev/null +++ b/web/htdocs/addons/adc.pl @@ -0,0 +1,44 @@ +#!/usr/bin/perl +if ($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i) { + print "HTTP/1.0 200 OK\n"; + print "Content-type: text/html\r\n\r\n"; + } +else { + use lib '..'; + use if (!($ENV{'SERVER_SOFTWARE'} =~ /HTTPi/i)), apacheEnv; + print "Content-type: text/html\n\n"; + } + +use CGI ':standard'; +use XML::LibXML; +use POSIX; +use CGI::Carp qw(fatalsToBrowser); + +use lib qw|../commands htdocs/commands|; +use xmlpage; + +my $page; + +$page->{title} = "ADC AddOn"; +$page->{link} = "../"; + +my @setup; +$setup[0]->{name} = "BufferConfig"; +$setup[0]->{cmd} = "ADC-0xfe4b-BufferConfig"; +$setup[0]->{period} = 5000; +$setup[0]->{address} = 1; + +$setup[1]->{name} = "ProcessingConfig"; +$setup[1]->{cmd} = "ADC-0xfe4b-ProcessingConfig"; +$setup[1]->{period} = 5000; +$setup[1]->{address} = 1; + + +xmlpage::initPage(\@setup,$page); + + + + +1; + + diff --git a/xml-db/database/ADC.xml b/xml-db/database/ADC.xml new file mode 100644 index 0000000..af59fd5 --- /dev/null +++ b/xml-db/database/ADC.xml @@ -0,0 +1,78 @@ + + + Control and Status registers related to ADC AddOn + + + + + + + Configuration of buffer handling + + Number of samples to be stored in the buffer + + + + + Number of samples to take after reference time signal arrived + + + + + How many blocks of different downsampling settings should be processed + + + + + Offset from the calculated baseline that must be reached to generate a trigger signal for the CTS + + + + + Offset from the calculated baseline that must be reached to transmit data during readout (Zero Suppression) + + + + + Downsampling of ADC samples before storing in buffer + + + + + Averaging time for baseline calculation. 2**N samples are taken. Baseline is calculated from buffer output data, triggered events are suppressed. + + + + + + + Number of values to sum for each output data word + + + + Number of output data words to produce + + + + Scaling factor. Sums are divided by 2**N before written to the data stream. + + + + + + -- 2.43.0