<< Click to Display Table of Contents >> Navigation: NmxDLL Reference Guide > HowTo > Sampling > Reading sampled data |
As soon as sampling has been started, data can be read-out.
For time-limited sampling, it is possible to wait until the measurement is finished and then read the data as a single block.
For endless-sampling, data must be read-out cyclically to ensure that the internal buffer of the NMX DLL does not overflow.
Sampled data is provided by the NMX DLL in the form of a table, or technically speaking in the form of a 2-dimensional array. Thereby:
• the rows are the samples
• and the columns are the sampling elements.
The following table provides an example:
The rows and columns are indexed as follows:
There are two possibilities for reading this data: column-wise and row-wise. None of them is generally better:
•Column-wise typically has a better performance, since less function calls are required. However, in most systems/applications, this is not even measurable.
It could be the preferred option for time-limited sampling, if all samples shall be read-out as a whole after the sampling is finished.
•Row-wise could be a little bit easier to use, since there is no need to synchronize the readout of multiple columns. This applies especially to endless sampling.
There is no possibility to read the whole table as a 2-dimensional array, since this is known to be a bad programming style.
Please note that all data is provided as 32 Bit values. For more information please read the chapter "Data Types".