Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

setting input range on PCI-6115

I am trying to change A2D cards on a long exisitng .vi .  The old card had one input range, only put out counts of the a2d and we used preamp gains to fit signals into that range.  I am trying to convert to the use of the PCI-6115 with no preamps but input ranges.  The output of the a2d has to be in counts and I was hoping to be able to set the input range between acquisitions and fool the vi into thinking each range is gain or loss.  ie if range is 1 or 0 dB then a range of .1 woud be a gain of 20 dB.  I need to be sure the gain/range is what I say it is and not just set a min/max of the signal I expect.  If I do not know and can not set the exact range/gain then I have no way to calibrate the signals I am returned.  It is not feasable at this point to switch the data I store from counts to volts.

 

How can I be sure the range (and gain?) is what I say it is?

 

I need it to make the switch as fast as possible.  What  method would you use to make range switching fastest?

0 Kudos
Message 1 of 10
(4,445 Views)

Howdy Bob,

 

When you select an input range for your DAQ card the driver choose a gain setting to maximize the resolution.  You can learn more about the process in this KnowledgeBase. There are discrete range/gain settings available for each card.  If you specify an input range in between one of these levels the driver with coerce the range up to be one of these levels.

 

The PCI-6115 User Manual specifies the following input range values:

 

±42 V

±20 V

±10 V

±5 V

±2 V

±1 V

±500 mV

±200 mV

 

 After you have set max/min values for the DAQmx AI Task you can use the DAQmx Channel Property Node to read back the values to see what they have been coerced to.  I do not understand your last question about "what method would you use to make range switching fastest?"  Would you please rephrase that question. Thanks!

 

Regards,

Message Edited by Barron S on 04-15-2010 05:29 PM
Barron
Applications Engineering
National Instruments
0 Kudos
Message 2 of 10
(4,420 Views)
Much of our work has wide dynamic range so I may need to change input range during the course of a data collection runs.  Between a2d transfers.  The faster I can do that the better.   The sequence is something like this.

output a freq

collect a sample window of 2k samples

output new f

collect 2k

output new f

collect 2k

output new f

level out of range so change input scale/gain/range?

collect 2k...

 

Can I set input range to +- .9v and know it will always use +-1 v range?

Will that then let me know that with 1v reference 0db that gain is 0db through the system?

If I then set the input range to +-.4 setting the +-.5 range and calling the "system gain" +6 db?
0 Kudos
Message 3 of 10
(4,395 Views)

In order to change the input range setting of a DAQmx task you need to stop the task, modify the AI.Max/AI.Min values. then re-start the task.  You cannot change the input range on-the-fly while a task is running.

 

If you do not specify one of the device's available input ranges then the DAQmx driver should always coerce up to the next smallest range (so yes, +/-0.9V will be coerced to +/-1V).  If you want to verify this behavior you can read back the values using the DAQmx Channel Property Node as I mentioned in the previous post.

 

The DAQmx driver uses the specified input range to determine what gain to apply to the input to maximize its resolution to the ADC.  You will want to specify the smallest range that your signal will fit within (too small and you signal will be clipped at the top and bottom).  The DAQmx driver performs the appropriate conversion depending on the gain used to return a scaled value to the user.

 

For example, if we specify an Analog Input Voltage Task with an max/min range of +/-10V and apply a 0.5V input signal the DAQmx driver will return a value of 0.5V.  If we change the max/min range to be +/-1V while applying the same input signal we will still receive a value of 0.5V, but it will have more accuracy.

 

Please let me know if this explanation is clear or if you have any other questions.

 

Regards,

Barron
Applications Engineering
National Instruments
0 Kudos
Message 4 of 10
(4,374 Views)

    I just need to be clear on one thing then I think I got it.

1.  I want to be clear that there is only one gain.  That gain IS the input range setting.  If I set +-.5v input range (+6dB) then no other gain or loss will be added.

 

0 Kudos
Message 5 of 10
(4,359 Views)

The Instrumentation Amplifier is the only place where a physical gain is applied to your signal.  See the block diagram of the analog input for the PCI-6115 below:

 

S Series Analog Input Block Diagram

 

The instrumentation amplifier can only apply one of a specific handful of gains which is determined by the input range you specificy (I listed these in my first post).   The DAQmx driver determines the correct gain to apply to the signal based on your input range setting to maximize the size of the signal seen by the ADC (without over amplifying it and clipping the signal).  After the signal has been digitized the DAQmx driver applies a software gain to counter the physical gain applied to the signal so that the value you receive is effectively unscaled.

 

Here is the key takeaway: The pre-amp stage and the chosen gain are designed to be transparent to you.  All of the data you receive will appears as if it been multiplied by a gain of one (not scaled in either direction).  The purpose of specifying an input max/min range is to let DAQmx know how big your signal is going to be so it can give you the most accurate measurement possible.

Barron
Applications Engineering
National Instruments
Message 6 of 10
(4,341 Views)
I am still unclear how I can use the A2D raw counts out and end up knowing how to calibrate it?  I may just have to look into converting my programs away from using raw counts and over to using voltage.  If I choose output to be Analog Unscaled 2D, I16 does it not apply the second software adjustment you are talking about?
0 Kudos
Message 7 of 10
(4,337 Views)

Bob,

 

You are correct that if you choose Analog Unscaled 2D, I16 the data you receive comes straight from the device and does not receive any software scaling by the DAQmx driver.  I would recommend changing your program to use the Analog DBL or Analog Waveform data type to read voltage.  It would help simplify this matter and avoid confusion.

 

Regards,

Barron
Applications Engineering
National Instruments
0 Kudos
Message 8 of 10
(4,333 Views)
Changing to voltage would help make this part easier but we started developing the programs we use in labview 4.1.  The main vi has like 260 subs and I think the second most used 148 subs.  Changing to voltage readings may cost me weeks of programming and make it incompatable with older versions.
0 Kudos
Message 9 of 10
(4,298 Views)
It's already incompatible since you are using an M series card and that only uses the DAQmx driver. If you are converting to the new driver in a single location, perhaps you could read the scaled voltage and then convert that to I16.
0 Kudos
Message 10 of 10
(4,282 Views)