MPET DAQ: Difference between revisions
m (1 revision imported) |
mNo edit summary |
||
Line 52: | Line 52: | ||
If the webpage is unavailable, log in to mpet@titan01, and type | If the webpage is unavailable, log in to mpet@titan01, and type | ||
mhttpd -D | mhttpd -D | ||
Line 61: | Line 61: | ||
=== Building the MPET DAQ software === | === Building the MPET DAQ software === | ||
To build the C++ code {{File|name=fempet}}, log onto ''' | To build the C++ code {{File|name=fempet}}, log onto '''lxmpet''' as user "mpet". | ||
cd ~/packages/mpet/build | cd ~/packages/mpet/build | ||
cmake .. | |||
make install | make install | ||
Revision as of 13:59, 9 January 2024
Links
- TITAN TITAN Page
- TITAN DAQ General Documentation
Hardware
MPET has:
- A PPG for programming pulses
- A 2-channel Tektronix AFG for generating RF (was previously two Agilent AFGs)
- A GSC 16ao16 to control the trap voltages (was previously an Alphi Softdac)
- An older VT2 TDC for recording timestamps
- A position analyzer to determine X/Y positions of ions
- A Lecroy LRS1190 memory buffer that records the X/Y position
- A newer CAEN V1290 25ps TDC for recording timestamps
Note that the VT2/V1290 TDCs are enabled in different ways:
- The VT2 has a "gate" that is set to 1 for the entire period that timestamps should be recorded
- The V1290 has a "trigger" that is issued at the end of the desired period; the times of any hits within the "trigger window" (normally 50us) before the trigger are recorded
The wiring diagram for the MPET DAQ is:
Software
The DAQ system is based on the MIDAS DAQ package. Software written for MPET is linked with the MIDAS libraries and uses common framework for MPET/CPET/EBIT.
The MPET software can be found at /home/mpet/packages/mpet on titan01 (note that historical versions of the software were located in /home/mpet/online).
Run control is done using the MIDAS webserver mhttpd with Custom Pages written for mpet users so that they can easily enter the parameters required to program the PPG and to run the DAQ.
The default login shell for the mpet user is now bash. If you want to use the legacy DAQ (which only supports the VT2/VT4 and Softdac, not the CAEN V1290 and GSC 16ao16), then change to the tcsh shell by typing 'tcsh'.
Program listing
In the order that programs appear on the Programs page:
- mserver - midas RPC server that allows the programs on lxebit to talk to the main experiment on titan01
- fempet - main MPET frontend that talks to the PPG, scans EPICS values etc. Runs on lxmpet.
- mhttpd - midas web server
- PPGCompilerFrontend - converts a user-supplied PPG program into bytecode that can be loaded onto the PPG
- saveload - helps save and load scan settings
- AfgFrontend - frontend that configures the Agilent Quad/Dipole AFGs at the start of each run (written in python)
- AfgTekFrontend - frontend that configures the Tektronix AFG at the start of each run (written in python)
- Logger - midas data logger
- mpetana - python analyzer that creates plots based on live data (plots are viewed via the Web plots page)
Starting and stopping DAQ programs
Programs can be started/stopped from the Midas programs page. All programs that appear on that page should be running (green status).
If the webpage is unavailable, log in to mpet@titan01, and type
mhttpd -D
Pulling the latest version of the MPET DAQ software
cd ~/packages/mpet git pull git submodule update
Building the MPET DAQ software
To build the C++ code fempet, log onto lxmpet as user "mpet".
cd ~/packages/mpet/build cmake .. make install
This will build the appropriate 32-bit frontend program that can be used by lxmpet.
Agilent vs Tektronix AFGs
In summer 2022, MPET bought a Tektronix 35052 2-channel AFG to replace two Agilent AFGs (both types of AFG are used to generate RF signals).
The Agilent AFGs could be programmed with a list of frequencies, with the next frequency being loaded when a PPG signal was issued. This allowed the frequencies to be scanned within a single PPG loop. The Tektronix AFG does have a sequencing option (if you pay extra money), but has severe limitations that do not allow it to be used the way we need (especially if wanting to run both channels simultaneously).
Therefore, when using the Tektronix AFG, the frequency must be scanned outside of the PPG loop (same as if you were scanning an EPICS PV or trap voltage).
AfgFrontend vs AfgTekFrontend
There are two separate programs that may be run:
- AfgFrontend is the program that controls the Agilent AFGs
- AfgTekFrontend is the program that controls the Tektronix AFG
The code has some sanity-checks to make it easier for you to determine which AFG was being used when looking at the midas files:
- The run will not start if both the Agilent and Tektronix frontends are running
- The run will not start if an Agilent AFG is set as "enabled" in the ODB, but the Tektronix frontend is running (or vice-versa)
Changing between the AFGs
To change from using the Agilent to Agilent AFG:
- Stop the AfgFrontend program on the Programs page
- Start the AfgTekFrontend program on the Programs page
- Go to the "RF (Tek)" page and configure the frequencies
To change from using the Tektronix to Agilent AFG:
- Stop the AfgTekFrontend program on the Programs page
- Start the AfgFrontend program on the Programs page
- Go to the "RF (Agilent)" page and configure the frequencies
For the Agilent AFG, the number of frequencies is determined by the number of loops of the "begin_ramp" loop of the PPG program.
For the Tektronix AFG, the number of frequencies is determined by the number of X/Y/Z scan steps. You may still have > 1 loops in the "begin_ramp" loop of the PPG program, but they will all be taken with the same frequency (take care of this when doing analysis!). Having > 1 loops is the lowest-latency (most efficient) way of increasing your statistics as the DAQ won't do anything until all the loops have completed; only then will there be some deadtime as the DAQ moves to the next scan point.
X/Y/Z scan ordering
For a 2D scan, all the Y points are covered at a given X point before moving to the next X point.
For a 3D scan, all the Z points are covered at a given X+Y point before moving to the next Y point. After all the Y points have been covered we move to the next X point.
So for a 3D scan, the Z variable is changed a lot more often than the X variable. For maximum efficiency, it is recommended that you use the Z variable for the parameter that is quickest to react to the change (e.g. EPICS voltages can be slow to react, so changing EPICS in the X variable and the frequency in the Z variable is likely to be most efficient).