LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

NI USB 6212 - Analog voltage ramp generation

Dear Community Members,

 

Hope you are doing well. I am new to using the NI USB-2612 board. I am trying to use it to generate a linear voltage ramp.

 

I know that this board has two analog outputs, a DAC with 16 bit resolution and an output range of ±10V.


By a simple calculation we can calculate the minimum step increase of the analog output (+10V - (-10V)/2^16 = 305µV).


My question is: how can I control the step size each time to a value that I set, for example 305µV ?

 

Thank you

0 Kudos
Message 1 of 5
(1,220 Views)
Hi meiz, you can generate an array of values to write to the device. For example: [0, 305u, 610u, ...]. Then, when you run the task they will be output in order of the array. I like to use "Ramp Pattern.vi" to generate the values, but you can also use a for loop pretty easily. I believe Ramp Pattern only works if the end value is larger than the start value.
0 Kudos
Message 2 of 5
(1,199 Views)

First of all,

Thank you for your answer.

The problem is that I have to control the increment time of each point and I can't do it

Amities

0 Kudos
Message 3 of 5
(1,154 Views)
You can do that. What issues are you having? Can you post the code you have so far? (LV 2016 for me)
0 Kudos
Message 4 of 5
(1,141 Views)

@meiz wrote:

Dear Community Members,

 

Hope you are doing well. I am new to using the NI USB-2612 board. I am trying to use it to generate a linear voltage ramp.

 

I know that this board has two analog outputs, a DAC with 16 bit resolution and an output range of ±10V.


By a simple calculation we can calculate the minimum step increase of the analog output (+10V - (-10V)/2^16 = 305µV).


My question is: how can I control the step size each time to a value that I set, for example 305µV ?

 

Thank you


I wouldn't worry about the step size, rather figure out the ramp rate (V/s), and generate a linear ramp (array of voltages) to achieve the ramp with a given sampling rate.

 

Rule of thumb - slower the ramp rate, the finer the ramp (there is a limit beyond which you will see steps)

For example,

You want to generate a linear ramp 0-10V in 1 sec.

Now, the ramp rate becomes 10V/s, and the smoothness of the ramp now depends on how small the steps are in the ramp.

Choosing a higher sampling rate gives you the smallest step size but is limited by the step size.

With a step size of 305uV, to generate the 0-10V ramp with just 1 point at each step, your sweet spot would be a 32.787 kHz sampling rate. Choosing this rate will take the AO DAC through all successive steps from 0V to 10V.

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 5 of 5
(1,135 Views)