Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

How can we achive simulataneous double buffered data acquition and wave form generation continuously on PCI 6115 and Visual C++

Hi all,

i want to use simulataneous double buffered data acquition and wave form generation continuously on PCI 6115 and Visual C++, how can we achive this when using API's like WFM_DB_Transfer,WFM_from_Disk etc,which waits until NI-DAQ finishes their respective operations.
in Example code 'while' loop is used,in that situation how can NI-DAQ perform simulatneous continuous i/p and o/p operations,is API's are not going to hold the Processor until they finish their tasks.is there any other way to achive this, please help me.



In my application, i am acquiring the data on 4 AI channels simulataneously and storing that data into a single file(using SCAN_to_Disk API).unlike this ,is there any way to store/get the acquired data on four channels or from single file to store in four seperate files?.


any help will be appreciated
regards
Reddy JS
0 Kudos
Message 1 of 3
(3,064 Views)
Hi Reddy, if you want to do simultaneous AI & AO operations, you will have to use asynchronous I/O functions like SCAN_Start, WFM_Group_Control, etc. You can't use the synchronous functions like Scan_to_Disk, WFM_Op and WFM_from_disk because, as you've noticed, they will not return to the caller until the operation is finished.

The NI-DAQ user manual has pretty good documentation for the sequence of function calls necessary to perform asynchronous I/O. You will make interleaved calls like SCAN_Setup, WFM_Group_Setup, WFM_Load, SCAN_Start, WFM_DB_HalfReady, DAQ_DB_HalfReady, DAQ_DB_Transfer, WFM_DB_Transfer, etc.

NI-DAQ ships with examples for doing double-buffered AI and double-buffered AO. (see DAQdoubleBuf.c and WFMdoubleBuf.c). You'll just need to combine these into a single program.

Good luck,
Joe
Message 2 of 3
(3,062 Views)
Thanks Joe,
i am working on that, once i finish i will let u know.


Regards
Reddy JS
0 Kudos
Message 3 of 3
(3,043 Views)