From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you use cDAQ cards within multiple VIs?

Hello,

 

I have to adapt older code for re-use and I have a general question about this.

 

There is a main VI with sub-VI. Main-VI does GUI and so on, Sub-VI does data acquisition (connect to chassis (9184), read input, calculate stuff, close connection to chassis on program exit). Now, I need to add an analogue output card.

 

Problem is: only my Main-VI has the information, that needs to be output on the analogue output device. How can I accomplish this, if all the communication with the chassis is done within my Sub-VI? Do I use a channel between Main-VI and Sub-VI?

 

Thank you for your advice.

 

Martin

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

I use 9174's at my location and it should be similar enough. I think this may actually apply to many NI DAQs. Anyway, if the module(s) currently being used do not have analog outputs then you need to add a new module to perform that function. In any case, an output DAQmx function is separate from an input DAQ function (along with several other functions) and can be implemented in a new loop or any existing loop. Any timing issues with the chassis in this case will automatically be handled in the background.

 

Generally, issues will arise if you were to use the same DAQmx functions in different loops. Then you have to take extra steps to insure one loop isn't trying to access the same function as another loop at the same time.

 

Robert

 

Please speak up if I have this wrong. There is plenty I still don't know 🤔

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