04-14-2016 03:20 PM
I am trying to transmit avi video between Tx and Rx USRPs. I am having the problem that I only receive the signal on the Rx USRP once the video or in other words the loop is finished on Tx vi. I do not receive any data on Rx, during loop is executing on Tx.
Can someone please look at the code and guide me what is the problem? Why it is working like that.
04-15-2016 03:11 PM
Hi joseph,
Could you describe the behavior you are seeing a little more detail? First, which USRP or USRPs are you using? How are you transmitting and receiving the signal? (cable, antenna etc).
Another question, how are you determining that data is not being received when the Tx vi is running? Is it not updating the display? Is it displaying bad data? Is it just delayed?
I took a look at your code and there are a lot of loops running in parallel. It is possible that some of the loops are actually trying to run in the same threads and might not be parallel, depending on your PC capabilities. Why do you have so many loops? Would it be possible to do all of the data processing in a single loop instead of 3 or 4?
For troubleshooting purposes, I would simplify your code down a bit, such as removing a lot of the demodulating loops and just trying to read the IQ data to see if the number of loops is influencing your acquisition. You can even try the same thing with the Tx vi and start adding loops back until you identify the problem section of code.
-Eric
04-15-2016 03:51 PM
Hello Eric,
Many thanks for your reply. I am using USRP 2920 and I am transmitting data over cable. By the way using same setup if i run other codes (either my deign or example designs) those work fine. So USRPs and the setup has no problem.
I determined the data is not being received becuase I do not see any signal on the receiver vi. But as I mentioned earlier when the video finished on the transmitter vi I see the received signal waveform on the receiver side for few seconds (last few bytes may be).
I do not think the problem belong to receiver side but I believe the problem may be belong to trasnmitter side. If you look at the main transmitter vi you can see that there is top loop on the right side. I believe that loop or the loop inside is may be the source of problem because I am converting video data to bits in that loop.
04-18-2016 04:55 PM
Hi Joseph,
I would recommend simplifying your code for debugging. You can try transmitting known data and the checking the receive vi to see which data bits you are receiving, if they are the first, middle, or last bits. I would also try and reduce the number of while loops to see if that helps. Then, once you get the data received that you expect, start adding back components until there is an issue again, and then you know where to focus your efforts in debugging and optimizing.
Eric
04-20-2016
02:48 AM
- last edited on
01-08-2025
10:04 AM
by
Content Cleaner
Hi Eric,
The code I am trying to modify is from here. I tested this code and it works fine. I am trying to modify this code for transmitting avi video. By the way it also has similar loops. Can you guide me in terms of design where is the problem in my code. As you mentioned I am aslo trying to remove the loops and try to debug but I have tough luck.
Once again many thanks for your support.
04-21-2016 01:23 PM
Hi Joseph,
There are a couple things I see in the code that could be causing issues. First the timing VIs inside the data transmit VI are probably redundant and aren't going to affect the sample rate at all. No data will be available outside of the data transmit VI until it is finished executing, so any timing that has been added will only slow the execution of the subVI, not affect the timing of data being transmitted from the USRP. It is possible you are only outputting the last image from the subVI instead of all the images.
The original example uses a Functional Global Variable to pull the video frame from a file and then output it one frame at a time. I am not very familiar with the IMAQ tools, but it would be a good idea to check to make sure that you are transmitting the images that you are expecting and that the conversion from AVI to JPEG? is happening correctly.
Hope that helps.
-Eric
04-22-2016 05:13 AM
Hello Eric,
Many thanks, as you mentioned I even removed the timing VIs and checked but no results. I observed that with or without timings VIs it just shows that signal is received at the receiver VI which I beleive it represents last image and not all the images. Since the receiver shows the signal only after video finishes.
I also modiifed the design with Functional Global Variable (see attached) but still the same (the receiver shows signal after the video finishes only). As far as converting from AVI to JPEG is concerned I am sure it is right because the subvi where I am doing this conversion works perfectly.
Check this new attachment and let me know what you think.
04-25-2016 01:52 PM
Hi Joseph,
What kind of modulation scheme are you using? Also, have you verified that you have configured everything the same on both the Tx and Rx VIs?
Based on your earlier conversation, it seems that the un-modified example works as expected. What was modified between your code and the original? Chances are one of these modifications changed the behavior of the VI into what you are experiencing now. If this is not the case, can you point us to the example that did work as you expected? Troubleshooting your code by cross-referencing with a working VI may prove beneficial.
04-25-2016
02:55 PM
- last edited on
01-08-2025
10:05 AM
by
Content Cleaner
Hello Paul,
Many thanks for your reply.
As far as modulation is concerned I am using same modulation scheme as the un-modified original example code which is QAM. I have configured everyhting the same on both Tx and Rx vis as well and checked several times.
In my code the source is avi video file but in original example code the source is video from webcam. I also believe that there is some problem with some of the modification I made but I am unable to locate the problem since I am not getting any error message.
You can find attached my code in my last post.
04-26-2016 04:57 PM
Hi joseph,
It doesn't sound like the RF portion of the code is having issues. It sounds like there must be something with the way the added code is breaking up the AVI video. At this point, I recommend copying the image processing part of the code into a new VI and troubleshooting that code to make sure you are outputting the video one frame at a time. The code seems to be only outputting the last image, so the code that is creating the images needs to be debugged.
If there is difficulty in getting all of the AVI frames to output from this new VI, I would post in the Machine Vision forum where users with more vision experience can assist you.
Eric H. - Applications Engineer