06-28-2013 10:29 AM
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?
06-28-2013 10:52 AM
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".
06-28-2013 10:56 AM - edited 06-28-2013 11:03 AM
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.
06-28-2013 11:08 AM
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.
06-28-2013 11:36 AM - edited 06-28-2013 11:57 AM
How do I find the number of samples currently aquired?
Below are my settings
06-28-2013 01:03 PM - edited 06-28-2013 01:04 PM
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
06-28-2013 01:05 PM
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.