The number of channels and the number of samples being read generally affect data organization. For example, if 100 samples are read for eight analog channels using 64-bit floating-point format, a two-dimensional array is used with one index selecting the channel and the second index selecting the sample. On the other hand, a simple floating-point scalar value is sufficient to read one sample for one analog channel using the 64-bit floating-point format. In general, the data organization for a particular read or write call is the simplest reasonable format that can handle the number of channels and samples requested.
There are often multiple legal data organizations to choose from. The main tradeoff to consider for data organization is difficulty in manipulation of the data. You can use data organizations that can handle multiple channels and multiple samples, but they are generally the most complicated to manipulate.
Performance is not significantly different for equivalent operations using read or writes with different data organizations.
Waveform Data Organization
A waveform can contain one or more samples.
1D Waveform Array Data Organization
The single dimension of a waveform array selects the channel. Each waveform can contain multiple samples, so a second dimension is not required.
Scalar Data Organization
Use scalars when you read or write a single sample on a single channel. Scalar data is easy to manipulate. It is a good match when data is read and or written to individual channels as needed.
Scalar data is generally not a good match for high-speed multiple sample applications.
Scalar data also is not a good choice if multiple channels are acquired or generated simultaneously. Using a multiple channel organization is easier and in the case of output operations is actually a requirement.
Array Data Organization
Array formats allow you to read or write data for multiple channels and/or multiple samples at the same time. If you acquire or generate on multiple channels simultaneously, reading and writing them at the same time is easiest. Reading and writing multiple samples in one call is more efficient than reading and writing samples one at a time.
Raw Data Organization
The raw data organization is defined by the native organization of the device.