LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Maximum buffer size with PXI6025E

Hi,
I want to do buffered cyclic analogue DAQ with a PXI6025E Card. At the moment I only use one channel. The following combination of parameters works:
Samling: 20000, Buf Size: 60000, read 600 Values on each loop iteration.
If I increase the sampling rate to 100kS/s I can't find any working combination for the other parameters: If I increase the Buf Size to more than 110000 Samples I get a -10444 Error at AI-Config. If I keep the buf size at 100000 samples and try to get 10000 Samples with each reading I also get the 10444 Error - but now in AI-Read. If I just get 6000 Samples with each reading I can aquire some data until there comes the buffer overflow 10846 (also in AI-Read).

Does anybody have a suggestion what I should change
to aquire data with a scan rate of 100kS/s and later the maximum scan rate of the PXI6025E that is 200kS/s ?

Best regards

Andreas
0 Kudos
Message 1 of 7
(3,294 Views)
Andreas,

Maximum acquisition rates are system dependant, so it would help to know other things:

- What PXI controller are you using?
- Under what OS are you acquiring data? (I assume LabVIEW RT 7.0)
- What operations are being performed in parallel with the acquisition?
- How much memory (RAM) does the PXI controller have?
- Would it be possible for you to try a 50k buffer, reading 10k samples at a time (10 times a second when acquiring at 100kS/s)

The PXI-6025E has one DMA channel, so it is possible that you could be using it up by configuring and starting another hardware operation (like buffered counting in the same board) before you start your analog acquisition task.

Let us know,

Alejandro
LabVIEW RT R&D
National Instruments
0 Kudos
Message 2 of 7
(3,294 Views)
Hi Alejandro,

thank you very much for helping me.

Here the required additional information:

I'm using a PXI-1042 PXI Crate with PXI8145RT CPU with 32MB Memory (0,5MB free). I have a second crate with 64MB.
When asking my question I testet with the smaller one (I didn't know that they were different - sorry). Using the bigger one I don't get the 10444 - Error any more. Operating System is LabView 7.0 RT

If I don't execute my code for evaluation of the aquired data I can run the aquisition with the parameters you suggested.
I can even run the aquisition with a sampling rate of 200kS/s. The remaining problem: some code for evaluation will be needed.

My intention is to let the crate monitor some channels continuously: They might get a sampl
e every 2ms and send a package of 500 samples to a remote application every second.
Some other channels shall work in a start/stop triggered mode and provide a sampling rate as high as possible. They send all sampled values after the stop trigger has occured. The intervall of data sampling will be short.

Since I've read that it is not possible to operate channels with different sampling rates I'm going to sample all channels with the maximum possible sampling rate (eg.: for 4 channels 50kS).
The cyclically monitored channels need evaluation: Take wave - extract every n th value into "for send wave" - send "for send wave" to remote when it contains m values. Looks like this evaluation takes seconds and is not suitable for high sampling rates.

Do you have any Idea of another way do that job?
Is it gerenally possible to have some channels triggered while otheres are aquiring data continuously on one single PXI6025E Card?

Best regards,

Andreas
0 Kudos
Message 3 of 7
(3,293 Views)
Andreas,

Thanks for the information. I am glad part of the issue has been solved.

It seems like current issue is caused by the PXI controller not being able to keep up with the acquisition given the amount of parallel processing in your application.

Software optimizations might allow you to obtain the desired rates, but for a quicker (and maybe even cheaper, if you count the development time) solution, I would recommend getting a second PXI DAQ board so that you can perform two acquisition tasks at different rates.

This will allow you to use lower rates when possible, freeing up the processor (which has to manually copy data from the driver buffer to the application memory space) and therefore possibly allow you to perform the data processing you desire while still acquiring the data.

Additionally, it seems like your application involves two very different types of acquisition tasks:

1) Relatively slow, continuous acquisition, where every sample has to be monitored (possibly evaluated and compared to some threshold)

2) Relatively fast, start/stop triggered acquisition. This ends up being a double-buffered (continuous) acquisition to the driver, because anything involving a stop (reference) trigger is interpreted as a continuous acquisition with a stop trigger.

These two different tasks indicate to me that it would be natural to have two DAQ boards in the system. It would probably save you a lot of headaches.

3) A third option would be to use a controller with a faster processor.

Some software optimizations that might help you include:

- Minimize memory allocations inside the acquisition/processing loop:

Array creation/resizing can make you pay a high performance price. I suggest pre-allocating arrays of large enough sizes instead of building them as you process the acquired data (as in where you decimate the acquired signal)

Use the Initialize Array VI before your acquisition loop, shift registers to keep track of the array throughout the loop iterations, and the Replace Array Subset VI to insert values into the pre-allocated arrays.

- Use unscaled data:

You'll be surprised how much it can help you to simply acquire the data in raw, unscaled mode. You save a lot of processor time by avoiding the scaling process applied by the driver to every acquired sample.

If you want to compare a signal to some fixed value, then simply apply the reverse scale to that value, so you can convert it to the equivalent unscaled value you would obtain when reading directly from the board's ADC. The data that you send to the remote app might then be scaled back to real-world values at the point of destiny (provided that you know the gain factors, ADC resolution and polar mode), saving your acquisition box processing time.

I hope these things help,

Alejandro
0 Kudos
Message 4 of 7
(3,294 Views)
Hi Alejandro,

thanks for your very helpful answer. Now I believe to know what to do. I'm going to use a second DAQ board where I need the two types of data-aquisition at the same time and slow down the sampling rate for continuous aquisition. So I hopefully will have enough remaining CPU time for other tasks that must be done by the PXI-Controller.

Best regards

Andreas
0 Kudos
Message 5 of 7
(3,293 Views)
Andreas,
I was just working on the same thing, trying to see my maximum buffer size for my PXI6052E. =0) I think you should increase the values read on each loop iteration. It should be approximately Buffer Size divided by 1.5. I am fine when reading from one channel and entering:

Scan Rate: 200,000
Buffer Size: 60,000
# to read each loop: 40,000

Let me know if this works!

Lauren
0 Kudos
Message 6 of 7
(3,293 Views)
Hmm.. just realized this discussion is a month old...
0 Kudos
Message 7 of 7
(3,294 Views)