LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

about the two parameters "samplerate and scanrate"

Hello:
I'm using PCI-6024E DAQ board and labwindowscvi 5.0.1 to do some work. I want to ask some questions about the "samplerate and scanrate" --- two parameters in the function "scan_op" of multichannels sample.
In the help files the two parameters are so described:"sampleRate is the sample rate you want in units of pts/s. This is the rate at which NI-DAQ samples channels within a scan sequence.Range: Roughly 0.00153 pts/s through 500,000 pts/s. The maximum rate varies according to the type of device you have.scanRate is the scan rate you want in units of scans per second (scans/s). This is the rate at which NI-DAQ performs scans. NI-DAQ performs a scan each time the function samples all the channels listed in the scan sequence.Range:0 and roughly 0.00153 scans/s up to 500,000 scans/s. A value of 0 means that there is no delay between scans and that the effective scanRate is sampleRate / numChans.When scanRate is not 0, scanRate must allow a minimum delay between the last channel of the scan and the first channel of the next scan.Note:Simultaneous sampling devices do not use the sampleRate parameter. Because these boards use simultaneous sampling of all channels, the scanRate parameter controls the acquisition rate; therefore scanRate of 0 is not allowed.Using This Function SCAN_Op initiates a synchronous process of acquiring A/D conversion samples and storing them in a buffer. SCAN_Op does not return control to your application until NI-DAQ acquires all the samples you want (or until an acquisition error occurs)."
The first question I want to ask is: during the scan sequence(either the value of scanrate is 0 or scanrate is not 0),does every channel only sample one point(I mean channel one sample a point,then channel two sample a point,then channel three sample a point,...then delay or no delay)?The second question I want to ask is:if I give a value(!=0) to scanrate,then between the last channel of the scan and the first channel of the next scan has delay.I want to know what the benefit does the delay have or under what case I must have the delay exist?The third question I want to ask is:I think PCI-6024E DAQ board is not a simultaneous sampling device,is it right?The fourth question I want to ask is:what the difference between synchronous process of acquiring A/D conversion samples and asynchronous process of acquiring A/D conversion samples?
If you don't known all the answers,please tell me the part you know,I also very thanks!
0 Kudos
Message 1 of 2
(3,039 Views)
Your questions are concerning NI-DAQ function calls, and thus actually belong in the Measurement Devices categories, such as Multifunction IO. There you will find similar questions/answers and have the benefit of getting answers from other NI-DAQ users. I will go ahead and post a response here this time.

1. By setting your scanrate to 0, you are implementing round-robin sampling. Even intervals will separate each A/D conversion. For instance, if you are reading 3 channels, channel 0 is read, after interval X, channel 1, after interval X, channel 2, after interval X, channel 0, and so on. Usually, people want to scan their channels simultaneously, where channel 0, 1, and 2 are scanned, then after an interval, they are scanned again. This is interval scanning, where you set up a scan rate. However, this requires having separate A/D converters for each channel. If you are multiplexing many channels into one A/D converter, there is a slight delay between the channel readings, controlled by the channel clock. That makes up the sample rate. This is also described with a helpful picture in the KnowledgeBase 1DAIG7W3: What Is the Difference between Interval Scanning and Round Robin Scanning? You can find this on the http://www.ni.com/support pages when you search for search keywords, such as "sample and scan rate". Also, there is another posted Developer Exchange question ("Can anybody give me a clear explanation on Sampling rate and Scan rate as I am bit confused on the same?") that has a short and sweet answer without all the details in the KnowledgeBase.

2. When you set the scan rate, this delay between the first and the second scan is the scan interval. It's a function of what you put for scan rate. For instance, if you put 100 scans/sec, then you do each scan of your channels every 0.01 seconds.

3. The PCI-6024E is not a simultaneous sampling device because it has a multiplexer and one A/D converter. You can see this in the 6023E/6024E/6025E User Manual (http://www.ni.com/support).

4. In this context, a synchronous function call, such as SCAN_Op will wait in the function till all the specified number of scans are acquired and then return. Asynchronous function calls allow you to do other operations in the background. Also, you can implement occurrences and events when you take the asynchronous approach. There is a good Developer Zone document called "An Overview of DAQ Events and Occurrences" if you are interested. You will see several documents, including that one if you search http://www.ni.com/support for "asynchronous".

Regards,
Geneva L.
Applications Engineer
National Instruments
http://www.ni.com/support
0 Kudos
Message 2 of 2
(3,039 Views)