USRP Software Radio

cancel
Showing results for 
Search instead for 
Did you mean: 

Buffer clear ?

Solved!
Go to solution

Hi, everyone,  how can I clear the usrp buffer before I read it ? is there any VI or command ?

0 Kudos
Message 1 of 14
(9,260 Views)

Can you explain what you mean by 'buffer clear'?  Are you seeing some behavior you are trying to change?

0 Kudos
Message 2 of 14
(9,257 Views)

Sorry for my careless, I didn't state my question clearly.  As we know, the AD of the receiver will  store the data into the usrp buffer continuously once the receiver is initialized. The buffer will save much data we do not want to process as we know when our signal will be transmitted. The unwanted noise data in the buffer will lead to process delay of our communication system(Our communication system is the transmitter will send next packet until receive the ack from the receiver). So we want to clear the buffer of usrp, before we read it . If I do not make the qestion clearly, please let me know , thanks.

0 Kudos
Message 3 of 14
(9,247 Views)

The USRP does not have an onboard buffer.  Perhaps what you are looking for is a good energy detecting trigger.  The following VI uses a very good, simple, energy level trigger:  https://decibel.ni.com/content/docs/DOC-23285

 

The trigger is shown in the top left corner of figure 7 (a small whilte loop nested in a larger while loop).  It triggers on energy with a known packet length and can even connect to buffers together if the trigger happens too close to the end of the first fetch buffer.  The number of total samples to acquire should be set to about 110% of the number of samples in your know packet length.

 

(also, this trigger only triggers off of the first channel in the MIMO setup, so it can be extracted and reused with very minor modification for SISO systems.)

 

Erik

0 Kudos
Message 4 of 14
(9,242 Views)

Here is the same code modified for the single channel case.

 

https://decibel.ni.com/content/docs/DOC-25900

0 Kudos
Message 5 of 14
(9,236 Views)

Hi ErikL , are you sure the usrp do not have on onboard buffer( or memory) ?  So whether the receiver will  acquire data from the radio frontend  continuously once the receiver is initialized ? If I do not read the data, where the data will go ?

 

We have done an experiment, which include three part:  part A will send a packet on channel 915Mhz instantly once it receive an ack from part C on channel 1Ghz, and part B receieve data of part A on channel 915Mhz .  Part C send the ack very quickly, and part A send the packet quickly too.  We start the three parts at the same time, but we stop part A and part C first ,  and we observed part B will continouse to process the valid packets for a long time after we stop part A, C.  Because of part B process delay, the data read from the buffer is slowly, and all the data from part A have stored into the buffer( or memory), so in my opinion , the buffer should be exist.

 

Ps : thank for your recommend about the energy detecting trigger, we have use it to detect the signal. 

0 Kudos
Message 6 of 14
(9,234 Views)
Solution
Accepted by HustLiliAn
The buffer is in the pc in the NI-USRP driver. I suggest using queues to pull samples out of the driver and into LabVIEW. You can then empty the queue if needed.
Message 7 of 14
(9,231 Views)

We want to find the most efficient method to clear the buffer before we want to  fetch the data through usrp vi,  so we can process the newly data instantly. Whether can we fetch the all data in buffer once a time ? how can ? To give a large number for NI usrp fetch rx data Vi ? how large ? 

 

You mentioned the queue way , but it may also take much cpu resources to fetch the data into queue, and may lead to the process delay of our packet demodulation.  

 

whether there is a way to clear the  buffer  in the pc in the NI-USRP drive ? 

 

thanks 

0 Kudos
Message 8 of 14
(9,226 Views)

The USRP uses the concept of a timed start to allow syncronized or specified time start of acquistions.  You can use the the VI's with the green play arrow and red stop square to start and stop acquistions and the timing VI to specificy start time.  The Fetch VI will then block until the specified time is reached.

0 Kudos
Message 9 of 14
(9,214 Views)

Hi, ErikL, I am sorry , I didn't see "VI's with the green play arrow and red stop square to start and stop acquistions and the timing VI to specificy start time"  and I also didn't know how to block the Fetch data VI . can you give some example ?  thank you very much !

0 Kudos
Message 10 of 14
(9,201 Views)