Jump to content
  • 0

Voltmeter giving me strange readings once I put the msoRead block in a loop?


crash_override

Question

I have this simple code here. 

e412069ada9fb622b1c20d524f7055aa.png.c4734f96cba402aa12729ede3f0f91a5.png

 

It readings the voltmeter 50 times and then after it does an average. The problem is that putting msoRead gives crazy whacky readings when I put it into a loop like this and I have no idea why. I'm using scope channel 1 and have the positive and negative pins in parallel with a physical voltmeter. The readings are jump quite a bit when outside of the loop but they are atleast +- .1 off which I can deal with by averaging, but I can't deal with values like .0003 when it should be reading .4 - .6. Any ideas? Thanks for reading my question!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Hi @crash_override,

I think this may be because the MSO Read VI doesn't actually "read" the analog data; the description states that it transfers the data from the instrument. I'm not sure if it then clears out the data from the Instrument, but since you are not getting new measurements, that may be why you are getting strange data. You may want to also include the MSO Run Vi (or however you have your voltmeter data measurement happening) to keep collecting new data, similar to how it is done in the image of the while structure I have attached.

Thanks,
JColvin

while structure.PNG

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...