High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

multi-record acquisition and fetch record number

Solved!
Go to solution

My question is about doing a multi-record acquisition and fetching more than one record per fetch, but less than the total number of records.

 

Lets say I am acquiring N records and fetching j records at a time where 1<j<N.  Then for each iteration(i) of my fetch loop do i set property node "fetch record number" to equal i*j ?

0 Kudos
Message 1 of 4
(7,689 Views)
Solution
Accepted by topic author ESD

Hi ESD,

 

You are correct that the "Fetch Record Number" property can be set to i*j in that case. Since i is zero-indexed, it works out nicely. However, you will need to make sure to stop the loop after the correct amount of records have been fetched, which will require you to setup the correct logic. This could be kept simple if you are fetching an integer divisor of your total records each time, but if not, you will need to determine when you are on the last iteration and how many records you have left to fetch before reaching the end of your records.

 

For example, if you are acquiring N=100 total records and fetching j=10 at a time, you can simply fetch i*j each time, and to determine when to stop, just take (i*j)+j >= N. This will work fine when j is an integer divisor of N, but otherwise, more logic will need to be included to determine how many records may be left at the end and then to fetch that many. Hope this helps,

Daniel S.
National Instruments
Message 2 of 4
(7,684 Views)

@dansch wrote:

Hi ESD,

 

You are correct that the "Fetch Record Number" property can be set to i*j in that case. Since i is zero-indexed, it works out nicely. However, you will need to make sure to stop the loop after the correct amount of records have been fetched, which will require you to setup the correct logic.



If I fetching from say k different channels and j records for 'i'th iteration my fetch record number should be i*j*k or just i*j ??

0 Kudos
Message 3 of 4
(3,584 Views)

Hi Rex_saint,

 

Since this discussion is seven years old, you might have a better response from the NI community if you made a new thread and posted your question on there. Feel free to link this forum since your question is related to this issue.

 

Regarding your question, this Help Doc talks about fetching multiple records from multiple channels of a digitizer.

 

Fetching Multiple-Record Acquisitions

http://zone.ni.com/reference/en-XX/help/370592E-01/digitizers/fetching_multiple-record_acquisitions/

 

Reagrds,

Jared T.

0 Kudos
Message 4 of 4
(3,569 Views)