Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

NI function call returns -1.#QNAN to VB6

I use the NI function niDMM_ReadMultiPoint in a VB6 application to make a resistance reading. When the circuit is open, the result passed into my variable is -1.#QNAN.  This generates an overflow error in my application.  Do you know why this occurs? and How can I trap for this condition?
0 Kudos
Message 1 of 3
(7,010 Views)
-1.#QNAN is a quiet (non-signaling) Not a Number value, which is what The ni-DMM instrument driver returns to indicate
that it could not take the required measurement. NaN, +Inf, and -Inf values often cause overflow or other exceptions when used in floating point operations. In your case, you're trying to measure resistance across an open circuit, which is theoretically infinite. You can test the value before trying to use it by passing it to the niDmm_IsOverRange function.
0 Kudos
Message 2 of 3
(7,006 Views)
Absolutely fantastic.  Thanks for your help, Glenn.
0 Kudos
Message 3 of 3
(7,002 Views)