LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

multiple programs share one DAQ cards

Due to some combined problems, I have to use two separate CVI programs to action on the same DAQ cards. One program is gerenating multiple lines output of digital and analog signals, while the other one is using the analog input. I know this cannot be done by normal programming because one of the program will dominate the DAQ resource all the time. Is there some good why for this kind of applications? I am using NI6229

 

Thanks.

0 Kudos
Message 1 of 4
(3,212 Views)

One approach to this kind of problem is to create another program whose sole job is to interface to the hardware. This program then would need to be communicated with from your other two programs which both require access to this hardware - for example by sending data (commands and responses) along named pipes. (Or TCP or DDE or shared memory or whatever inter-process communications mechanism you feel most comfortable with.)

 

Effectively you would be creating a simple server for the hardware, which can coordinate the interfaces to your other client applications. This can get quite complex to implement well, but if you really cannot combine both your original programs into one application it is a way forward.

 

JR

0 Kudos
Message 2 of 4
(3,188 Views)

I have test your idea and it works fine when two programs control the same DAQ card. As long as you do not use the same line in two programs, it functions well. Please just give a try by using MAX.

0 Kudos
Message 3 of 4
(3,184 Views)
jr_2005 wrote:

> One approach to this kind of problem is to create another program whose
> sole job is to interface to the hardware. This program then would need to
> be communicated with from your other two programs which both require
> access to this hardware - for example by sending data (commands and
> responses) along named pipes. (Or TCP or DDE or shared memory or whatever
> inter-process communications mechanism you feel most comfortable with.)
>  
> Effectively you would be creating a simple server for the hardware,
> which can coordinate the interfaces to your other client applications.
> This can get quite complex to implement well, but if you really cannot
> combine both your original programs into one application it is a way
> forward.   JR

I totally agree with this. A nice way of doing things is using the Simple
TCP Messaging client-server model. You can use this even with labview
applications.
http://zone.ni.com/devzone/cda/epd/p/id/2739

tw
0 Kudos
Message 4 of 4
(3,152 Views)