04-09-2021 03:02 AM
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
04-09-2021 07:01 AM
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 🤔