Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

Exhausting voltage states

I am using the 6251's two Analog Out channels to control a two axis galvo scanner for raster scanning.  Depending on the application, it's common to use drive voltages anywhere from +/- 0.1V to +/-10V.  For argument's sake, lets assume the DAQ AO range is set to +/-5V for a 10V spread.  At this setting, the 6251's 16-bit accuracy will provide a step size of 10V/2^16 states = 0.15mV/state.

 

If I provide a 0.4Vpp signal , am I correct in assuming that there are 0.4Vpp / (0.15mV/state) = 2621 addressable states within this smaller voltage spread?

 

How does the 6251 DAQ behave if I call for more mirror positions within this spread than there are addressable states?  Will the 6251 remain at its previous voltage until the finer steps amount to the next 0.15mV increment?  For example, If the mirrors update for every pixel in the scan field, the X axis will scan a row (no problem there), but the Y axis will update for every pixel in the image.  This can quickly exhaust the number of  available states. I know this can be solved with a scalable serpentine scan pattern, but I don't really know how to implement this. 

 

Can anyone point me to a tutorial for creating a custom waveform for the DAQ to use?

 

Thanks,

 

jm

0 Kudos
Message 1 of 20
(3,931 Views)
Hello jm,

First, the total number of states available in a 0.4Vpp signal would be 0.8V/(0.15mV/state) = 5,242 states.

Regardless of this you need to understand that the 6251 does not generate a perfect signal, there is noise and uncertainty in the generation of any voltage signal. In this case the range accuracy of the 6251's AO channels, in the ±5 V range is about 1 mV. This means that you can only be certain of your true voltage output within 1 mV across the total range.

This is not saying that your output signal will have 1 mV of noise, it is just that the nonlinearity of the DAC can cause the true output to vary from the ideal by up to 1 mV over the range.

You will still have the 5,242 states mentioned, but if this nonlinearity is out of specification for your task you may want to consider other devices for providing this voltage to your mirror, such as the PCI/PXI-6281 (259 µV range accuracy).

In terms of creating a waveform to be output from your DAQ device there are afew options. First would be to create the waveform in LabVIEW with individual VIs or a formula node and to write the waveform to a file for future use. Another option would be the Analog Waveform Editor, which you can use to create complicated waveforms and save them to a file for future generation.

Regards,
Dan King

0 Kudos
Message 2 of 20
(3,925 Views)

Hi Dan,

 

Thanks for the response.  I want to make sure I understand this correctly:  The DAQ will respond to step sizes smaller than it's stated limit (~1mV @ +/-5V), but the performance will imprecise and non repeatable. If I want to step0.5mV, will the DAQ provide a 0.5mV+/- 1mV step?

 

Regarding waveforms, I'm more interested in loading a file which provides a template for the waveform (it's nothing exotic), but that can also be scaled for different amplitudes and waveform frequencies. Am I able to do this?

 

I use triangle awveforms to control the mirrors.  One leg of the triangle waveform sweeps whole "rows" in X and  I want the Y axis to remian constant while this occurs. The resulting Y waveform will be a series of steps up to the maximum amplitude, with the step width being the amount of time to collect one row in X (half of the X-axis' scanning frequency).

 

Thanks! 

 

jm

0 Kudos
Message 3 of 20
(3,909 Views)
I think the subjectof this thread has shiftted away from the title of this post and topic of the DAQ subforum.  I'm moving this topic over to the Labview forum.
0 Kudos
Message 4 of 20
(3,903 Views)

Hi jm,

 

As far as the accuracy goes, you are correct that we can guarantee approximately +/- 1mV accuracy across the entire range of the Analog Output (if on the +/-5V range).  Note that our accuracy specifications take into account the following considerations (among others):

1.  The 6251 has a 2 year calibration interval--this means that the spec must be loose enough to account for any changes that occur over the two years between external calibrations.

 

2.  The 6251 has an operating temperature of 0-55 degrees C.  The temperature of your device can greatly affect the measurement result.  See the above link for instructions how to calculate accuracy based on the device temperature.  Performing a "Self Calibration" is one easy way to help account for temperature changes.

 

3.  The accuracy spec is valid for the entire range of the card.  If you are only interested in a specific range, you should be able to improve accuracy by "calibrating" the card over the range you are interested in.  This would involve generating a voltage and measuring its accuracy with a high-precision DMM.  You could then account for offset/gain/non-linearities (depending on how many reference points are taken) by adjusting the value to be generated in software.

So, an accuracy spec of 1 mV does not by any means indicate that the value generated will be unpredictable.  It wouldn't be a bad idea to develop the code for the 6251, and if you need a bit more accuracy consider looking into the 6281 which would use the same driver and would be an easy swap if necessary.

 

 

Regarding the generation of a sawtooth pattern, you can find a similar application with example code here:

Communities: Synchronize Analog Output Sample Clock with TTL Pulse Count

 

I believe the Generate 2D Raster sub VI will be pretty close to what you need.

 

 

-John

John Passiak
0 Kudos
Message 5 of 20
(3,893 Views)

John,

 

Your stepping subVI is perfect for my application.  I was wondering if you had a version that generated triangle waveforms - sawtooth control is a bit harsh on our scanning mirrors at fast speeds.

 

many thanks,

 

jm

0 Kudos
Message 6 of 20
(3,874 Views)

The Generate_2D_Raster.vi works well, but I'm having trouble successfully opening the Raster_2DOutput_wCounter_86.vi 

 

When loading, it asks for "Generate_2D_Raster_86.vi".  I tried renaming Generate_2D_Raster to Generate_2D_Raster_86, but the program is unresponsive.

 

I am running LabVIEW 8.6 professional on Windows XP pro.

0 Kudos
Message 7 of 20
(3,871 Views)

Hi jm,

 

You can find a more refined version of the waveform generation code which includes 3 different modes here, although it might take a few small tweaks to integrate it into the other example:

Communities: Generate 2D Raster Pattern in LabVIEW

 

 

I think I must have renamed the code at some point between posting the different versions, sorry about the inconvenience.  You should just be able to choose to ignore the subvi when loading Raster_2DOutput_wCounter_86.vi.  Then once the main VI has opened, locate the missing subVI, right-click, then select Replace >> All Pallettes >> Select a VI...

 

You can then navigate to find the appropriate VI that you want to use to generate the waveform.

 

 

Do you need to count TTL pulses during each pixel?  I had meant for you to look at just the subVI for how to generate a sawtooth wave, but if you do need to count pulses synchronized with the movement of your scan then the first community example would definitely be a good starting point.  Keep in mind if you use one of the alternate scanning methods you will have to make sure to account for the extra (or out-of-order) samples.

 

 

-John

John Passiak
0 Kudos
Message 8 of 20
(3,859 Views)

Mirror positions are updated according to a TTL trigger pulse from a pulsed laser.  Every time the laser fires, the mirrors change position.

 

I'll look into making the necessary tweaks to add a steped Y triangle wave.  Would you be open to questions if I have them?

 

Thanks again,

 

jm

0 Kudos
Message 9 of 20
(3,850 Views)

I've posted my tweaked VI here

 

http://forums.ni.com/ni/board/message?board.id=170&message.id=438010&jump=true#M438010

 

still working on it, though.

0 Kudos
Message 10 of 20
(3,844 Views)