DRS4 Forum
  DRS4 Discussion Forum, Page 35 of 45  Not logged in ELOG logo
    Reply  Tue Feb 27 18:12:32 2018, Stefan Ritt, DRS4 Dead times 
For applications which are critical on the dead time, one typically uses one ADC per DRS4 channel, and thus the dead time stays at 32us. If you multiplex
two DRS4 channels into one ADC channel, then it goes to 32us.

Stefan
    Reply  Fri Mar 2 20:17:17 2018, Stefan Ritt, ROI  
N'/N is correct. The 2 us "from the response you got from me" come from the fact that after readout, you have to start the DRS4 again.
During this time, the power supply usually becomes slightly unstable, and it takes on the evaluation board about 2us to stabilize it again. Tha't why
I add the 2 us. If you don't care about slight offset effect, or if you make a better power supply, you dead time would be 10*30ns = 300ns for 10 samples.
    Reply  Thu Mar 15 08:44:26 2018, Stefan Ritt, sub-ms precision timestamps? 
Putting sub-ms precision into the header does not make sense, since the USB transfer only happens in time-slots of about 2 ms. To get better timing,
you would need a hardware time clock in the FPGA, which does not exist right now.

Best,
    Reply  Fri Mar 16 14:00:06 2018, Stefan Ritt, confusion about the description in drs.cpp 
The FPGA is very small, so it only has an address space of 256 bytes. Look at the definition in DRS.cpp

#define USB_CTRL_OFFSET                
0x00    /* all registers 32 bit */
    Reply  Mon Mar 19 15:12:02 2018, Stefan Ritt, Running drs_example.cpp 
The time channel is already calibrated in ns. So for 5 GSPS, the time scale goes from zero to 200. Concerning your other issues I will come back to you
later.

Stefan
    Reply  Mon Mar 19 16:22:42 2018, Stefan Ritt, ROI  
The DRS4 has an internal storage of 1024 capacitors. They work as a ring buffer, so at 5GSPS you can store 200ns wide signals. After 200ns, the first
samples are overwritten by new samples, so you always have the last 200ns of samples stored. Once you trigger the DRS4, this buffer is frozen, and the
readout of this buffer causes the dead time. No trigger, no dead time. Hope this answers your question.
    Reply  Fri Mar 23 09:39:55 2018, Stefan Ritt, Read the CalibrateWaveform 
You don't have to read and calibrate the waveforms in your user code, but can rely on the DRS.cpp library to do that. Just look at the drs_exam.cpp
program coming with the distribution. It uses the function b->GetWave() to retrieve the calibrated waveform. If you like, you can look into that function
to learn how to apply the calibration, but I can tell you that it's a bit complicated. Since each event starts at an arbitrary stop cell in the DRS4,
    Reply  Tue Apr 17 13:28:23 2018, Stefan Ritt, DRS4 read_binary.cpp  
On the software download page at https://www.psi.ch/drs/software-download you find a link to all versions of the DRS software, which is located
at: https://www.dropbox.com/sh/clqo7ekr0ysbrip/AACoWJzrQAbf3WiBJHG89bGGa?dl=0

Earch .tar.gz file has a date, which should help you find the correct version.
    Reply  Wed May 2 09:24:53 2018, Stefan Ritt, DRS4 using drs_exam.cpp to save as binary files 
You have to write the C/C++ code yourself to write data in binary or any other format. All information is present after the waveform readout in drs_exam.cpp,
so it's just a matter of proper write() functions. Please consult any C/C++ handbook on how to write to files.




Hyunseong
    Reply  Wed May 2 12:12:42 2018, Stefan Ritt, Peak at 0 mV in traces 
I note that your peak at zero is exactly twice as high as the bins left and right, so this looks to me like a binning problem in your histogramming.
Maybe your bin #0 goes from -1mV to +1mV, which all other bins are just 1mW wide. Can you check that?

