====== Sweeper Software tools ====== * [[#Running the Swepper DAQ]] * [[#Readout GUI]] * [[#Mesytec CFD GUI]] * [[#Delay Window]] * [[#Trigger GUI]] * [[#Scaler Display]] * [[#Running in Slave mode with multilogger]] * [[#Troubleshooting]] ===== Running the Sweeper DAQ ===== This page gives user-level instructions on how to run the Sweeper data acquisition (DAQ) system for an experiment. Presently this is run from the linux machine [[Software#u5pc4 (data U5)|u5pc4]] in data-U5. ==== Readout GUI ==== The Sweeper Readout GUI is invoked by clicking the icon **Sweeper DAQ** in the desktop of [[Software#u5pc4 (data U5)|u5pc4]] or by navigating in a Linux terminal to the directory **/user/sweeper/develop/nscldaq** and typing ''godaq''. The Readout GUI window will appear with three tags labeled "main", "SSHPipe@xxxx:0", and "SSHPipe@xxxx:1" (where xxxx is the spdaq from which the DAQ is running). The first one provides general information about the ReadoutGUI. The second and third tabs provide information about the data sources (from the CCUSB and VMUSB controllers). Before beginning taking data is necessary to initialize the system. This is done by clicking ''Start'' in the ReadoutGUI. You can inspect the status of each source during their initialization by clicking in one of the tabs "SSHPipe@xxxx:0" or "SSHPipe@xxxx:1". You will see a series of messages about the different initialization steps. After initializing the contollers, the ReadoutGUI window will show the ''Begin'' button active. In addition, four additional buttons should appear at the end of the window. They can be used to start the GUI associated with the [[#Mesytec CFD GUI|MCFD]], [[#Delay Window|Delay XLM]], [[#Trigger GUI|Trigger ULM]], and [[#L3 Trigger GUI|Level3 Trigger XLM]] modules. Make sure that the system is completely initializing before opening those GUIs. NOTE: the GUI for the Delay XLM is was discontinued in 2015. The figure below shows the Readout GUI window after initializing the system. After clicking ''Begin'', the "Event Builder" window will pop out, displaying information about the Readout session. Data can be recorded on disk by checking out the box ''Record''. To end a data run, simply click ''End''. {{:wiki:readoutguisweeper.png|Readout GUI of Sweeper DAQ}} ==== Mesytec CFD GUI ==== The Sweeper electronics includes a Mesytec CFD (MCFD), used to "filter" the detector signals going to the Scaler and Mesytec TDC. The configuration parameters of the CFD (thresholds, delays, fraction, etc.) can be remotely adjusted via a MCFD GUI developed by the NSCL DAQ group. During tuning of the Sweeper, one typically needs to adjust thresholds only. Note that three different threshold ranges can be set using the "gain" button (values can be 0, 1, or 2). The MCFD GUI can be started by clicking the button ''Launch MCFD16Controls'' in [[#Readout GUI|Readout GUI]]. {{:wiki:mcfd16gui.png|MCFD GUI}} * To load the default CFD configuration go to **Load Setting**, select file **sweepermcfd16.tcl** in directory **/user/sweeper/develop/nscldaq/Config**, and click **Load** * Alternatively, it is possible to load the configuration directly from the module by clicking **Update from Device**. * By default, the CFD parameters can be adjusted individually for each of the 16 channels. It is also possible use the module in a "common" mode to set the same CFD parameters to all channels. Just check **common** * After modifying any of the CFD parameters, click **Commit to Device** * Don't forget to save the new settings in file **sweepermcfd16.tcl**. - Go to ''File'' - Click ''Browse'' and select directory **/user/sweeper/develop/nscldaq/Config** (default) - Select file **sweepermcfd16.tcl** and click ''Save'' - A warning window will pop out to verify that you want to overwrite the existing file. Answer ''Yes'' - Click again ''Save'' - Click ''Back'' to return to the main GUI * The MCFD module includes the possibility to send a periodic pulsing signal to all the channels. Two frequencies can be selected: 1.22 KHz, and 2.5 MHz ==== Level-3 Trigger GUI ==== The Level-3 trigger GUI gets started by clicking the button ''Launch Level3 Trigger GUI''. It can be used to select the trigger mode: (1) **Sweeper standalone** [Sweeper data are processed when there is a Sweeper trigger, typically coming from the Thin left-up PMT (''thin_LU'') of the FP scintillator]; (2) **Sweeper singles** (Sweeper, MoNA and LISA data are processed whenever there is a Sweeper trigger); and (3) **Coincidence Sweeper** (Sweeper, MoNA and LISA data are processed whenever there is a coincidence between the Sweeper and MoNA/LISA triggers). {{:wiki:l3gui-start.png|L3 GUI}} In order to set this module you must: * Select one of the three possible trigger configurations. IMPORTANT NOTE: When running the Sweeper DAQ in standalone mode always select **Sweeper standalone**. When running in Slave mode with MoNA/LISA, you can use either **Sweeper singles** or **Coincidence Sweeper** * Go to the tab ''FPGA Configure''. If the VME crate was power cycled you will need to load the firmware by clicking ''Load'' * In the tab ''FPGA Configure'', verify that the Coincidence Gate is set to the value 38 {{:wiki:l3gui-fpga.png|L3 GUI FPGA control}} * Click the buttons ''Set XLM'', followed by ''Write File'' * You can click on ''Check XLM'' to verify that the module is set properly. The ''Control page'' tab should look like this: {{:wiki:l3gui-control.png|L3 GUI control}} * Finally, it is possible to select a series of up to four different DAQ signals in the tab ''Signal Routing'' {{:wiki:l3gui-signalrouting.png|L3 GUI signal routing}} ==== Trigger GUI ==== {{:wiki:ulmgui.png?800|right|Trigger GUI}} The Trigger GUI appears when the ''Launch ULMTriggerGUI'' button is pressed on [[#Readout GUI]]. The Trigger GUI is a visual display of the various Gate and Delay Generators and logic elements that make up the configurable trigger of the Sweeper. The logic of the trigger decision is readily discerned from a visual inspection of this GUI. Setting the trigger configuration is also done using this GUI. In the standard configuration, the ULM trigger is provided by ''External2'', which comes from the Level3 module. This module provides the trigger condition and a vetoed timestamp used to synchronize events registered by the CCUSB and VMUSB controllers. The different signal going through the trigger scheme can be inspected in th Data-U5 oscilloscope. Simply right click on any of the wires to put that signal onto one of the four "Trigger Inspect" channels available at the patch panel of Data-U5, and connect that patch-panel cable to the oscilloscope. By inspecting the various delays, widths and overlaps the user trigger can be configured. In the figure shown above, the trigger inspect channel 1 corresponds to "External 2"; inspect channel 2 corresponds to Sweeper raw trigger (labeled "S800); and inspect channel 3 corresponds to "Live trigger". ==== Delay Window ==== This GUI was discontinue in 2015 and is no longer supported. ==== Scaler Display ==== The GUI used to display scalers rates can be open from the icon **Scalers Sweeper** in the desktop of [[Software#u5pc4 (data U5)|u5pc4]]. Alternatively, open a terminal on u5pc4, and type **./goscalers** from directory **/user/sweeper/develop/scalers**. The GUI includes three pages labeled "sweeper", "scaler 2", and "ratios" (see figure below). Page "sweeper" includes all the scaler channels; page "scaler 2" includes scaler signal from MoNA/LISA (ask MoNA/LISA group for further details); page "ratios" displays ratio values calculated between several pairs of channels. In addition, the GUI includes a panel showing the time evolution of the live time calculated from the live-to-raw trigger ratio, and the live-to-raw clock ratio. The figure below shows the page "ratios" from the scaler GUI. A list of scaler channels can be found [[Scaler Channel Description|here]]. {{:wiki:scalergui.png?700|Scaler Display}} ==== Running in Slave mode with multilogger ==== The Sweeper DAQ can be run in Standalone mode (as described above), or in Slave mode. The later means that the Sweeper DAQ is controlled by an external Master DAQ. This is the standard DAQ configuration when running the Sweeper DAQ along with the MoNA and LISA DAQs. By default, when running in Slave mode, data are recorded in the stagearea of the Master DAQ (experiment account). It is however possible to record simultaneously data from the Sweeper ringbuffer (called ''sweeper'') into the Sweeper stagearea, using the ''multilogger'' option (see ReadoutGUI figure above). When running XDT for an experiment with a Master DAQ, it is recommendable to run the Sweeper DAQ with the sweeper multilogger enabled. This can be done following the steps: * Click to the tab ''multilogger'' in the Sweeper **ReadoutGUI** * Select the option "always record" * Click again on the tab ''multilogger'' and select "enable loggers". A window will pop out with a list of ring-buffers that can be muti-logged {{:wiki:multilogger-sweeper.png|Multilogger window}} * Check out ''sweeper'' to enable recording data from this ring buffer * After this, Sweeper data from every run recorded by the experimenters, will also be recorded in the Sweeper stagearea. * After finishing XDT, it is better to disable the sweeper ring-buffer in the multilogger menu so the Sweeper stagearea doesn't record all data from the experiment. ===== Troubleshooting ===== There are several common reasons why the Sweeper DAQ may fail to start. The list below describes what to do to fix these problems. * [[#Old processes still running]] * [[#No data sources defined]] * [[#CCUSB and/or VMUSB claimed by existing programs]] * [[#Manual rebooting]] ==== Old processes still running ==== Sometimes, particularly if the previous Sweeper DAQ session ended in an uncontrolled way, there may be old processes running (CCUSB and/or VMUSB and or Sweeper event builder) that will prevent Readout GUI to begin a run. Whenever this happens (typically after clicking ''Begin'' in Readout GUI), the system sends an error message complaining about one of these processes still running. If you find yourself in this situation try: - Exit your Readout GUI properly - On a Linux session, connect to spdaq34 by typing ''ssh -Y sweeper@spdaq34'' (ask the Device Physicist to get the Sweeper password) - Type ''ps aux | grep Readout'' to ensure that Readout is indeed not running - Type ''/usr/opt/nscldaq/xxxx/bin/ringbuffer status'', where xxxx is the daq version, e.g. 11.2-004 - You will see a list of ringbuffers with information about their status (see figure below). Check that the producer value of each ringbuffer (see column ''producer'') is **-1**. - If the producer value of a ringbuffer is not -1, take note of the PID, and kill the process by typing ''kill -9 PID'' - You should now be able to run Readout GUI and begin a run without problem {{:wiki:ringbufferstatus.png?850|Ringbuffer status}} ==== No data sources defined ==== When clicking ''Begin'' in the Sweeper Readout GUI, you get the error message: "No data sources are running so a run cannot be started". Very likely, the setting file **.settings.tcl** is missing. On a Linux session in u5pc4, type ''ls -lisa ~/stagearea''. You should see a hidden file **.settings.tcl**. If no, try the following: - Go to **/mnt/daqtesting/sweeper/exxxxlast**, where **exxxxlast** corresponds to the experiment number of the last (successfully) run experiment - Copy the file **.settings.tcl** from that directory to the current stagearea. **NOTE**: we are assuming that the stagearea is pointing to the new experiment directory **/mnt/daqtesting/sweeper/exxxxnew** - If you cannot find that file, contact the Device Physicist - You should now be able to run ReadoutGUI without problem ==== CCUSB and/or VMUSB claimed by existing programs ==== One of the most common reasons why the Sweeper DAQ fails to start is because the CCUSB and/or VMUSB are claimed by existing programs. This is shown by the error messages displayed by the system. If you find yourself in this situation try the following: - Log on to Sweeper spdaq - Type ''ps aux | grep Readout'' - Use ''kill -9 PID'', where PID identifies any CCUSBReadout or VMUSBReadout processes that show up - Use ''kill -9 PID'', where PID identifies any tclsh ReadoutShell process that might show up - Try ''godaq'' to see if this works now - If this didn't help, contact the Device Physicist ==== Manual rebooting ==== In the rare case that the RunControl GUI gets "frozen", it is possible to reboot the whole system manually. This operation requires to turn off the VME and CAMAC crates, and the spdaq computer, all them located in the rack seating near the FP box in the Sweeper vault. Then, the system must be turned back on in the following order. First, CAMAC crate, second VME crate, and third spdaq. PLEASE, contact the Device Physicist before trying this last-resource operation.