01-30-2013 12:02 PM
Hello all,
What I am looking to do is utilize my RFSA and my arb in my PXIe chassis as a simple modulation analzyer that the input is the FM RF signal, it gets demodulated, and then output the modulation signal out of the AWG. I'd like to have it setup to just run continuously when needed and just output the audio signal out of the arb to go to external equipment.
Is this possible? Do I have to use P2P or soemthing along those lines?
I started with a RFSA capture example and added demodulation to the loop and graph the output and it seems to work as far as continuously demoding and graphing the signal. I'm unsure of how to proceed to get this to pump out my arb rather than just graph.
I've attached my first attempt. you can see the bottom part of the VI is the part that just captures and demods and graphs, and me just grabbing the waveform and trying to stuff it into some ripped off code from an AWG example...
any help would be appreciated.
01-31-2013 11:01 AM
Hi TechNew,
You're first attempt is fairly close to what you'll want, the only difference is that you want to set it up as a streaming waveform on the AWG side so that you can continually write more samples and keep the generation going. I would recommend looking at the Fgen Arb Waveform Streaming VI in the NI Example Finder.
There you can see how you would initialize the waveform with a set of samples, and you can do that by either acquiring some from the RFSA outside of the while loop or just fill the AWG with dummy data to start with, I'd probably recommend the second option just for ease of architecture. The most important parts are that you allocate a waveform up front and that you have the niFgen Initiate Generation VI outside of the while loop with a second Write Waveform VI inside the while loop to accept your stream of demodulated RF data.
You're definitely on the right track, let me know if you have any questions on what I outlined above or if you run into any issues trying to modify your code for the streaming architecture.
Regards,
Peter Williams
02-04-2013 09:56 AM
is it better to set this up with a producer/consumer design pattern?
02-05-2013 10:46 AM
Hi TechNew,
As Peter mentioned before you are on the right track. Setting it up as producer/consumer design pattern is definitely good idea, as this way you will avoid any buffer overflow issues. Here is a good example that you can use to continue your development:
You will need to trim down this example to remove the NI-RFSG driver calls and just leave the FGEN VIs. As you can see all the configuration parameters for the FGEN are set outside of the loop. Let me know if you have any further questions.