LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using the same DAQ assitant in the same VI

Hi.. my problem is this: I'm using a DAQ assitant to generate a digital output. It is possible to have the same DAQ assitant (same port and line) to write to it a value (True or False) from different parts of the VI?

0 Kudos
Message 1 of 3
(2,090 Views)

Why would different parts of the VI need to write to it?

 

Put your data acquisition in its own while loop.  Pass values to write out to the digital output by way of a queue with a producer/consumer architecture.

0 Kudos
Message 2 of 3
(2,089 Views)

Hi kanogui.

 

Like Ravens Fan said, it's not recommended at all to use multiple DAQmx express VI's when they will work on the same channel. This is because there will  be a resource conflict, as one of the VI's will see the channel as not available.

 

Here's an example of the producer-consumer architecture:

https://decibel.ni.com/content/docs/DOC-8962

 

In your program you want to put the express VI in the consumer loop, and send the values you want the channel to take from your producer loop and through the queue.

 

Cheers.

Aldo H
Ingenieria de Aplicaciones
0 Kudos
Message 3 of 3
(2,063 Views)