Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

AI sample rate is incorrect for simulated ENET-9213, WLS-9213, and USB-9213

Solved!
Go to solution

Hi,

 

For the simulated  ENET-9213, WLS-9213,  and USB-9213 devices, I am able to correctly get the AI sample rate = 1351 Samples/sec using DAQmxGetDevAIMaxSingleChanRate, which incidently is over the spec'ed value of 1200 S/s.

 

However, when I create a task and add an AI voltage channel then query the sample rate from the task I get a sample rate of only 9 Samples/sec. I tested the same code with other devices and I get the sample rate matching the data sheet for the device, so it seems thst this problem is limited to the 9213 devices.

 

Why does the sample rate returned from the task using DAQmxGetSampClkMaxRate return only 9 S/s.

And why is the convert rate from DAQmxGetAIConvRate only 18 S/s.

 

I have attached test code that may be used to reproduce this problem.

 

Regards,

   whemdan

   The MathWorks

0 Kudos
Message 1 of 5
(3,492 Views)

Hello whemdan,

 

So the task you tested for the 9213 was only using one channel?  Also, were the other devices you tested simulated devices as well?

 

Regards,

0 Kudos
Message 2 of 5
(3,471 Views)

Hi Brandon,

 

Yes,  these tests were done using only one channel using the attached code. And, yes, all the devices were simulated.

 

Regards,

   - Wael

0 Kudos
Message 3 of 5
(3,454 Views)
Solution
Accepted by topic author whemdan

Hi,

       When I tried this out with a simulated USB 9213, I used the Sample Clock Max Rate property node, as well as the AIConvert:Max Rate.vi.  I was able to see that that for 1 channel, I could get up to 675.67 S/s, and for 16 channels I could get79.49S/s (which, aggregate is equal to 1271S/s, which is within spec).  For the multichannel and single channel, I could get an AIConvert Max Rate of 1351.35 .  

 

Something that might be going on is that you're not explicitly setting this device to run in high-speed mode.  You'll want to set the channel property Get/Set/Rest AI_ADCTimingMode to High Speed, and you should see much better results that way.

 

Something else to note- I'm using DAQmx 9.0

 

Message 4 of 5
(3,423 Views)

whemdan,

 

I would also like to point out that if you are sampling a channel faster than 100S/s you are operating outside the specified limits of the module.  Please refer to the user manal page 19: NI 9213 User Manual

 

0 Kudos
Message 5 of 5
(3,147 Views)