LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why does niDMM Fetch Multipoint Return Random Array of Results?

Alright so I am using the following example https://decibel.ni.com/content/docs/DOC-25292. The goal is to get a constant resistance reading from 10 channels.  I have all the resistance readings coming in correctly.  But, I noticed that everytime I analyze the array of the resistance data, there is no consistency where the channels data is stored.  For example, channel 0 is tied to a 100 ohm resistor and all other 9 channels are tied to  220 ohm resistors. I will see the 100 ohm reading in the 0th element of the array but when the fetch gets called again the 100 ohm is now in the 5 element of the array. It seems random and uncontrollable, thoughts?

0 Kudos
Message 1 of 7
(2,816 Views)

How many samples are you reading with each Fetch?  If you are not reading a number of samples that is divisible by 10, then you will see the values "walk".


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 2 of 7
(2,804 Views)

1, I want one sample per channel. Is that not how to do it? I read it as the number of samples is the number of sampels per channel before it moves to the next channel.

 

EDIT** Still some "walking" when i changed it to 10 samples per iteration.

0 Kudos
Message 3 of 7
(2,802 Views)

You might be telling it 1, but there is a VI in the While loop to gets the number of samples that has been collected.  The max between that number and the number you tell it is the number of samples the fetch returns.  You should set your number of samples to much higher than 1.

 

A better option would be to get rid of that Max & Min node and instead take the number of samples currently acquired and round it up to the nearest 10 (do a Quotient & Remainder, add 1 to the quotient, and multiply).  Use that result for the number of samples to fetch.


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 7
(2,794 Views)

How do I find the number of samples currently aquired?

 

 

Below are my settings

settings.png

0 Kudos
Message 5 of 7
(2,789 Views)

Inside of the While loop is a niDMM Read Status VI.  That VI reads how many samples are in the backlog (number of samples already acquired).

 

Here's what I am suggesting you do


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
Message 6 of 7
(2,762 Views)

Oh I see, anyway I ended up using Labview's Dmm/Switch Express VI and let it take care of most of the stuff. Thanks for your help though.

0 Kudos
Message 7 of 7
(2,758 Views)