01-03-2008 04:03 PM
01-03-2008 05:00 PM
You didn't mention what version of labview you are using. You could put your fetch vi in a while loop. Open and close the session outside of this while loop. As for storing your data it depends on several things. Do you need it in human readable form? TDMS might be a better option since it is not as limited as excel. I would also look into the Producer/Consumer design pattern for this app.
Just my 2 cents worth I hope it helps
01-03-2008 06:12 PM
01-04-2008 08:28 AM
01-04-2008 01:12 PM
Howdy myra,
The two essential VI’s to acquire data (excluding the
prerequisite o-scope configuration VI's) include tktds3k Initiate Acquisition.vi and
tktds3k Fetch Waveform.vi. Conveniently, the tktds3k Read Waveform.vi contains
both of these VI's and acts as a tidy little package for them. If you want to
repeatedly read data from a single channel, then placing a
while loop around the tktds3k Read Waveform.vi in the example and adding a Wait
(ms) timer (found in Programming » Timing) to the while loop should do the trick. Don't forget to add a stop button to the loop, too!
Write To Spreadsheet File, Format Into File, and Write To Text File still exist. You can find them under the Functions Palette by right-clicking on the block diagram and navigating to Programming»File I/O. Depending on how you prefer the flow of your VI, you can either index the data and write it to a spreadsheet file outside of the while loop, or you can append the data in each iteration to a spreadsheet within the while loop.
The FFT VI’s are also in the Functions Palette under Signal Processing » Transforms.
And lastly, I must say...welcome back! 😄
01-04-2008 01:50 PM
Thank you for your help!
I actually need to keep track of both channels, so I'm using initiate acquisition and fetch (for each channel) - in this case, do I need to include the initiate acquisition vi in my loop?
I know all of this is pretty basic stuff - I guess I've just been a little overwhelmed trying to jump back into this again! 🙂
Myra
01-04-2008 01:56 PM
Oh sorry,
I forgot to mention for an earlier post - one of the examples that I've been looking at is the 'single channel waveform acquire' vi from the tktds3k driver. I think now that perhaps the reason that the traces disappear is if the vertical and or horizontal settings are much different than that of the input signal to the scope - would that make sense? I managed to adjust the settings as closely as I could to my input signal and the trace did not disappear on the scope (that's good), but the scale settings are quite uninituitive and I'm pretty sure I'm going to have to change them around completely (that's bad 🙂 ).
Thanks! Myra
01-05-2008 02:59 AM
01-07-2008 01:14 PM
More confusion - hopefully someone can help me with some more insight...
I have a question about how to make the acquisition continuous - I tried doing it by simply putting a while loop around the read waveform vi in the 'single channel waveform acquire' vi of the driver (with no time delay). When I varied the input signal to the scope, the response on my graph was rather choppy instead of smooth like that on the oscilloscope screen. Is any one familiar with the time per record input for the configuration vis? It apparently controls the horizontal scale of the graph, but does it also determine the sampling rate - I mean, if it is set to say 1 ms, does the code fetch the data only every ms, or does it acquire the data more often than that? What I would prefer is to be able to sample the data at at least 50 kHz, but choosing the 'time per record' to correspond to that period throws off the graph (we're looking at signals between 3 and 20 kHz). Is there another setting that I haven't seen yet to control the sample rate?
Thanks for your help everyone!
Myra
01-08-2008 12:29 PM