08-26-2011 03:53 AM - edited 08-26-2011 03:59 AM
I am having trouble implementing some functionality for a NI-5122 Digitizer - I am more familiar with NI-DAQ than NI-Scope.
I already have code which retunes the downconverter (5600) and mixes the signal to the IF. How do I configure the NI-5122 to capture a burst of the waveform every X seconds? Currently I just have a VI which continuously acquires the waveform.
08-26-2011 08:01 AM
If you already are acquiring continuously, you can get the functionality you want by throwing away the data you are uninterested in (assuming you want a time based, not signal based periodic acquisition). Alternate possibilities are using a timed loop to acquire periodically (timing will be subject to operating system issues) or use a function generator or signal from the 5600, if any, to digitally trigger the scope periodically. If you want a signal based acquisition, either use the triggering modes of the scope itself or examine your continuous signal for custom trigger conditions and select the signal subset yourself.
Post your code attempts next time if you need more help so we can give better feedback.
08-26-2011 10:18 AM
Thanks for the reply. The problem with the method you outline - chucking away samples is that the buffer is very full. This makes it difficult to get all the samples back to LabVIEW and then check the time stamps. I need to get 50ms of a waveform every three seconds. My digitizer is sampling at 50MHz and hence 50ms is 2.5MSamples per capture. The three seconds must be very accurate - hence the blackplane is locked to an antomic clock module within the PXI system.
Either way, if I trigger to get 50ms or just locate the 50ms of interest, this is a lot of data to read back from the module - what is the best way (fastest) way to do this? I also need to downconvert to baseband? My thoughts from thinking about it today is that I should have been given RF products rather than NI Scope products by the company.. thoughts?
08-29-2011 08:42 AM
The best way is going to be highly dependent on your hardware. Given your previous comments, I assume you have a PXI system. I would create a ring buffer of a bit over three seconds of data and continually stream from the digitizer to the ring buffer (ring buffer is a shift register in a different loop than the streaming acquisition - hopefully you have a dual core or hyperthreaded processor). You will need to establish a timestamp on your initial acquisition, but after that, you can use the number of samples taken to increment your timestamp. When you get a trigger match, finish out your 3 second acquisition into the ring buffer, then copy to whatever processing you are doing later. This can be done in parallel to the continued acquisition, so you do not miss another trigger. A few things to note:
You may end up with a bottleneck in the PCI bus transfer rate. If you do, try reducing your data size to 8-bits instead of the default 16-bits. This will reduce your PCI bus throughput from 100MBytes/sec down to 50MBytes/sec. Since the theoretical max of PCI is 133MBytes/sec, you are currently dangerously close to this.
Does your timing module support periodic digital trigger outputs? If so, this would be a much easier way to go to get your data.