LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Getting analog input maximum rate

Solved!
Go to solution

Hi All , 

 

Does any onw know if i'm setting in Daq device AI channel with X samples to read , is there any option to see whats the AI maximum rate with this parameter ( X ) ?

 

for example setting 200 points will give 25000 Samples per channel per sec

and 300 points will give 20000  Samples per channel per sec

 

Is there any function that can retrive that info or i need to calc it on my own ?

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 1 of 7
(3,737 Views)

I don't understand your question: acquisition rate is not related to the number of samples acquired, it can be set to whichever value you want for your task (within hardwar limits of your DAQ device, of course) in 'rate' parameter of DAQmxCfgSampClkTiming () function.

Can you detail a little more your acquisition task? Also, which type of daq functions are you using?



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 7
(3,668 Views)

Hi Roberto,

 

DAQmxErrChk (DAQmxCfgSampClkTiming(gAItaskHandle,"",AIrate,DAQmx_Val_Rising,DAQmx_Val_FiniteSamps,sampsToRead));

 

This is the function I use , and I'm using DAQmxRegisterEveryNSamplesEvent to acquire my samps simultaneously in 5 AI channels.

 

As for your answer if I'm understanding it you are saying it's no matter if I'm getting 300 or 3000 points from the AI , I can set the rate to the maximum rate supported by my device ?

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 3 of 7
(3,666 Views)
Solution
Accepted by topic author Kobi_K

Yes, that's it!

Sample rate and number of samples are not mutually related: you can have a long but slow acquisition or a short and fast one that acquire the same number of samples, the same as you can set your board to acquire indefinitely at a given sample rate. Setting the appropriate sample rate for your needs is part of the design process of your application.

 

Sample rate and number of samples determine how many samples your daq board will supply: you must provide a way to handle all those samples. Raising the sample rate will determine a faster trigger of EveryNSampleEvent



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 7
(3,663 Views)

OK thanks , is there an option to get from a specific device it's maximum ai rate ? or i need to set it by the device datasheet ?

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 5 of 7
(3,657 Views)

DAQmxGetDeviceAttribute () returns a lot of informations on a specific device; among others, it gives you the following values related to AI tasks

  • DAQmx_Dev_AI_MaxSingleChanRate
  • DAQmx_Dev_AI_MaxMultiChanRate
  • DAQmx_Dev_AI_MinRate
  • DAQmx_Dev_AI_SimultaneousSamplingSupported

 

It is a powerful function you may want to study since it can offer you useful informations about your device.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 6 of 7
(3,652 Views)

Thanks it's a greate solution to my problem

-----------------------------------------
Kobi Kalif
Software Engineer

0 Kudos
Message 7 of 7
(3,649 Views)