ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Measure DVM functions returns 0

Hello,

 

My voltage measurement VI returns 0 every 200-500 calls. This function is used to measure voltage on a shunt. When I put a breakpoint when that happens I can see on the DVM front panel (Agilent 34411A) a different voltage value. Also as it measures voltage on a shunt there's always some noise if if there's no current flow, meaning some millivolts, never 0.

 

Any ideas will be appreciated.

 

Thanks
CT

0 Kudos
Message 1 of 6
(3,810 Views)

Are you getting an error at all when this happens?  Is the driver truncating the value to 0?



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 2 of 6
(3,803 Views)

Not getting an error. I had all VI's visible when that happened, no errors ( I had a breakpoint set in TestStand). Then I clicked "Run" again and received 0.00745236.

Thanks

CT

0 Kudos
Message 3 of 6
(3,778 Views)

Are you using the serial port?

I have seen simlar zero readings when using the serial port. I ended up implementing a check on how many characters are read.

(Or say: the read function in that driver maybe doesn't catch a false reading (maybe due to a EMC spice on the serial line)  and outputs the default (zero) value. )

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 4 of 6
(3,761 Views)

No, the DVM is connected through USB to a D-Link hub and then to PC.

I am using XP

Thanks

CT

0 Kudos
Message 5 of 6
(3,751 Views)

However, if you dig into the driver you will find the core reason:

34401-fetch.png

 

the input string is not checked, so if you read (for what ever reasons) something that the spreadsheet string to array coudn't convert correctly, it will turn out as a zero value.

**bleep** happens, so you have to implement a string check (use the error out from scan from string)

 

 

Greetings from Germany
Henrik

LV since v3.1

“ground” is a convenient fantasy

'˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'


0 Kudos
Message 6 of 6
(3,740 Views)