Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

continus dataacq. using PCI-6534 with ext.clock

01-June-04

From
D,Venkatesan
Senior Scientist
Radar group, Aeronautical Development Agency
Bangalore-17,India
Ph: +91-80-25087318

To
Support Engineer
PCI-6534 card

Sir,
Sub: Help sought in using "VC++ & Low level API calls such as DIG_DB_HalfRady" to implement continuous 32-channel input Digital data acquisition using
external clock


We are a very large customer of National Instrument in INDIA and have several sophisticated system supplied by you; We recently purchased your PCI-6534 DIO
cards; We have some problem in using your DIO-6534 card in "acquiring & storing 32-parallel channel digital input data" continuously. We seek your
help with a sample program to meet our requiremnt [as your supplied program are not meeting our requirement]. We want the sample program to use LOW LEVEL API calls such as DIG_DB calls as we use very sophisticated environemnt & our application require that much sophistication.

The background of our problem is described as follows:

Operating system & operating environment:
=========================================
Win-2000; VC++ 6.0; NI-card PCI 6534; DIG_DB low level API calls;

Goal:
=========================================
To configure all 32 channels of DIO card as ONE GROUP with 32 bit parallel digital data coming in; Use external clock to strobe in the data; Do not allow
repetation of the same input data to be acquired again; Continuously acquire and stream the data to harddisk

H/w platform :
===============
Very high speed HP-Xenon workstation with SCSI harddisks

Speed of input clock & volumne of data :
========================================
About 5 MHz ( meaning TENS of gigabytes to be acquired & written to harddisk in 30 minutes) without TIMEOUT error happening (such as failing to clear acquired
buffer before being overwritten.)

Nature of application :
========================
Capture and store radar echo data recorded on AMPEX DCRSi tape while DCRSi is replaying the recorded data at the rate of 5MHz (32 parallel digital channel data); The data to be acquired with clock signal coming out along with data pins; Same data sample must not be reacquired (i.e no duplication of sample point is allowed).

Card to use is : DIO-6534 card

Your supplied sample programs like "continuouspatternacquisitionwithexternalclock653x.c" etc... is not meeting our requirement because
1) no where you explain 32-bit input group & acquistion in continuous mode with external clock; with NO DATA duplication;

If we write our own program , within two or three sampling (using DIG_DB_HalfReady, DIG_DB_In calls ) the NI-DAQ driver is complaining that it
is failing to keep up with incomming data rate"; Actually we have not even tried to write any data into disk and just acquired into RAM, but still it is
complaing that it is not able to acquire that data at the current rate;

Actually our system is having 4GB RAM, Xenon processor on HP-Workstation,but how come your card could not produce even 500KB of data to RAM when the
incomming data clock is 1.33MHz (when all 4 ports are configured as one GROUP -i.e. as 32 bit channel)?

Let me repeat our requirement:
1) We just want to continuously acquire 32-bit of paralle digital input data at the rate of GIVEN INPUT CLK to your REQ1/PCL1 pin of PCI-6534 card
2) Put the data into harddisk simultaneously

Even if we can acheive 1) for the time being we can do some analysis (as our RAM is 4GB size & this much of data helps us to do some radar performance analysis).
BUT WE ARE NOT EVEN ABLE TO CAPTURE JUST 500KB of INCOMMING PARALLEL DATA ***TO RAM ALONE*** AT 1.33MHZ freq. comming on 32 input channels; WHERE IS THE BOTTLE
NECK?


Something is seriously wrong somewhere. Ma be we do not understand how to use your card. None of your supplied sample seems to address our requiremnt (or
we missed the relavent one);

Can your guide & help us to accomplish our goal? Can you supply us a sample program?

With regards,

D.Venkatesan
0 Kudos
Message 1 of 2
(3,276 Views)
Hello,


For documentation on NI-DAQ function calls, please refer to
C:\Program Files\National Instruments\NI-DAQ\Docs\nidaqpc.chm

This is the Traditional NI-DAQ function reference help.

As far as programming 32 digital lines at once, here is the function call
DIG_Grp_Config (iDevice, 1, 4, 0, iDir);

Exactly what error are we seeing in the application? Does the program just freeze? What happens?

My initial guess would be that you are getting an overwriting error from the hardware, and the usual reason that this happens is that your double buffering system from the card is not big enough to operate at the speeds that we are acquiring at. A good rule of thumb is to have a buffer that is capable of storing at least two tenths of a second worth of d
ata. That way one half buffer is one tenth of a second worth of data.

As an example, if I am acquiring at 5 MHz, I want a buffer that can hold one million samples. Since the buffer is stored as an i16, then we want a buffer that holds a count of two million, since our data takes two elements of the array for one 32 bit sample. So at 5 MHz, a buffer could be set up like so�

u32 ulCount = 1000000;
static i16 piBuffer[2000000] = {0}; // 1 million samples
static i16 piHalfBuffer[1000000] = {0}; //500,000 samples

Notice that the data is interleaved, if you wish, you could declare the arrays as 32-bit, and then type cast them to short arrays when passing them into NI-DAQ function calls.

Lastly, I would like to reiterate that our supplied programs are not meant to be used as final applications, they are simply meant as a single example of what you could do.

Let me know if you have any further questions.

Best regards,

Justin T.
National Instruments
0 Kudos
Message 2 of 2
(3,276 Views)