08-02-2006 08:45 PM
08-03-2006 03:18 PM
Hello Zaven,
scalarResult[0] will always be the measurement for the first record, or record 0. The measurement for the second record, or record 1, will be stored in scalarResult[1]. The numInStats parameter should increase each time you call niScope_FetchMeasurementStats unless you call the niScope_ClearWaveformMeasurementStats function. Take a look at the attached CVI code. I modified this from the Measurement Library shipping example to display 2 records of measurements. Notice that the numInStats indicator increases continuously until the program is stopped or the niScope_ClearWaveformMeasurementStats function is called.
I hope this helps. Please let me know if you have any further questions.
Regards,
Sean Close
Product Support Engineer: High Speed Digitizers
08-03-2006 04:15 PM
08-03-2006 05:37 PM
Hi Zaven,
The scalarResult array returned for a channel list of "0,1" would be:
statistics for record 0, channel 0,
statistics for record 0, channel 1,
statistics for record 1, channel 0,
statistics for record 1, channel 1
Since you are only acquiring from one channel, the index of the scalarResult corresponds to record number. However, you are only fetching one record at a time, so you will never have anything beyond index 0 in your scalarResult array.
I ran your code as is, and I didn't notice any strange behavior. It runs as I would expect it to. In the Standard I/O window, I see 100 rows displaying the record number, scalarResult[0], 0.0000 (because there is no value in scalarResult[1]), and the numInStats (which increases from 1 to 100).
Attached are some screenshots. Is this not what you are seeing? What are you using as an input signal? Please attach some screenshots of what you are seeing.
Regards,
Sean Close
08-04-2006 10:42 AM
08-04-2006 12:05 PM
Hi Zevan,
This makes sense now. There was a bug in Scope 2.9.3 and lower which caused this bahavior. If you fetch records or measurements one at a time, it will always give you the first record's information. As a workaround in 2.9.x, you can fetch all 100 records in one call. Then your scalar Result Array will include all 100 measurements, not just the first record's measurement.
This bug was fixed as of NI-Scope 3.0. You should not see this behavior once you upgrade.
Regards,
Sean Close
08-04-2006 12:50 PM
08-09-2006 05:44 PM