04-12-2012 11:31 AM
I am working on a quasi radar setup using a pulse generator (with continuous wave generator), Tektronics DPO7000 scope, and a Newmark motion control system. The basic routine is to move in x and z, trigger a single shot pulse onto an object, then record the return wave from a probe connected to the scope. I'm having a couple of problems related to data collection and manipulation.
1) I've altered the Tek7000 series vi "Fetch Waveform to File" to record appended waveform data points from binary to ascii in a speadsheet via "Write to Spreasheet" vi. The commands for the scope transfer preamble information used to compute the waveform data into the first column of the file. This first column and first two rows are basically useless for me and I've been trying to figure out a way to keep this info from being added each time the scope appends to file. I think the scope records the info out of necessity for the computation, so I have been trying inserting into an array and then indexing but am having no luck. Can anyone offer a method for collecting this data to spreadsheet but removing the column and first two rows each time?
2) I need to collect data from 10 pulses at each point in space. I would like to average the columns of the spreadsheet file each time it is appended. Any help would be appreciated.
See attached,
Thanks!
04-13-2012 05:47 PM
Hi frakintosh,
Using the Array Subset function here might help as you can select only the elements of the array after the ones you don't want to record. It would look something like the code below.
04-17-2012 11:21 AM
Thanks Zach. I think that will work. Any ideas on how I could solve part 2 of my original question? What if I wanted to average the data after I collected it. Suppose I have a tab or comma delimited file. Each time data is appended it writes to a new row. Suppose I have 3 columns and 100 rows. Row one is 2.15, 2.26, 2.35, and row 2 is 2.25, 2.26, 2.45, row 3 is ... etc. I want to average each column for every 10 rows and write that to a file. How could I do this?
Thasnk,
Evan
04-18-2012 06:53 PM
Hi frakintosh,
Yous should be able to use the Array Subset function to seperate sets of values in the array to average. Then, you could write the averages to a file seperately from your other write function. Does this sound like what you are trying to do?
04-20-2012 09:08 AM
I think so...I'll try that. Thanks.
04-23-2012 02:54 PM
It would look something like this for the first column, first ten values: