High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

Need a little help in understanding ni-scope measurement functionality

Solved!
Go to solution

Hi,

I have PXI 5124 and recently started using it. My task is to measure positive pulse widths so I followed the example vi: niScope EX Measurement Library.vi by modifying it a little ( removed the while loop and changed the record length and trigger settings) to use it for my needs. I have attached this modified vi and also the screenshots of the pulse widths that I need to measure.

 

I would appreciate it, if someone could verify or suggest if the path I followed is the right.

 

I am using immediate triggering to get the pulse widths( This is probably not the optimum way.) I set the scope to get 1 record with a length of 16,000 samples at 20MS/s and then use the niScope Multi fetch measurements stats.vi  to get the pulse width. I would like to know if the scope in this setup returns the average of the pulse width for the waveform obtained in this acquisition or does it return the pulse width of the 1st pulse after the scope's immediate trigger? 

 

Also, If the scope return the pulse width of the first pulse after the imm trig, then should I do Scope Read and Scope Fetch measurements vi in a loop. I ask this because currently I get the value 1 in the 'num in stats' section of the Measurements indicator and I was wondering if by looping it a few times I might get a better result as I will be able to get more records. 

 

thanks.

Download All
Message 1 of 2
(6,179 Views)
Solution
Accepted by tarunA

Hi taurna,

 

The Measurement Stats.vi is going to take a measurement across the full waveform acquired in that particular record.  From the help on the Multi Fetch Measurements Stats.vi:

 

The waveform on which the digitizer calculates the waveform measurement is from an acquisition that you previously initiated.

 

But according to the Positive Width measurement, you are only seeing the first pulse width.  The definition of the measurement can be found below (take note of the use of 'first two mid'):

 

Positive Width

C/C++ Equivalent: NISCOPE_VAL_WIDTH_POS

The time difference in seconds between the first two mid reference level crossings, where the slopes are positive and negative respectively. A digital hysteresis is used when finding the crosspoints.

 

From the help on the num in stats section:

 

num in stats returns the number of measurements used to calculate the statistics.

 

By saying '1' here, it did a single measurement on your single acquisition you took, since the while loop was taken out of your code.  If you would like multiple measurements to be made, you would need multiple acquisitions. 

 

Kyle A.
National Instruments
Senior Applications Engineer
Message 2 of 2
(6,165 Views)