09-20-2011 06:55 AM
Hello,
I am using a NI USB-6351 to generate two counters with different frequencies (typical values counter 1 = 500 khz, counter 2 = 1.3 khz). The first one is a clock and the second a periodic RESET that enable the transmission of an analog signal from a sensor. I acquire in parallel this periodic analog signal, see (figure 1 and the vi given as an attached file). Up to here it seems to work fine. I have to use a rather high sampling rate, because I am only interested in the high frequency components that appear when my periodic waveform is high (see figure 2 for a zoom on the high frequencies component). I would like to avoid displaying the whole waveform each time, but just as with an oscilloscope, be able to display one period based on a trigger on the rising and falling edge of my analog signal (like in figure 2). I used a producer/consumer scheme and a trigger and gate vi to do this. IT seems to work but I have two problems:
1-I am not sure that I display all the period of my signal, or just some that the hardware/software manage to trigger ?
2-For the moment, the whole waveform is continuously written as a line in a spreadsheet file. I would like to write each period of my waveform (as in figure 2) as different lines in a file. The column in the file would represent the relative time over one period, or one frame, and the different lines would be the different period or frame. Differently said, I would like to transform my 1D waveform into a kind of 2 D, or image waveform and write it to a file. How should I do this without getting into trouble with buffering error and so on?
Thanks in advance for the help,
Grégory