LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2 daqcard-dio-24 work together

Hello,
I use two daqcard-dio-24 (pamcia card) to connect two devices to my laptop (Labview 6.1, Win98). Two Labview programs control each of the device (program A - daqcard A- device A; program B - daqcard B- device B).
Each one program can work well, but they can not run at same time. If I run one program, another one will hang there.
What is the possible reason for they can not run at same time? Thanks!

Brs, George
0 Kudos
Message 1 of 5
(2,927 Views)
Dear George Lee,

To address your question, it sounds like a thread starvation problem. I would need to know what the programs are doing, but it seems like one program is hogging the processor and not allowing the other program to execute. An example of a program that will do this is a While Loop with no wait inside. The program will run fine, but would hog the processor and other programs would not be able to run.

Let me know if you have any further questions or if this does not resolve your issue.

Thanks again and have a great day!

Chad AE
Applications Engineer - National Instruments
Message 2 of 5
(2,927 Views)
Dear Chad AE,
Thank you for yor reply!
The problem is just as you said: each one program uses a while loop to acquire data from one device, process the data and display the results in charts.
Can you tell me, in general, what is the minimum wait time that can be used ( I want the two programs run as fast as possible)? Thanks!

Brs,
George
0 Kudos
Message 3 of 5
(2,927 Views)
Hi george,

If program A and B use the same vi's to do the work then there is a reentrancy problem. If one program is called by labview from multiple locations.that single Vi has to finish first then the other is allowed to start. If and I say if because I am only guessing here since I have not seen your code this is the problem then mak the problem vi's reentrant. Also to answer your other question if you put just a one mS wait should do the trick.

Joe



Joe.
"NOTHING IS EVER EASY"
0 Kudos
Message 4 of 5
(2,927 Views)
Hi Joe,
Thank you for your suggestion!
After I set everyone program (sub vis) to reentrant, and added one ms wait to each main program, both of the programs can work together.
Because the two program were made by different companies, in general, there is no same created vis. Maybe one or two Labview-own-vi using in the 2 programs(such as write file vi?) caused the problem.
I also noticed that the program work at least 2 times slow when both of the programs work at same time. Any suggestions except using a faster computer? Thanks!

George
0 Kudos
Message 5 of 5
(2,927 Views)