Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Using Traditional NiDAQ 7.1 to read 6025E with 5B01 and five 5B37

My goal is to continously read 11 analog input channels for 80 seconds and save the data to a file. Each analog input channel would be operating at 1KHz.

I am using Traditional NiDAQ 7.1 along with Visual C++ 6.0 on a Windows 2000 machine.

I am also using a 6025E DAQ with a 5B01, three 5B37 modules and eight 5B38 modules.

I have read through and executed several NiDAQ examples.

I am having difficulty deciding what example to use as a starting point.

I considered the AIOnePoint example, however it does not use the 6025E's internal timing to specify the sampling frequency and it only reads one channel at a time (seems inefficient for my goals).

I considered the DAQDoubleBuf example,
which uses internal timing for the sampling rate, but it only reads one channel at a time.

Therefore, I am assuming that I need a program the SCANS multiply channels at once and uses internal timing to achieve a sample rate.

Can I use double buffers with multiply scans?

Do you have any example code?

Does the pseudo code below make sense?

//
// Code
//

AI_Configure()

DAQ_DB_Config()

DAQ_Rate()

SCAN_Setup()

SCAN_Start()

while(< 80sec)
{
if(DAQ_DB_HalfReady())
{
DAQ_DB_Transfer()
SaveBufToFile()
}
}

DAQ_Clear()

Please help 🙂

Thanks,

Tree
0 Kudos
Message 1 of 2
(2,585 Views)
Tree,

Your analysis of the proper manner of implementing this functionality is correct, and your pseudo-code is quite complete. I would suggest that you combine two of the examples to complete your application. As you mentioned, the DAQdoubleBuf.C example demonstrates how to design a continuous application that is both hardware-timed and buffered. The SCANsingleBufAsync.C example demonstrates how to use the SCAN functions to perform a multi-channel acquisition.

Good luck with your application.

Spencer S.
Message 2 of 2
(2,585 Views)