<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241221</link>
    <title>MATLAB Central Newsreader - getsample &amp; getdata discrepancies</title>
    <description>Feed for thread: getsample &amp; getdata discrepancies</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Wed, 17 Dec 2008 20:43:02 -0500</pubDate>
      <title>getsample &amp; getdata discrepancies</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/241221#617667</link>
      <author>Kern </author>
      <description>I'm using Windows Vista, Matlab R2007a (Student Edition) with dataacquisition Toolbox 2.1 (R2007a).&lt;br&gt;
&lt;br&gt;
I have an MCC USB2527 16 bit data acquisition module and configured the inputs as differential (low channels tied to ground with 10k resistors). Range set to +/-10V. At 16 bits, the measurement accuracy is 0.30518mV.&lt;br&gt;
&lt;br&gt;
If I pick a channel, connect it to a 9V (slightly depleted) battery and make measurements with getsample and getdata, I obtain different results.&lt;br&gt;
&lt;br&gt;
Using a Fluke 35 DVM, the battery voltage is measured as 8.948V&lt;br&gt;
&lt;br&gt;
Using getsample, I obtain on average 8.947V consistently (ranges 8.9468 to 8.9483). &lt;br&gt;
&lt;br&gt;
Using getdata and setting the SamplesPerTrigger to 1000, the average value is 8.942V. However, if you only look at the first measurement in the set, you'll see it's  around 8.948 +/-0.001.  All other measurements in that set range from 8.9404 to 8.9432.&lt;br&gt;
&lt;br&gt;
Why do these two methods not produce the same result on average?  1000 readings from getsample still produces the above (more correct) result.  I need to use getdata, but I would like to have it give me the correct reading.&lt;br&gt;
&lt;br&gt;
Incidentally, the test/configuration program, InstaCal, that comes from Measurement Computing produces the same results as getsample.&lt;br&gt;
&lt;br&gt;
cheers</description>
    </item>
  </channel>
</rss>

