LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using daqmx device from different parts of a vi

Solved!
Go to solution

Hello,

 

i want to control four testsockets with one USB-6501 in one vi. Each socket has four digital output channels.

If i run the vi with only one testsocket it work fine. When i use more then one socket parallel there is an error "device is in use".

Is there any solution to make an wait until devise is free or something like this. The other way is to use four USB-6501, but it is to

expensive.

 

greetings

 

schwede

0 Kudos
Message 1 of 4
(2,704 Views)

schwede,

 

you should split the hardware IO from the TestStand sequence in such a case. I suggest to implement either a dedicated communication layer which receives data from a free running DAQ VI. The other option woulde be to implement the DAQ part into an FGV (functional global variable) which receives parameter for reading and selection of the channel. So you have a single setup for the device (create a task including all channels for your test) and the providing functionality to read finite all channels and reduce the data to the channel desired. The result of the VI would be the data set of this channel.

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 2 of 4
(2,694 Views)

Hello Norbert,

 

thankyou for your fast answer. I use only LV (8.5.1) it is an standalone application.

Do you meen that i should use an extra daqmx loop parallel with a variable that is initialized by the program parts?

 

Have you a short example for me, please?

 

thankyou

 

schwede

 

0 Kudos
Message 3 of 4
(2,691 Views)
Solution
Accepted by topic author Schwede

schwede,

 

ah, so this time you do not use TestStand? 😉

Ok, what i suggest is to use a functional global, also known as Action Engine (read Bens nugget carefully) in order to control the DAQ part. So it is not a parallel loop but a whole VI. 

You could use a parallel loop as well, but you have to take care about the correct distribution of signals if needed. 

 

hope this helps,

Norbert 

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
Message 4 of 4
(2,689 Views)