Running Oscilloscope DAQ

From MariachiWiki

Contents

Running Oscilloscope Data Acquisition System

Be sure to understand the function of the program. It's passive. First you need to set up an oscilloscope so it triggers on event of your interest and put it in a Single Sequence Acquisition mode. Then the program can be used to automatically record waveforms being acquired by the oscilloscope. It works as follow:

  1. it puts the oscilloscope in the READY mode which means the trigger is armed and the device is waiting for the next event which would trigger it
  2. it waits until the oscilloscope actually triggers
  3. it reads waveforms as sets of numbers representing voltage measurements at numerous points which form the waveforms on the screen and write this information to a hard drive. It might take up to 4 seconds to read out all the data.
  4. it goes to step (1)

The collected piece of information is commonly called an event.

To run the program do the following:

  • Log in (if not already there) a computer using User account (no password is required)
  • Open "Mariachi DAQ" folder on the desktop, then goto "Scope-DAQ" subfolder, run (double-click) "daq-scope.vi". This window should pop up.
    • The program is not running yet. To run it press the right arrow button Image:Lv-start-butt.png in the top left corner of the program window.
    • If everything is right the program should put the oscilloscope into the READY state (you'll see the yellow note "Ready" in the top of the oscilloscope screen (real one)). When the oscilloscope acquires data they will be read out and recorded to a hard disk in the file named in "WF file" box (see the picture), dash and the current date will be added to the file name automatically. The pulses from each channel will be represented in oscilloscope-like graphs: (all together, the top graph in the picture) and separately (four lower graphs). The cycle continues until you stop the program.
    • Other program screen elements: Events shows how many events were read out so far (7077 in the picture), Rate shows average rate events are collected, Time since last event shows how much time passed since the recording of the last event.
    • Normally you don't touch top left elements in the screen. They should have the following readings: VISA resource name should start with "USB0::", Timeout should be 5000ms (5seconds), Setting up button which is for setting up some trigger options should be unpressed and read "Skip" (no trigger option are set programmably).

N.B. When you stop and start the program again and you don't change the name for the output the file (WF file ) the program appends information on new events to the end of the existing file. While it sounds ok it might be difficult to separate events of one run from another one if you meant different measurement. Also if the program was not stopped gracefully the previous time the end of the file may be corrupted. Appending informatiion to the corrupted end might make it impossible to reach and process it later.


To stop the program

press the "STOP" button on the left of the graphs. It might take a few seconds for the program to stop.

Converting recorded waveforms to pulse characteristics measurement

At a previous step waveforms corresponding to each event were recorded to a hard drive. It's vast amount of information not very much useful directly. The program described below process this information to extract more ready to use values such as pulse height, widths, relative times and more.

  • Double click to "daq-cov2meas.vi" to start the program. The following window pops up:
    • Pick up a file for the "File to Read" box. You can use a folder sign for that. This is a waveform file written by the previous program which is to be processed.
    • If "Auto write file name" is checked (recommended) the name for the output file (with useful values regarding pulses) will be formed automatically which means that it will be in the same folder as a "File to Read" and have the same name but a ".txt" ending. This is no matter what is written in the "File to write" box. If not checked the output file name will be whatever is written in the "File to write" box.
    • "Cut off pulse height" dial should not be touched normally and should be at 10 (mV). This means that the program won't attempt to extract the values for pulses smaller than 10mV because they probably too small to do so reliably.
    • The program is started with clicking on the arrow button Image:Lv-start-butt.png. Depending on the size of an input file it can take up to a few minites to process it. The result is a text file of the format described below.

The measurement file format

The file is a simple text file having one line per event. The format of the line is

ver data time h1 h2 h3 h4 w1 w2 w3 w4 t1 t2 t3 t4 q1 q2 q3 q4 r1 r2 r3 r4 

e.g.

wf1.0 20070430 140153.9531250 0.092 0.054 0.053 -0.007 47.2E-9 33.7E-9 37.440E-9 0.00
     -67.0E-9 -67.5E-9 -84.9E-9 0.00 94.8 47.2 48.5 0.00 12.5E-9 10.2E-9 12.3E-9 0.00

It's really one line in a file but here is shown in 2 pieces. h, w, t, q, r stand for a pulse height, width, time, charge and rise time. ver has only programmatic meaning which is not important here, data and time tell when the record was done. In the example above the record was done on April 30, 2007 at 2:01:53.953125pm (2 hours, 1 minute, 53.95... seconds, pm). The first pulse had a height of 92mV, widths of 47.2ns. It came at -67ns in respect to some origin time common to all pulses. The pulse curried a charge of 94.8pC (pica Coulomb) and had a rise time of 12.5ns. The corresponding numbers for the second pulse are 54mV, 33.7ns, -67.5ns, 47.2pC, 10.2ns. It's similar for the third and fourth pulses (except that for the fourth pulse all the values but the height are zeros, see Notes below for the explanation of that).

Notes:

  • The value for the pulse height, as you could see, can be negative. That doesn't, of course, mean that the pulse rises up instead of falling down. It's just a mean to indicate that (1) either the program didn't attempt to extract values for this pulse (except the height itself) because it's too small according to the value of the cutoff threshold (normally set up at 10mV, but can be changed before the processing is done, see the previous section) or (2) it tried and failed at calculation of some value. In the case of (2) the width of the corresponding pulse is set to -1 to distinguish (2) from (1). Thus in the example above the height of the fourth pulse (7mV) was considered to be too small (<10mV) this pulse to be processed (the rest of the values are all zeros). If you saw its height were -0.016 (16mV>10mV) that would mean that the program failed to calculate some value and the width of the pulse would be -1 in confirmation of that.
  • Time recored in date, time fields is an UTC time.
  • Width of a pulse is measured at its half height
  • t1,...,t4 times are measured in respect to some common origin (perhaps, the trigger time). Since the origin is common you know relative times (time differences between any two pulses) precisely.
  • Charge curried by a pulse is proportional to the area under the pulse
  • Rise time is the time it takes for a rising edge of the pulse to rise between 15 and 85% of the pulse height

Troubleshooting

Troubleshooting the daq-scope program

if it doesn't work and the program gives pops up an error window it's worse to check the following:

  • see if the back of the oscilloscope is connected to the computer with an USB cable
  • pull down VISA resource box, select "Refresh". You should still see a string "USB0::..." and be able to select it. If you don't see it double check the physical connection between the oscilloscope and a computer (USB cable)
  • If "Setting up" button is ON (Red, not recommended) the program will set up trigger so it reacts on rising edge of a pulse in the EXT TRIG channel. This might not be what you wanted. Release the button, set the trigger again manually.

Troubleshooting the Convertion program

Most often problem with this program is that it cann't read the input file starting from some place in the middle of it. If you are not a skilled computer user there is probably nothing you can do about that. You can repeat the corresponding measurement though. If you really need to fix it the way to go is to identify the bad event in the input file and remove it. The input file is also a text file although usually big, multi-megabyte one. The bad event number can be identified by observing how many events were still written to the output file (the number of lines there). It can be removed in a text file editor program. Standard Windows editors (Notepad, Wordpad) are not good for that. On Linux any editor seems can handle that.