11-16-2011 04:26 PM - edited 11-16-2011 04:30 PM
Hi,
I'm using NI-6289 for the 16-bit digital data acquisition.
I have to get more than 2 millions of samples at 20MHz sampling frequency per measurement cycle.
I'm using line16:31 of port0 in NI-6289 as one channel and I cannot change this configuration to line 0:15 of port0 or other ports.
I have tried two methods to acquire data from the line16:31 using DAQmx Read polymorphic VIs.
Channel setting is : Dev1/port0/line16:31
1) DAQmx Read: Digital Wfm 1Chan NSamp
The data array is from line16:31.
It is fed to 'Digital to Boolean Array' VIs. The output data is a 2D boolean array.
Then using 'For-Loop' and 'Boolean Array to Number(U16)' to convert the 2D boolean array to 1D U16 array.
2) DAQmx Read: Raw 1D U16
The data array consists of two set of U16 from both line0:15 and line16:31.
Then decimate the acquired data by 2 to obtain data from line16:31.
But it seems that all 32 bits are fetched in port0 at each sampling cycle in both cases when I have looked at performance and memory profile.
That is, whole lines (line0:31) are sampled in both cases and the fetched data give memory burden to my labview program.
I understand the case 2 since DAQmx Read: Raw VIs inherently do. But I can't understand the case 1. Does Digital Wfm 1Chan NSamp also fetch whole port0 and gives a partial of data to the labview program?
And I'm wondering how to read upper 16 bits(line16:31) in port0 of NI-6289 using DAQmx with efficient way of memory like 'DAQmx Read: Digital 1D U16 1Chan NSamp (Port)' which read lower 16 bits(line0:15) in port0.
My system information is as follows.
Windows 7 Pro 64-bit
Labview v10
NI-6289 board
Thanks!
11-17-2011 11:48 AM
I believe that whenever lines in a digital port are read using DAQmx the entire port is read and the data lines requested are then taken from that data. So I do not think there is a way to get 16 lines into LabVIEW without DAQmx reading all 32 lines in the port.