LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Outputting Analog Ramp Voltages

Hello,

i was hoping to receive some information on the proper method for outputting a voltage that increases linearly from one value to the next over a specific period of time.  i was hoping to create something with an easily understood user interface, where the user can simply enter the starting and ending voltage, as well as the amount of time it takes to cover these values.  I've had some luck outputting analog signals with my attached program, but i can't seem to make heads or tails of how to define the timing with a program like this.  my current program also only communicates with one line on the board, the final program will need to communicate with all four available output lines.  I am using the NI 6711 board with LabVIEW 2011 software.  As always thank you NI community for your fantastic support!

-Steve 

0 Kudos
Message 1 of 7
(4,892 Views)

Generating the ramp is the easy part -- in fact there is a built-in math function that will calculate it for you.

 

Now in terms of outputting it, the basic process is to step through the array setting a value, waiting a bit and then outputting the next value. The more datapoints in your ramp array, the smoother the output. Remember that although we like to pretend that a ramp created in this way is really a ramp, it's not. It will actually consist of a series of step functions.

 

If you want/need a real ramp you will need to include a reconstruction filter, which is basically a hardware low-pass filter that smooths the steps. Generally a simple RC network will work fine.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 2 of 7
(4,881 Views)

I see exactly what you mean in terms of the steps of the voltage.  The specifications for the smoothness of the signal has not yet been clarified.  I was hoping you could help me clarify the key differences in two ramp vi's I've been investigating.  the green vi requires an instrument handle.  I'm not sure if it's talking about the PCI board or something different.  The other vi seems pretty straight forward, but I was wondering how to make the output hold at the necessary voltage and then ramp down.  I'm assuming I'll need to implement for loops or sequence structures for something like this.  I've attached the pictures of the two ramp vi's for reference to make sure we're talking about the same thing.

0 Kudos
Message 3 of 7
(4,848 Views)

The Ramp by Samples is the one I have used. Once you have the array of ramp voltages you can play through it in either direction to ramp up or down. And yes you will need a loop because you aren't outputting a waveform, but discrete values one at a time.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 7
(4,839 Views)

I just had a thought, how long it the time that you are going to be using to generate the entire ramp? I have been assuming that it was a long period -- like over multiple seconds. If the ramp is short, then you could output it as a waveform.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 7
(4,837 Views)

I wish I had a solid answer for the length the ramp needs to last for.  My advisor has been a little lacking in getting me the necessary requirements for this program, however i do know that the entirety of the experiment will be around 30 seconds long, and ramping voltages are not required for every second of the experiment. 

 

To give an idea of the general goal of this experiement, I am working for a team at Bloomsburg University's Physics department where we are hoping to use a magneto optical trap to view a Bose Einstein Condensate e.g. we're making supercold atoms to try to study quantum mechanics.  This summer i have been tasked with creating a program that will control one PCI 6220 digital board with microsecond output precision and two NI 6711 Analog boards with accurate ramping capabilities.  As of right now I only have a list of the components that need to be controlled and on which boards.  My advisor has mentioned that not all the analog outputs will require ramping, some may just require a certain voltage be attained at a certain time.  I wish I had more specific requirements to talk through, but unfortunately my information is limited until my advisor gets back into the country. 

 

I believe the ramp vi will work better with this program, because I am writing samples to the buffer on the board, so in terms of programming i can keep track of samples as opposed to frequency, duty cycles and sampling rates with the waveform vi.  However I never like to rule anything out without trying it.  What i really need is a way to build an array that will output analog values that are updated once every microsecond, so that  ican synchronize this phase of the program with the digital phase.

 

Apologies for such a long winded reply, but i was starting to get a bit confused about my actual goal and it felt good to type out the requirements one more time as a sort of refressher, and just in case anybody on this forum is interested in quantum mechanics help spark a conversation on that topic!  

 

0 Kudos
Message 6 of 7
(4,830 Views)
After you create the ramp array, you can pass it to the Build Waveform function and specify a dt for the waveform data type. You can configure the DAQmx task to use timing from the waveform and simply use DAQmx Write with the waveform as an input. Look at the DAQmx examples that come with LabVIEW.
0 Kudos
Message 7 of 7
(4,821 Views)