04-14-2010 03:18 PM
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?
04-15-2010 05:28 PM - edited 04-15-2010 05:29 PM
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,
04-20-2010 08:59 AM
04-21-2010 02:04 PM
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,
04-22-2010 08:54 AM
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.
04-23-2010 10:30 AM
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:
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.
04-23-2010 10:50 AM
04-23-2010 11:21 AM
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,
04-26-2010 10:36 AM
04-26-2010 09:07 PM