Stefan
    Reply  Fri May 4 11:35:20 2018, Stefan Ritt, Peak at 0 mV in traces Screen_Shot_2018-05-04_at_11.36.24_.png
I tried the following:

- trigger on a 10 MHz sine wave on CH0, CH1 was open

- run drs_exam.cpp program and write data.txt with a few events
    Reply  Fri May 4 11:56:08 2018, Stefan Ritt, Voltage and Timing Calibration in drs_exam.cpp 
Have you set the sampling frequency 

b->SetFrequency(5, true);

before the calibration?
    Reply  Fri May 4 12:11:57 2018, Stefan Ritt, Running drs_example.cpp 
And here is the second part of your answer: When you change the input range, you have to redo the voltage calibration. Best is if you do that in the
DRSOsc program, then you see that it's working. Then start your custom program and use the same range.

Stefan
    Reply  Sun May 6 11:45:09 2018, Stefan Ritt, confusion about the description in drs.cpp 
The locbus_addr is indeed 32 bits wide, since the firmware was originally derived from some firmware running in a VME crate, and the VME bus has 32 bits
or addressing. So you will still find some "historic" remnants from that era. In the USB firmware, lcobus_addr[32:8] is always zero. Sorry for
the confusuion.
    Reply  Tue May 8 14:43:03 2018, Stefan Ritt, Peak at 0 mV in traces 
The DRS chip is read out with a 12 bit ADC, thus the phyical resolution is roughly 1V/4096 = 0.24 mV. I say roughly since the DRS has an analog gain
of 0.98, which is corrected for. Now you have integer values which are converted into floating point numbers my multiplying them with ~0.24mV. If you then
do histogramming with different bin sizes such as 0.1 mV and 0.35 mV , you get aliasing effects. The code truncates the result to 0.1 mV, which can give
    Reply  Wed May 9 09:03:52 2018, Stefan Ritt, Manual Rev5.1 Figure 1, optional components 
I updated the picture in the manual with a current picture of a Rev5.1 board, and also added a picture of the bottom side. If you need a picture without
the blue labels, have a look at https://www.psi.ch/drs/old-evaluation-boards at the bottom.

Here is the explanation of the optional components:
Entry  Thu May 17 13:29:34 2018, Stefan Ritt, "Symmetric spikes" fixed with.pngScreen_Shot_2018-05-17_at_13.30.23_.pngwithout.png
Good news for all DRS4 users. After many years, I finally understand where the "symmetric spikes" come from and how to fix them.

The "symmetric spikes" are small spikes of 17-18mV, which randomly happen at 1-2 cells. They alwas come in groups of 2 in each channel,
symmetric around sampling cell #512. See first attachment.
    Reply  Fri Jun 8 08:11:05 2018, Stefan Ritt,  
Several people reported this problem, but we cannot reproduce it at our lab. Both the oscilloscope and the command line interface use exactly the same
code to connect to the board. Have you tried the solution reported here: elog:657 ?

Best,
    Reply  Wed Jun 13 13:42:47 2018, Stefan Ritt, Maximum analog input voltage 
In principle the numbers in the manual are correct. But they relate to pulses of a certain length, because the input protection only works for DC voltage
and for pulses which are not too long. Since we could not write this all on the label of the board, we decided to put there 100% safe value as a "warning"
to people, meaning that if pulses are above 2.5V, they should look into the manual and read the details. 
    Reply  Tue Jun 19 10:05:50 2018, Stefan Ritt, The data acquisition speed 
How do you tigger the board? In your code below you start the board (StartDomino()) and then wait for a trigger. Setting the trigger level to zero (via
SetTriggerLevel(0)) is certainly wrong. Please have a look at drs_exam.cpp in the distribution and use the same functions used there. If you want to trigger
the board, you need some external pulser with high enough rate (more than 500 Hz or course). You can also "software" trigger the board with a
ELOG V3.1.5-2eba886