LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using two cards simultaneously in Labwindows

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.

0 Kudos
Message 1 of 2
(2,889 Views)

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.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 2
(2,875 Views)