From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

DAQmx autorange

Solved!
Go to solution

Hi all,

 

I'm using an NI-USB 6363, and currently facing an issue about the range for my data.

 

I am sampling data between 10V and -10 V (basically a laser is moving and the voltages correspond to a different distance the laser in measuring on  a 5 mm range, distance converted into a voltage).

 

Since the min and max voltage are 10 and -10 V, I have to use the largest range (-10V to 10 V).

 

However, this is at the expense of a significant loss in resolution on each reading since I need an accuracy of 30 uV (which would correspond to the -0.1V to 0.1V range.

 

Is there a way to change the range automatically, using the min and max of the signal (over say 100 pts, updating regularly), and a shift registe to update the min and max regularly as the laser movesr? If I don't update regularly, I'm worried It would lock on the max and min, and not update when the laser moves.

 

I've used the DAQ assistant in the past, but I'm not sure that's the best thing to do that,

 

Any suggestions will be really appreciated, and please ask for any clarifications if needed

 

Kentmey

 

 

 

 

Kentmey
0 Kudos
Message 1 of 10
(3,723 Views)

Kentmey,

 

Try measuring the same voltage on multiple channels with different range settings. Then use the one with the lowest range which is not overloaded. If the signal amplitude changes rapidly you may need to allow time for the amplifier to come out of saturation on the more sensitive ranges.

 

To change the range on one channel requires you to stop the task, set the new range, and start the task again. This may take more time than you can tolerate between readings.

 

Lynn

Message 2 of 10
(3,704 Views)

If you wanted 30uV resolution over a 20 Volt range, you would need a 20bit ADC.

While these resolutions are available on paper, it is most likely that the ADC is not designed for DC measurments. I refer to DSA (dynamic signal acquisition) devices which have 24bits, but are more or less unusable for DC measurements as they are designed for DYNAMIC signals.

 

So maybe this could be something for you to look into in case the laser is moving a lot and you want to know the delta of the movement rather than its current position.

 

As you need the full range of 20 volts, there is not much of an option here other than Lynns recommendation. But honestly, i think it is a bad idead to have a different resolution depending on the position (somewhere around 0, you got best resolution with reduced resolution the more you leave that area).

 

Norbert

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 3 of 10
(3,699 Views)

Well, this is my problem, I don't know the range in the first place since the readings are likely to be

 

Position a : 1.2445V,

Position b : 4.4563V.

 

The laser will stay about 2 s at the same position, should it be more than enough time to close the task and start a new one?

Kentmey
0 Kudos
Message 4 of 10
(3,690 Views)

What I had in mind was closer to

 

Initial range : 10 to -10 V


As soon as the voltage is read at Position a : 1.2445V, the range changes to 1.4 to 1 V (hence increasing the resolution).

Position b : reset the range as the laser moves from 10 to -10 V, then at position b : 4.4563V, the range changes from 4.6 to 4.2 V.

 

Do you think this could be implemented?

 

 

Kentmey
0 Kudos
Message 5 of 10
(3,689 Views)
You've already been told that you can change the range at the expense of stopping the task and restarting. You should also know that the actual range of the adc is not the min and max that you specify.
0 Kudos
Message 6 of 10
(3,681 Views)

Thanks

Kentmey
0 Kudos
Message 7 of 10
(3,678 Views)
Solution
Accepted by topic author Kentmey

Kentmey,

 

Another way you could work to maintain full resolution without range switching would be to use two analog input channels and one analog output channel. The first AI channel is set to +/-10 V to make an approximate measurement of the input signal. The AO channel is then set to a value close (within +/-0.1 V) to the value measured by the first AI channel. The second AI channel is set to +/-0.1 V range and differential inputs. The position signal goes to the non-inverting input and the AO signal goes to the inverting input. The second channel then measures the difference between the "reference" signal generated by the AO and the position signal with the resolution of the second AI channel (~3 uV).  The accuracy will be limited by the errors in both the AO channel and the second AI channel with the AO error dominating. You would still have the overload issue until the AO signal is set to the AI0 value, but it sounds like your timing is such that a short delay for the differential high gain channel to settle will not be an issue.

 

This is essentially a variation of the potentiometric voltage measurement used in standards laboratories for more than 100 years.

 

Lynn

Message 8 of 10
(3,662 Views)

Thanks, I will consider this.

 

Also, we made some progress in reducing the noise in the application, which turns out was coming from a power supply elsewhere in the system :),

 

Many thanks everyone,

 

Kentmey

Kentmey
0 Kudos
Message 9 of 10
(3,659 Views)

Apologies for the necro bump, but we were facing a similar issue and a co-worker came up with a solution that ties up only two AI channels.  The first part of the setup is identical, feed the full signal to AI1 in RSE mode and +/- 10V range.  After you measure the DC value, apply the appropriate voltage to AO0 which is connected to the AI-SENSE terminal.  Then measure the signal again on AI2 in NRSE mode, which effectively achieves the same thing as a differential measurement with one less AI.  The advantage of 

Message 10 of 10
(3,233 Views)