Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

analog input analog output

I wrote an analog output VI which works perfectly. I also need to run a completely unrelated analog input at the same time the analog output is running. Whenever I try to add any sort of analog input function to my VI, the input is collected and recorded fine, however the output starts processing insanely slowly. Any hints?

I tried using the simple AI subVIs, as well as the full ai config, start, read, etc process. I also tried just dumping the cont.aquire&chart.vi into the block diagram in a separate loop and in the same loop. All of these methods gave me the same result; they all slowed down the AO such that it was useless. I've looked through the simultaneousAIAO.vi examples, but you can't do much adjusting of the waveform frequency with the ones I've found.

Also I'm using a Traditional DAQ device so I can't use anything with DAQmx.

Is there any way to add analog inputs without severely hampering the processing time on the AOs?
0 Kudos
Message 1 of 4
(6,509 Views)
Hi,

One of the best ways to program in LabVIEW is to take an example and modify it to fit your specific application. There are a couple of good simultaneous analog input and analog output examples using traditional DAQ in LabVIEW. You can find these by searching for "simultaneous" in the example finder in LabVIEW. It may be helpful to run an example, modify it, and see if your analog output operation is still slow.

Also, could you provide me with additional details about what you are doing with the analog input operation to make the analog output operation slow down?

Regards,
Hal L.
0 Kudos
Message 2 of 4
(6,492 Views)
I tried using the examples for simultaneous analog input and analog output. The only way that I could get them to work was to slow down the scan rate significantly. Otherwise I get an error that says the computer can't write the samples to the buffer quickly enough. Also, the output signal that it generates on these examples doesn't allow variations in the amplitude or frequency of the sine wave.

Regarding deatils about what I'm doing with the analog input, all I need to do is capture and store for later analyzing.
0 Kudos
Message 3 of 4
(6,461 Views)
Hello Zcrannell.

Which board are you using? If you are using a board with only one DMA channel, your the program that you created is forced to use interrupts. To get optimum speed using interrupts you will need to shut down all other programs running in the background.

Also, what do you mean by slow? Are you getting all of the data? Please let me know if you have any questions. Have a great day!

Sincerely,
Marni S.
0 Kudos
Message 4 of 4
(6,438 Views)