]> jspc29.x-matter.uni-frankfurt.de Git - daqtools.git/commitdiff
add xml file for automatic ADC reader
authorJan Michel <j.michel@gsi.de>
Tue, 23 Aug 2022 15:16:59 +0000 (17:16 +0200)
committerJan Michel <j.michel@gsi.de>
Tue, 23 Aug 2022 15:17:11 +0000 (17:17 +0200)
web/htdocs/addons/mdcupgrade.pl
xml-db/database/ADC_Controller.xml [new file with mode: 0644]
xml-db/database/MDCUpgrade.xml

index cbb2817ec53869310db74e83b882298a6895e915..6d22ff360d4ffce8727fed3cf30c4852d859bf4c 100755 (executable)
@@ -41,6 +41,16 @@ push(@setup,({name      => "HitCount",
               rates     => 1,
               address   => 1}));              
 
+push(@setup,({name      => "ADCControl", 
+              cmd       => "ADC_Controller-0xfe90-Control",
+              period    => 1000,
+              rates     => 1,
+              address   => 1}));  
+push(@setup,({name      => "ADCResult", 
+              cmd       => "ADC_Controller-0xfe90-Results",
+              period    => 1000,
+              rates     => 1,
+              address   => 1}));  
 xmlpage::initPage(\@setup,$page);
  
 
diff --git a/xml-db/database/ADC_Controller.xml b/xml-db/database/ADC_Controller.xml
new file mode 100644 (file)
index 0000000..839a6cb
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0"  encoding="utf-8" ?>
+<TrbNetEntity xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+              xsi:noNamespaceSchemaLocation="../schema/TrbNetEntity.xsd"
+              name="ADC_Controller"
+              address="d480"
+              >
+  <description>Registers for the onboard ADC for Trb3sc++</description>
+  <group name="ADC" address="0000" size="16" continuous="false">
+  <group name="Control" address="0000"  size="10"  purpose="config" mode="rw" continuous="false">
+
+    <register name="Commands" address="0000" repeat="4" continuous="true">
+      <description>ADC Configuration</description>
+      <field name="FullReg" start="0" bits="20" format="hex"  noflag="true" mode="rw">
+        <description>Full command register</description>
+      </field>
+      <field name="ChannelSelect" start="12" bits="2" format="unsigned"  mode="r">
+        <description>Channel number</description>
+      </field>
+      <field name="RangeSelect" start="9" bits="3" format="enum" mode="rw">
+        <description>Set the conversion range</description>
+        <enumItem value="0">6.144V</enumItem>
+        <enumItem value="1">4.096V</enumItem>
+        <enumItem value="2">2.048V</enumItem>
+        <enumItem value="3">1.024V</enumItem>
+        <enumItem value="4">0.512V</enumItem>
+        <enumItem value="5">0.256V</enumItem>
+        <enumItem value="6">0.256V</enumItem>
+        <enumItem value="7">0.256V</enumItem>
+      </field>
+      <field name="RateSelect" start="5" bits="3" format="enum" mode="r" unit="SPS">
+        <description>Conversion speed select</description>
+        <enumItem value="0">8/64</enumItem>
+        <enumItem value="1">26/64</enumItem>
+        <enumItem value="2">32/128</enumItem>
+        <enumItem value="3">64/256</enumItem>
+        <enumItem value="4">128/512</enumItem>
+        <enumItem value="5">250/1000</enumItem>
+        <enumItem value="6">475/1900</enumItem>
+        <enumItem value="7">860/3440</enumItem>
+      </field>      
+      <field name="CorrectionFactor" start="16" bits="4" format="enum" mode="rw">
+        <description>Factor used on result, e.g. in case a voltage divider is used</description>
+        <enumItem value="0">ERROR</enumItem>
+        <enumItem value="1">x1</enumItem>
+        <enumItem value="2">x2</enumItem>
+        <enumItem value="4">x4</enumItem>
+      </field>
+    </register>
+    
+    <register name="Config" address="0005" >
+      <description>Configuration Register</description>
+      <field name="Enable" start="0" bits="1" format="boolean" mode="rw" >
+        <description>Enable ADC readout</description>
+      </field>
+      <field name="WaitTime" start="8" bits="8" format="unsigned" scale="0.5" unit="ms" mode="rw">
+        <description>Time between two readout cycles</description>
+      </field>
+    </register>
+  </group>
+  
+   
+  <group name="Results" address="0008"  size="5"  purpose="status" mode="r" continuous="true">
+    <register name="Channel" address="0000" repeat="4">
+      <description>Readback value</description>
+      <field name="Channel" start="0" bits="18" format="unsigned" unit="mV" scale="0.0625" noflag="true" mode="r" />
+    </register>    
+    <register name="Temperature" address="0004">
+      <description>ADC Temperature</description>
+      <field name="Temperature" start="0" bits="18" format="float" unit="&#x2103;" scale="0.00390625" noflag="true" mode="r" />
+    </register>       
+  </group>
+</group>  
+    
+</TrbNetEntity>  
index b299f505e049baa6c6b4955a087c5ec35bd181fa..f85a0b0ba3df7a39df09667734e347bfeb65fb5e 100644 (file)
@@ -6,7 +6,7 @@
               >
   <description>Registers for the upgraded MDC electronics</description>
 
-  <group name="TDC" address="c000"  size="128"  purpose="config" mode="r" continuous="false">
+  <group name="TDC" address="c000"  size="11000"  purpose="config" mode="r" continuous="false">
 
     <register name="BoardConfig" address="1580" >
       <description>Board COnfiguration</description>
@@ -19,6 +19,9 @@
       <field name="TestPulse" start="24" bits="4" format="bitmask" errorflag="true" mode="rw">
         <description>Set test signal for Pasttrec</description>
       </field>
+      <field name="PtDisable" start="30" bits="2" format="bitmask"  mode="rw">
+        <description>Powerdown group of Pasttrec</description>
+      </field>          
     </register>
     
     <register name="ChannelEnable" address="0000" >
         <description>Status of the data collector FSM</description>
       </field>    
     </register>
-  </group>
+
+    
+    
+    </group>
   
    
   <group name="SpikeCounter" address="c120"  size="32"  purpose="status" mode="r" continuous="true">