FIFO Mode Programming
(c) Spectrum GmbH 53
The samples are re-named for better readability. A0 is sample 0 of channel 0, C4 is sample 4 of channel 2, ...
The following example shows how to sort the channel data when using 4 channels in FIFO mode:
Sample format
The sample format in FIFO mode does not differ from the one of the standard (non FIFO) mode. Please refer to the relating passage concerning
the sample format in the standard acquisition chapter.
X X A0B0A1B1A2B2A3B3A4B4A5B5A6B6A7B7A8B8A9B9
X X X X A0 C0 B0 D0 A1 C1 B1 D1 A2 C2 B2 D2 A3 C3 B3 D3 A4 C4 B4 D 4
for (i = 0; i < lBufferSizeInSamples; i+=4)
{
FIFOBuffer[i + 0] = Data[0][i/4];
FIFOBuffer[i + 2] = Data[1][i/4];
FIFOBuffer[i + 1] = Data[2][i/4];
FIFOBuffer[i + 3] = Data[3][i/4];
}
Ch0 Ch1 Ch2 Ch3 Sample ordering in FIFO buffer