LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

usb 6009 continuous analog output

Hi
 
I'm pretty new to Labview, so you may have to bear with me. I have a USB-6009 and I want to generate a continuos analog output voltage. I've got the example you have posted 'Gen Mult Volt Updates-SW Timed_LV7.1 (0 to 4).vi' working and it outputs a continuous sine wave.
 
In a similar manner I need to generate:
 
1. Ramp up voltage (and ramp down voltage): starting with a continuos constant voltage, which after a period of time linearly increases to another constant voltage, and which allows me to specify the 3 time intervals and the rate of increase.
 
2. Pulsations: whereby I can specify the amplitude and time interval of each pulsation
 
This is so that I can control voltage to a valve which regulates my pipe flow. In the example I have (one stated above), I do not understand specifically:
 
i. Why I need both a 'Software Loop Time (ms)' as well as 'Timeout'
ii. The 'Sinusoidal Pattern' input which seems to generate data for a sine wave- I can't get a description of that and there are no similar VIs for other waveforms; and what is the function of the two numbers it has?
iv. How do I change amplitude and time period for the wave?
iii. What does 'Index Array' do?
 
thank you
0 Kudos
Message 1 of 2
(3,006 Views)

Hi there,

I'm guessing the VI you are using is the one from this KB:

http://digital.ni.com/public.nsf/allkb/6F2C2B49A89D685C8625711D007BDD64

i. The software timed loop control is to control the rate at which you change the voltage output.  The timeout on the DAQmx Write VI is the maximum time in seconds the VI will wait to output a sample (eg. if the write buffer is full, the Write VI will wait for it to become available for 'timeout' seconds before outputting an error).

ii. The sine pattern is just an array constant of doubles that make up the sine wave voltage values, and the for loop adds an offset (of two volts) to every single one of those values. You might want to replace that entire array constant and for loop with a Simulate Signal Express VI (just search for Simulate Sig or look in the Functions >> Input palette) and convert the dynamic data output to an array of doubles.  You can configure the type of waveform, amplitude, and time period from that express VI as well.

iii.  Refer to previous answer.

iv.  Index array returns an element of an array based on the index input.  You can turn on the context help and move your mouse over functions to get more help on them.

I hope that helps!

Way S.

NI UK Applications Engineer

Message 2 of 2
(2,984 Views)