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.

PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

PXI-6254 DAQmx Analog Input full scale

Solved!
Go to solution

Hello,

 

I am using PXI-6254 board to read analog input channels. Configured channels using DAQmx Create Channel.vi with below settings.

 

In configuration : RSE

Min : 0

Max: 10

Units: Volts

 

I read the channel using DAQmx Read 2D U16 with sample of 1. I was expecting below values.

 

0 volts = 0 data

10 volts = 65535 data

 

but it is giving 10 volts = 31544 data. Please let me know why.

 

If I configure the channels with below settings:

 

In configuration : RSE

Min : -10

Max: 10

Units: Volts

 

still it is reading the same values ( 0volts = 0 data, 10 volts = 31544).

 

Please let me know, how can I get 10 volts = 65535

 

Thanks,

 

0 Kudos
Message 1 of 4
(3,932 Views)
Solution
Accepted by topic author LVTestek

Hi LVTestek,

 

The PXI-6254 doesn't have a 0 V to 10 V input range. The NI 625x Specifications list the available input ranges:

 

Input range ...................................... ±10 V, ±5 V, ±2 V, ±1 V, ±0.5 V, ±0.2 V, ±0.1 V

 

When you set Min=0 Max=10, DAQmx picks the smallest input range that can measure signals between 0 V and 10 V without clipping. On the PXI-6254, the smallest input range that meets this criterion is the ±10 V range, where -10 V corresponds to -32768, 0 V corresponds to 0, and 10 V corresponds to 32767.

 

However, there is an additional complication: the input ranges on M Series devices are slightly wider to accomodate software calibration. Otherwise, a device's gain error might reduce the effective input range, and offset error would shift the ends of the effective input range. So the [-10 V ... 10 V] range on your PXI-6254 might be more like [-10.3 V ... 10.4 V]. That is why 10 V actually corresponds to 31544, rather than 32767. On a different PXI-6254, 10 V might correspond to a different raw/unscaled value, like 31539 or 31552.

 

Another side effect of software calibration is that the data returned from the "raw" and "unscaled" flavors of the DAQmx Read VI is uncalibrated. This KB explains further: Is DAQmx Raw Data Calibrated and/or Scaled?

 

If you can change your application to use one of the "scaled" (F64) flavors of the DAQmx Read VI, that should save you a lot of effort. If not, could you explain why your program requires unscaled/raw reads? The right approach depends on the requirements. For example, if you want to log data to a file and you need to minimize the file size using raw/unscaled data, configuring DAQmx to log data directly a TDMS file may fulfill your requirements. If you're updating an older application to work with DAQmx and M Series, a different approach may be more appropriate.

 

Brad

 

---
Brad Keryan
NI R&D
Message 2 of 4
(3,919 Views)

Hello Brad,

 

Thank you for your message. It was really a great help. I haven't find the information in any document, which you provided.

 

According to your message below, we should not use U16 read for M series boards.

 

Once again thank you.

 

0 Kudos
Message 3 of 4
(3,905 Views)

Hi LVTestek,

 

I wouldn't go so far as to make a blanket recommendation against raw/unscaled reads. You should use raw/unscaled reads if they are necessary to fulfill the requirements of your application. Otherwise, you should use scaled reads. If raw/unscaled reads are necessary for your application, then you also should use the AI.DevScalingCoeff property to convert the uncalibrated data returned from the raw/unscaled read VI into calibrated data, as described in the KB that I linked.

 

Brad

---
Brad Keryan
NI R&D
0 Kudos
Message 4 of 4
(3,901 Views)