LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to perform AI&AO simultaneously?

I have a PCI-6032E AI card and PCI-6073 AO card. In my VI program I had an anologout generate waveforms VI and an analogin acquire waveforms VI. When I was trying to run the program, it seemed the AO function was waiting to run until the AI function finished. Is there anyway to have the AI part and the AI part function simultaneously?

Thanks.
http://mypage.iu.edu/~zzhuang
0 Kudos
Message 1 of 4
(3,135 Views)
Let's see if I understood correctly:
The idea is that you want to run both the AI and AO simultaneously, right? To acquire and and generate a signal..

I have not tried the following suggestion, but it may work...

In you LV vi, place your AI and AO near one another so that you can wire the "Error In" to both of them in parallel. At the output of both vi's, you can use a a Rendez-Vous to merge both Error out to a single line. (Advanced > Synchronisation > Rendez-Vous)

Open the vi which contains the AI.vi. Under File menu, select "VI Properties". Select category: Execution In Preferred Execution System, select Other 1.

Repeat the above for the AO.vi, but select Other 2.
Since both are for data acquisition, it would not make sense to select that o
ption for both...

You may have to set these vi's (AI & AO) as reentrant (under vi properties - execution settings on the vi). But try first without this since they are different vi's.

Let us know how it went..

JLV..
Message 2 of 4
(3,135 Views)
Cooly,

There is an example included in LabVIEW called "Simul AIAO Buffer (E-Series).vi" that does simultaneous analog input and output on a single E-Series data acquisition card. With your setup you can use this example and modify the analog output portion to use your PCI-6703. You can find this example within the NI Example Finder inside of LabVIEW (Help > Find Examples).

Regards,
Ames
Applications Engineering
National Instruments
0 Kudos
Message 3 of 4
(3,135 Views)
Thanks a lot. Your advice was very helpful.

The problem for my application is I need to generate 2 independent square waves(AO) and measure(AI) 2 voltages (pressure transducer outputs) simultaneously and then write the results of AI(pressure measurements) to a spreadsheet file or a binary data file. Now we have solved the problem of simultaneously doing AI and AO for one square wave.

Using this example(Simul AIAO Buffer (E-Series).vi) you gave me, I am able to generate one square wave and meaure voltages of mutiple channels.

For this example you gave me, the AI read function was put in a while loop, which made it difficult to write the data to a file. Also I don't know if I could just simply add another set of compute waveform, AO config, AO write t
o generate the second square wave independently from the first square wave(say these 2 square waves have different amplitudes, frequencies, duty cycles, etc. and they are generated and sent to the output channels simultaneously and independently).

I was wondering if you could help me with this.
http://mypage.iu.edu/~zzhuang
0 Kudos
Message 4 of 4
(3,135 Views)