kiyuna Posted October 25, 2011 Report Share Posted October 25, 2011 Hey Guys, Been using the PXI-6509 card now for a while, but came across a situation i'd never seen before. Just thought someone could either confirm or elaborate on what it is i'm seeing. With all DAQmx read tasks you can setup Sampling Rate and the # of samples to read. So for example, rate = 10kHz, samples=10k, it should take 1 second to read the 10k samples. I dont see a problem with this. But when you get the read VI to output a waveform (Digital->Single Channel -> Multiple Samples -> Waveform), there does not appear to be any dt parameter. I.e the time between sampling points. See below. Now from what i can tell it seems that the sampling frequency (for the 6509 card) set in MAX is ignored and the card just samples at its maximum rate which appears to be around 1MHz. If i then set the dt value of the output waveform to 1uS, i can then extract the correct frequency information. The 1uS does not seem to be exact it appears to be approximate. Even when the task set up in MAX is set to a rate of 1Hz and read 10 samples. The VI does not take 10s to complete, it finishes quite fast. So my question is... Does the PXI-6509 card ignore the sampling rate set up in MAX and just use the maximum sampling rate of 1MHz?? Thanks for any help, it appears it does just would like someone to confirm or explain it if i'm wrong. Quote Link to comment
drjdpowell Posted October 25, 2011 Report Share Posted October 25, 2011 (edited) Now from what i can tell it seems that the sampling frequency (for the 6509 card) set in MAX is ignored and the card just samples at its maximum rate which appears to be around 1MHz. Are you sure you're actually using the "task" configured in MAX, rather than creating a new task programatically? Is "BDHSIO" the name of your MAX task, or is it the name of a channel? If it is a channel, you are creating a new task with the default sampling rate. Edited October 25, 2011 by drjdpowell Quote Link to comment
pylb Posted October 25, 2011 Report Share Posted October 25, 2011 You could try to fix the sampling rate with the DAQmx timing vi. Quote Link to comment
kiyuna Posted October 25, 2011 Author Report Share Posted October 25, 2011 drjdpowell: Its definitely a task configured in MAX, p6.4 to be exact, the above code is not what we're using, its just something I quickly knocked up on my computer for a visual aid. We tried setting up the task programatically and using the DAQmx timing vi, still no luck. We just found it interesting we couldn't change the sample rate from 1MHz. Quote Link to comment
asbo Posted October 26, 2011 Report Share Posted October 26, 2011 If you read back the sample rate after the read, what value is it? Quote Link to comment
kiyuna Posted October 26, 2011 Author Report Share Posted October 26, 2011 asbo, when we do that we get a -200452 error. http://digital.ni.com/public.nsf/allkb/05A563FE3AA7B3C286256FF90077C303 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.