<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/159927</link>
    <title>MATLAB Central Newsreader - NiDaq, Daq, Hardware Problem?</title>
    <description>Feed for thread: NiDaq, Daq, Hardware Problem?</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>Mon, 26 Nov 2007 20:16:36 -0500</pubDate>
      <title>NiDaq, Daq, Hardware Problem?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/159927#403192</link>
      <author>Lars Warmbold</author>
      <description>I'm using a Nidaq PCI-3660 Hardware. With Matlab I can not&lt;br&gt;
set the samplerate to 44100. A message like&lt;br&gt;
&quot;Samplerate was set to 43435.34659143651 !&quot; occures.&lt;br&gt;
&lt;br&gt;
Under the original NI-software it is possible. Matlab&lt;br&gt;
doesn't seem to like this samplerate.&lt;br&gt;
&lt;br&gt;
???&lt;br&gt;
&lt;br&gt;
Thanks LARS</description>
    </item>
    <item>
      <pubDate>Mon, 03 Dec 2007 15:34:44 -0500</pubDate>
      <title>Re: NiDaq, Daq, Hardware Problem?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/159927#404289</link>
      <author>Rob Purser</author>
      <description>An NI PCI-3660?  I'm not familiar with that device.  Can you&lt;br&gt;
post a link to the description?  Can you give us some M code&lt;br&gt;
to tell us what you're doing? Also, what version of MATLAB,&lt;br&gt;
OS, etc.&lt;br&gt;
&lt;br&gt;
Thanks,&lt;br&gt;
-Rob</description>
    </item>
    <item>
      <pubDate>Wed, 05 Dec 2007 21:11:59 -0500</pubDate>
      <title>Re: NiDaq, Daq, Hardware Problem?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/159927#404764</link>
      <author>Lars Warmbold</author>
      <description>Hallo Rob!&lt;br&gt;
&lt;br&gt;
I'm sorry. &lt;br&gt;
We are running a classroom version of R2006a at FHTW-Berlin&lt;br&gt;
(Germany).&lt;br&gt;
&lt;br&gt;
The Hardware is a NI-PCI-6036E.&lt;br&gt;
&lt;a href=&quot;http://sine.ni.com/nips/cds/view/p/lang/en/nid/11913&quot;&gt;http://sine.ni.com/nips/cds/view/p/lang/en/nid/11913&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
The Problem is, that this device supports inputsamplerates&lt;br&gt;
of up to 200ks/sec but outputsamplerates only up to&lt;br&gt;
10ks/sec. Therefor I'd like to use the soundcard as&lt;br&gt;
output-device. This device supports only 44.1ks/sec and 8ks/sec.&lt;br&gt;
&lt;br&gt;
The target is  to find a samplerate greater than 20ks/sec&lt;br&gt;
which is supported by both devices. Since there is only&lt;br&gt;
44.1ks/sec (soundcard) I need to run the NI-hardware with&lt;br&gt;
that samplerate. But&lt;br&gt;
&lt;br&gt;
set(ai, 'SampleRate', 44100); &lt;br&gt;
&lt;br&gt;
leads to the message like&lt;br&gt;
&lt;br&gt;
'unable to set samplerate, samplerate set to&lt;br&gt;
43673.893567824578!'&lt;br&gt;
&lt;br&gt;
LARS</description>
    </item>
    <item>
      <pubDate>Thu, 13 Dec 2007 08:56:54 -0500</pubDate>
      <title>Re: NiDaq, Daq, Hardware Problem?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/159927#406020</link>
      <author>Lars </author>
      <description>Hallo Rob!&lt;br&gt;
