LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using NI DMM 4065. I got a NaN for DC voltage readings

Hi

I am using Ni 4065 PCI card for reading DC voltages. I am reading voltages (+-15V, -17V, 60V, -120V, +30V, +5V, +8.5V). It measures only for 5V and 8.5V and gives NaN for every other Voltage reading. Screen shot of code is attached. Kindly take a look and tell me possible error

timmy
0 Kudos
Message 1 of 8
(3,689 Views)

It was range selection problem. Now I selected the range so that measured Voltages must be in range. But still it is giving error for -ve voltages. What should I do for measuring negative voltages? Attach is the image of error

timmy
Download All
0 Kudos
Message 2 of 8
(3,682 Views)

Hi Timmy, be sure that your range setting is always a positive number. We have 100mV, 1V, 10V, 100V, and 300V ranges which are bipolar and allow you to measure +/- full scale. If you specify a range that falls between two of our ranges (ie 30V) our driver will coerce your setting into the next highest range. 

Steve B

Message 3 of 8
(3,652 Views)

As already stated, your range should be positive.  Put in an Absolute Value on the range input before wiring to the DMM function.

 

Also, your limits for the negative values are swapped.  -119.5 is greater than -120.5, so your In Range and Coerce function will always return a FALSE.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 8
(3,642 Views)

Nice and concise Steve.

Doesn't NI DMM abs val the range input.   if not, it should! |Range| outght to be a simple fix.


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 8
(3,641 Views)

Thanks Jeff. We don't have an absolute value for the range input and part of the reason is that you can enter a few special values for auto ranging that are defined as -1 (Auto Range On), -2 (Auto Range Off) and -3 (Auto Range Once). Timmy may be interested in using autorange if he isn't concerned with knowing which range was specifically used for each measurement and can handle a little slow down as the DMM determines the range. 

 

Here is a link to the DMM 3.0 Help online: Configuration: Range Property

 

Steve B

0 Kudos
Message 6 of 8
(3,627 Views)

Thanks, I forgot about the Auto range options.   Not enough coffee in the system in the AM


"Should be" isn't "Is" -Jay
0 Kudos
Message 7 of 8
(3,617 Views)

Thanks everybody for sharing your knowledge..

By swapping lower and upper limits for negative values now it’s working.

timmy
0 Kudos
Message 8 of 8
(3,586 Views)