LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

analog input analog output

I need to:

1. capture several analog inputs
2. continuously generate a sine wave for an analog output
3. generate an impulse along the sine wave. The impulse needs to fire at any point along the sine wave. The firing of the impulse is determined by the percentage of the sine wave that has occured. i.e. i could set the control to 25% and the impulse would fire every time the sine wave had gone through 25% of its cycle.

I was able to get the VI to do 2 and 3 relatively easily, however whenever I tried to run the analog inputs with it, the program gets bogged down and the outputs work very very slowly. I've tried using the examples for simulataneous AI AO but I am having some trouble modifying the function generator subVIs to allow the impulse without slowing down the computer.

The computer and DAQ Board (DAQPad 6020E) are both brand new and are only being used for this project. Also, I can't use the DAQmx functions because the DAQ board I have only supports the traditional DAQ functions.

Any advice would be immensely appreciated.
0 Kudos
Message 1 of 3
(2,468 Views)
Have you tried running the analog input and analog output in separate parallel loops, with no wires between the two loops? Also it is important to have wait states in both loops so that each loop gets some CPU time. You may have to play with the delay values to optimize the timing.
- tbob

Inventor of the WORM Global
0 Kudos
Message 2 of 3
(2,462 Views)
Does the impulse percentage need to be able to be updated on the fly? If not, I might suggest calculating where the pulse would occur before the acquisition starts and then generate a pulse based on those calculations. I would also suggest lowering the number of points to read and write. The DAQpad-6020E is limited due to the USB connection to a maximum of 100kS/s input and 20 S/s output (which will vary depending on the system), so simultaneous input and output is going to lower those numbers further.

Regards,
Andy F.
Applications Engineer
National Instruments
-----------------------------------------------------------------
National Instruments
0 Kudos
Message 3 of 3
(2,434 Views)