&lt;br&gt;
I'm sorry.&lt;br&gt;
We are running a classroom version of R2006a at FHTW-Berlin&lt;br&gt;
(Germany).&lt;br&gt;
&lt;br&gt;
The Hardware is a NI-PCI-6036E.&lt;br&gt;
&lt;a href=&quot;http://sine.ni.com/nips/cds/view/p/lang/en/nid/11913&quot;&gt;http://sine.ni.com/nips/cds/view/p/lang/en/nid/11913&lt;/a&gt;&lt;br&gt;
&lt;br&gt;
The Problem is, that this device supports inputsamplerates&lt;br&gt;
of up to 200ks/sec but outputsamplerates only up to&lt;br&gt;
10ks/sec. Therefor I'd like to use the soundcard as&lt;br&gt;
output-device. This device supports only 44.1ks/sec and 8ks/sec.&lt;br&gt;
&lt;br&gt;
The target is to find a samplerate greater than 20ks/sec&lt;br&gt;
which is supported by both devices. Since there is only&lt;br&gt;
44.1ks/sec (soundcard) I need to run the NI-hardware with&lt;br&gt;
that samplerate. But&lt;br&gt;
&lt;br&gt;
set(ai, 'SampleRate', 44100);&lt;br&gt;
&lt;br&gt;
leads to the message like&lt;br&gt;
&lt;br&gt;
'unable to set samplerate, samplerate set to&lt;br&gt;
43673.893567824578!'&lt;br&gt;
&lt;br&gt;
LARS</description>
    </item>
    <item>
      <pubDate>Thu, 13 Dec 2007 16:10:04 -0500</pubDate>
      <title>Re: NiDaq, Daq, Hardware Problem?</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/159927#406082</link>
      <author>Rob Purser</author>
      <description>Like the Rolling Stones said: &quot;You can't always get what you&lt;br&gt;
want!&quot; The toolbox is forced to adjust the user's requested&lt;br&gt;
sample rate based on the clock resolutions of the board.&lt;br&gt;
They should either use SETVERIFY or GET the SampleRate after&lt;br&gt;
they set it to determine the actual sample rate that was&lt;br&gt;
selected. The number of channels added may affect the rate&lt;br&gt;
that is selected.&lt;br&gt;
&lt;br&gt;
The reason for this comes back to hardware clocks on the&lt;br&gt;
boards. Most cards offer a number of fixed speed base&lt;br&gt;
hardware clocks that are used to drive the timing of&lt;br&gt;
acquisition. For instance, the NI E-series cards have 5 base&lt;br&gt;
clocks, including a 20MHz and a 100KHz clock. In order to&lt;br&gt;
reach a given sample rate, there is a programmable divider&lt;br&gt;
that can be set from 1 to 65536. This gives the 20MHz clock&lt;br&gt;
a range of 20 million samples/sec (20e6/1) down to ~305.18&lt;br&gt;
samples/sec (20e6/65536). But, these possible rates are&lt;br&gt;
quantized: there are only 65534 possible values between&lt;br&gt;
those two extremes. So, if you want 1,570,000 samples per&lt;br&gt;
second on a single channel, you'll have to choose between&lt;br&gt;
1,666,666.67 (20e6/12) and 1,538,461.54 (20e6/13).&lt;br&gt;
&lt;br&gt;
This gets more complex what you add multiple channels to the&lt;br&gt;
mix. Now, you need to find the nearest clock rate that is&lt;br&gt;
the requested per channel rate times the number of channels&lt;br&gt;
you want. So, if you want 80000 samples/sec on 7 channels&lt;br&gt;
with a 10MHz base clock, you can only get 84033.61. How'd we&lt;br&gt;
get that? 80000 samples/second/channel * 7 channels = 560000&lt;br&gt;
samples/second. The base clock divided by the requested rate&lt;br&gt;
gives the ideal divider: 10000000/560000 = ~17.8. The&lt;br&gt;
divisor must always be an integer, so we truncate to the&lt;br&gt;
lower value (so the sample rate chosen is always higher than&lt;br&gt;
requested), which is 17. We then calculate the actual sample&lt;br&gt;
rate the card can deliver: 10000000 samples/second divided&lt;br&gt;
by the divider of 17 divided by the number of channels 7:&lt;br&gt;
10000000/17/7 = 84033.61.</description>
    </item>
  </channel>
</rss>

