01-03-2013 11:27 PM
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
01-04-2013 01:24 AM
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
01-04-2013 10:03 AM
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.
01-04-2013 10:21 AM - edited 01-04-2013 10:23 AM
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.
01-04-2013 10:22 AM
Nice and concise Steve.
Doesn't NI DMM abs val the range input. if not, it should! |Range| outght to be a simple fix.
01-04-2013 11:06 AM
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
01-04-2013 12:18 PM
Thanks, I forgot about the Auto range options. Not enough coffee in the system in the AM
01-06-2013 01:06 PM
Thanks everybody for sharing your knowledge..
By swapping lower and upper limits for negative values now it’s working.