Nathan,
There would be a time and memory advantage if you fetch binary
data. But keep in mind that to convert the binary values to
voltages, you HAVE to scale them using the gain and offset values that
are returned from Fetch in the niScope_wfmInfo struct. These
gains and offsets take into account device-specific calibration
constants. At any rate, the scaling you do to the binary data you
fetch might eat up any speed and memory advantages you gain by fetching
binary data.
A few other points:
Although the 5124 is a 12-bit device, you can put it in low-resolution
mode. The attibute NISCOPE_ATTR_BINARY_SAMPLE_WIDTH can be set to
8 or 16 for this device (it defaults to 16).
- If the binary sample width is 16, and you do the scaling fetch,
the board will store 16-bit samples in on-board memory and you will
fetch and scale 16-bit values.
- If the binary sample width is 8, and you do the scaling fetch, the
board will store 8-bit samples in on-board memory and you will fetch
and scale 8-bit values.
- If the binary sample width is 16, and you use niScope_FetchBinary16, the
board will store 16-bit samples in on-board memory and you will fetch 16-bit values.
- If the binary sample width is 8, and you use niScope_FetchBinary8, the
board will store 8-bit samples in on-board memory and you will fetch 8-bit values.
- If the binary sample width is 16, and you use niScope_FetchBinary8,
the
board will store 16-bit samples in on-board memory and you will fetch
16-bit values, but the driver will throw away the least significant
byte of each sample.
The last one is tricky, but important. The different Fetch
functions determine how the data is returned to you, and the binary
sample width attribute determines how the samples are stored and
fetched internally.
The most efficient is a binary sample width of 8 and FetchBinary8, but you are losing 4 bits of resolution for this device.