PXI

cancel
Showing results for 
Search instead for 
Did you mean: 

NI PXIe- 5645R continuous acquisition

Hello everyone,

I'm kind of new here and I'm using the matlab ividev.niRFSA and am trying to acquire IQ data continuously for a certain amount of time on matlab (say 10 seconds). I keep getting this error:
Vendor Driver Error 0xFFFA5E85: The requested data has been overwritten in memory. Therefore, it is no longer available for fetching.

 

If I'm not mistaken i think this means that the device has some kind of internal buffer that fills up faster than the acquired data is fetched, which leads to the data being overwritten.

1) Is there any way to increase that buffer memory or speed up the fetching just using matlab or do I need something else? Is this a fundamental device limitation or just a matter of coding?

 

I also get this error: Vendor Driver Error 0xBFFA915B: Data transfer too large. Adjust instrument configuration to transmit less data. when I try to acquire IQ data with a number of samples larger than 16.776 e6 using fetchIQSingleRecordComplexF64. Is this the maximum theoretical number of samples? what does that mean?

 

 

Here is my Matlab code: 

 

%% Setup Device
clear devRx
close all
devRx = ividev("niRFSA", "PXI1Slot4");
ch = "0";    devRx.AcquisitionType = "IQ";
Fc = 1e9;  devRx.Acquisition.IQ.IQCarrierFrequency = Fc;
RefLvl = 10;   devRx.Vertical.ReferenceLevel = RefLvl;
configureRefClock(devRx, "OnboardClock", 10e6);
 
%% Acquisition
timeout = 5; acquisitionTime=2; %for example 2 seconds
samplingRate=80e6; devRx.Acquisition.IQ.IQRate = samplingRate;
 
numSamples=16.776e6; finiteSamples=false;
configureNumberOfSamples(devRx, ch, finiteSamples, numSamples); %start fetching from last fetched sample
devRx.Acquisition.Fetch.FetchRelativeTo="CURRENT_READ_POSITION"; %default
 
% preallocate so acquisition loop faster
totalSamples=acquisitionTime*samplingRate;
dataIQ=complex(zeros(1,totalSamples));
numChunks=numel(dataIQ)/numSamples; %divide total samples into chunks
 
% acquire samples continuously then fetch as they are being acquired
% start acquiring only at the beginning -> initiate out of the loop
 
initiate(devRx) %start acquiring infinite samples
for k=0:numChunks-1
%fill up dataIQ
[dataIQ(1+k*numSamples:numSamples+k*numSamples), waveformInfo] = fetchIQSingleRecordComplexF64(devRx, ch, 0, numSamples, timeout);
end
disp('End fetch')
 
2) what am I doing wrong?
Do I have to set finiteSamples = true and initiate the device to start acquiring the data every single loop, even though it seems the acquisition would be discontinuous?
 
3) Would acquiring multiple records fix this problem or not at all?
 
I would love to get some tips and thanks in advance
0 Kudos
Message 1 of 3
(202 Views)

sorry I forgot to mention the Chassis model is  NI PXIe-1078

0 Kudos
Message 2 of 3
(175 Views)

I think I might have an idea as to why the maximum number of samples (complex F64) is  16.776 e6

 

it corresponds to the device's onboard memory of 256 MB and if we assume a complex F64 sample has 64 bits for the real and imaginary parts each so 8+8 = 16 bytes per sample and so we have

 256 MB = 268,435,456 bytes / 16 bytes per sample = 16777216 samples

0 Kudos
Message 3 of 3
(160 Views)