From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing many triggered acquisitions to buffer and infrequent large fetches from onboard buffer

Hello,

I am using a PXie 5122 and I'm trying to acquire small chunks of data (250 samples), store it into the buffer and then fetch that data in large chunks (4 Megasamples) in order to minimize the amount of fetchs i'm doing. Does anyone have any suggestions on doing this?

I'm using a 4 kHz external trigger signal, running at a 100 MHz sampling rate, on 2 channels. I'd like to acquire 12500 samples (or 125 microseconds of data) every 500 microseconds, store that in the onboard memory. Once there is 4 Megasamples of data, I'd like to fetch it.

The main reason I haven't been able to figure this out is because I can't understand why sometimes the Initiate Acquisition block will acquire just one record and then stop, and then other times (like in this example http://forums.ni.com/t5/Example-Program-Drafts/niScope-Multi-Record-Stream-to-Memory/ta-p/3522641) Initiate Acquisition continually acquires records and stores them in the buffer. How do I do that, but very simply put data in the buffer when I want, and then very simply fetch out a large batch from the buffer?

Thanks in advance.

Any insight helps.

Message 1 of 4
(3,949 Views)

1. enable records > than memory (http://zone.ni.com/reference/en-XX/help/370592E-01/scopevi/enable_records_greater_than_memory/).  This property will tell the digitizer to let you configure more records than fit in onboard memory.  It also compacts them in onboard memory so you can efficiently get them off the device.

2. set the number of records to a very high number (ex. max of 32 bit integer).

3. set record number (http://zone.ni.com/reference/en-XX/help/370592Y-01/scopepropref/pniscope_fetchrecordnumber/) which is the offset of the record to get.  Starts at zero and increment by the number of records fetched (http://zone.ni.com/reference/en-XX/help/370592Y-01/scopepropref/pniscope_fetchnumberofrecords/).  I think you'd set the second number to something like ~320 per your description above.

 

FYI:  You can use the trigger hold off property if you want to slow the rate the hardware triggers on your signal.  This could be useful if your system can't keep up.

Message 2 of 4
(3,828 Views)

Ok thanks, I think that is working. Basically it's this implementation (http://forums.ni.com/t5/Example-Program-Drafts/niScope-Multi-Record-Stream-to-Memory/ta-p/3522641) no?

One question is, why does this not update the fetch backlog? Each record length I'm recording is 12500 samples and the fetch backlog is always 12500, even though the Records done is increasing. So how do I monitor how many records are on board, yet to be fetched? The above example has a "fetch backlog" indicator, but it doesn't seem to work very well because the "Enable Records > Memory" property seems to change how many records can actually fit onboard. Therefore the indicator slider fills all the way up without throwing an error. So how can you determine how many records can actually fit onboard?

Thanks

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

I don't believe the API can tell you how many records fit in memory.  You could disable 'enable records > memory' and put in a large number of records.  The error will probably tell you the maximum numbers that can fit in onboard momory.  You can use that number with records done to figure out what you want.  The spec sheet says there is a limit of 100,000 records that can be accessed, so even if more records can be configured you likely can't fall behind by more than 100k records.

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