04-21-2015 09:05 AM
Hello,
I have build a systems which should continously transmit packages containing only zeros and only at certain time interval (e.g. every 2 seconds) transmit a valid ofdm package. My problem is that the transmit vi "niUSRP Write Tx Data" is too fast. If I want to transmit 10000 samples with an IQ-Rate of 1 MS/sec my transmit-time should be 10 ms. But in Labview the VI only takes about 1 ms to transmit the data to the buffer of the usrp boards and then jumps back and already transmits the next package. Because of this I can't transmit my ofdm package at a certain time stamp as I have no idea on how much data is buffered at the usrp at the moment etc. If I use the "End of Data=true" property of the "niUSRP Write Tx Data"-VI the time is much greater than 10 ms.
Anyone any idea?
Thanks
Solved! Go to Solution.
04-22-2015 03:41 AM
HI EtuelDue,
is it possible if you upload your Code that I could take a look at it?
Maybe you could try to decouple your reading and writing with a producer/consumer architecture.
With this you can buffer your read values and write them wenn you got time to write.
04-22-2015 03:59 AM
Hello msind,
I hope this screenshot is also sufficient.
Before this part I am only initializing the USRP board with my IQ-Rate (1.62MS/sec) etc. (#2), generating the OFDM-Blocks/Zero-Blocks (#1) and providing my interval time (#3, e.g. 0.5 seconds). In the sequence structure (#4) I transmit my choosen block (normal Zero-Block), get the USRP-Board time and add the additional time since the last transmission to my total time value (#5) which is basically my counter. If this time becomes greater than my time intervall from #3 I want to switch from only transmitting blocks containing zeros to my OFDM Block. But from #6 I know that although my transmission of e.g. 10000 samples with a sample rate of 1 MS/sec should take about 10 ms the time difference in #6 is only about 1 ms. So basically the data is send to the board in 1 ms and then jumps back to the beginn of my while loop and transmits data again. Because of this I can never be sure when my OFDM-Block is transmitted (Don't know the state of the buffer).
What I want is for the VI to only transmit data after the buffer is empty. If I try the same setup with "end of data=true" I get an addiotional 60 ms delay.
I hope this clears up some things.
04-22-2015 09:48 AM
I think the best way to be sure that no value gets lost is the producer consumer architecture.
Maybe you should give it a try
If you don't know it you can read some basics here:
http://www.ni.com/white-paper/3023/en/
This should do what you want i think 😉
04-23-2015 12:18 AM
Thank you very much. This seems to fit very much.
04-23-2015 01:30 AM
No problem.
If this is a solution for your problem you could mark it as that, so everyone knows that this question is solved 😉