Project

General

Profile

LV Commands and Running a Noise-scan

cd gm2trackerdaq/software

On/Off

To switch the LV on/off, use the script

python LowVoltage/SendLVCommands.py -c "ona 2" 
python LowVoltage/SendLVCommands.py -c "onb 2" 
python LowVoltage/SendLVCommands.py -c "offa 2" 
python LowVoltage/SendLVCommands.py -c "offb 2" 

The second argument is the slot number and a/b refers to the channel ie LB-0 or LB-1.

Exit slow control mode

python LowVoltage/SendLVCommands.py -c "exitSC" 

Run a noise scan

  • Turn on the fan for the flobbers and water-cooling for manifold.
    cd gm2trackerdaq/software
    source setup.sh
    
  • Make sure the software is built else you will get errors about PyGm2TrackerDAQ not being found by the python
    make
    
  • Check cfg/DAQ-daqXXX.xml config file
    The important parameters that should be checked are:
        <dir name="Globals">
             <key name="Trigger source" type="STRING" size="256">MasterEOF</key>
    
        <dir name="TDC Common Config">
             <key name="Accumulation duration ns" type="DWORD">10000000</key>
    
        <dir name="AMC13-0">
            <dir name="Config">
               <key name="Present" type="BOOL">y</key>
               <key name="Enabled" type="BOOL">y</key>
    
    # CHECK THINGS ARE PRESENT AND ENABLED AND BOARD COUNTS ARE CORRECT
    
        <dir name="FC7-0">
          <dir name="Config">
            <key name="Present" type="BOOL">y</key>
            <key name="Enabled" type="BOOL">y</key>
            <key name="Num logic boards" type="WORD">2</key>
    
          <dir name="LB-0">
            <dir name="Config">
              <key name="Present" type="BOOL">y</key>
              <key name="Enabled" type="BOOL">y</key>
              <key name="LV channel" type="WORD">3</key>   # THIS IS THE SLOT IN THE LV-CRATE (1 IS CONTROLLER, 2 IS NEXT SLOT)
              <key name="LV output" type="WORD">0</key>    # 0 IS CHANNEL-A FOR THE S/C
    
         <dir name="LB-1">
            <dir name="Config">
              <key name="ID" type="WORD">1</key>
              <key name="Present" type="BOOL">y</key>
              <key name="Enabled" type="BOOL">y</key>
              <key name="LV channel" type="WORD">3</key>
              <key name="LV output" type="WORD">1</key>   # 1 IS CHANNEL-B FOR THE S/C
    
            <dir name="TDC-x">   # CHECK ALL THE TDCs are ENABLED
              <dir name="Config">
                <key name="ID" type="WORD">0</key>
                <key name="Present" type="BOOL">y</key>
                <key name="Enabled" type="BOOL">y</key>
    
    
  • Make sure loop-back is enabled on AMC-13
  • Switch on the LV power to the logic boards
    python LowVoltage/SendLVCommand.py "ona 3" 
    python LowVoltage/SendLVCommand.py "onb 3" 
    
  • Configure the DAQ and check all is well.
    python test/SetupDAQ.py
    python test/SendTriggerAndReadEvent.py -u
    

    The latter should only give two errors.
  • Run the noise scans:
    python test/NoiseScan.py -lb AMC13-0/FC7-0/LB-0
    mv NoiseScanResult.txt NoiseScan-x1.txt  # Move to something descriptive
    python test/NoiseScan.py -lb AMC13-0/FC7-0/LB-1
    mv NoiseScanResult.txt NoiseScan-x2.txt  # Move to something descriptive
    
  • Plot results and save summary information to a file e.g.
    python test/plotNoiseScanResults.py --file=../../../NoiseScans/NoiseScan-31Jan2017-LB1-Slot3.txt --comment="LB-1/Slot-3" --summaryFile=../../../NoiseScans/NoiseScan-NewLV.txt
    python test/plotNoiseScanResults.py --file=../../../NoiseScans/NoiseScan-31Jan2017-LB0-Slot3.txt --comment="LB-0/Slot-3" --summaryFile=../../../NoiseScans/NoiseScan-NewLV.txt
    

    Note there are two arguments --file is the above file created by the noise-scan and --summaryFile has the results : mean, 95% CL, max etc and is the file used by the command:
    python test/plotNoiseScanResults.py --file=../../../NoiseScans/NoiseScan-NewLV.txt -s
    

    To create a summary plot. If the summary file doesn't exist it is created, else it is appended to.
    The png files are created in the same directory as the input --file