High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

niScope_Fetch: 16 or 8 bit?

Hello,

My apologies if this question has been answered before - I couldn't find it.

I'm grabbing data from my 5124 card (using Matlab), and after some effort, I have it working.

I'm using the niScope_Fetch command to grab scaled waveforms. Is this command fetching the data in 16 bit or 8 bit before it scales it? I know I can use niScope_FetchBinary8 and niScope_FetchBinary16 if I want to specify, but I am curious nonetheless.

Also, would there be a speed or memory advantage in grabbing the binary data instead of the scaled data?

-Nathan
0 Kudos
Message 1 of 4
(6,754 Views)

Hi Nathan,

It is a 12-bit digitizer. It fetches I16 data before scaling.

Kalyan

Kalyanramu Vemishetty
Automated Test Systems Engineer
National Instruments
0 Kudos
Message 2 of 4
(6,742 Views)
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.




Message 3 of 4
(6,737 Views)
I want to thank you for your answers to my questions. It was exactly the information I needed!

-Nathan
0 Kudos
Message 4 of 4
(6,714 Views)