09-05-2010 02:48 AM
Hi all
I want to use two PCI cards simultaneously in Labwindows, the two cards are of different types (i-e they have different model no,) .
How can i simultaneously access both the PCI cards without interrupting the tasks of one with the another?
I want to use one card for acquisition and generation of analog signals and the other for digital I/O. The code for the acquisition of Analog Inputs involves while(1) loop , how can i come out of this loop to monitor the digital I/O of other card?
Any example on this will be greatly appreciated.
09-05-2010 04:11 PM
Of course you can handle two different cards within the same program.
One solution is to include in your while loop the appropriate calls to the digital I/O card, another solution is to split your application in more threads, one of which can handle the DIO card whil the other is managing the acquisition. CVI offers several ways to communicate in a safe mode between threads (thread-safe variables, thread-safe queues...) and to sync or interlock them. I suggest you to look at the application note on multithreading that ou should have in <cvidir>\bin directory in your hard disk. Several informations can be found on NI site or this board too.