Showing results for 
Search instead for 
Did you mean: 

Reset time axis on sync pulse

    I'm creating a LabView 8 program that needs to begin gathering voltage data from a PCI-6251 card for 250 ms after a signaling pulse is read.  I've currently created a way to do this by configuring the DAQ Assistant to read 2500 samples at 10 kHz, and triggering the measurement to start when a signal on PFI0 is read.  This data is then written to a text file for data analysis later on in a spreadsheet, but there is one problem I'm having with the time index for the data.  My data ends up looking like:

X_Value    Pulse Input   
0.000000    0.206941
0.000100    0.217889
0.000200    0.210483
0.000300    0.208873
0.000400    0.208229
0.000500    0.207263

Which is perfectly fine.  However, for the second pulse, my data is:

X_Value    Pulse Input   
3.750000    0.207263
3.750100    0.217889
3.750200    0.210161
3.750300    0.208873
3.750400    0.207585

Having to manually change all these time values is EXTREMELY annoying, as I want to be able to take an average of the pulse input for each trial over each time reference point.  In other words, I want to take 4 pulses, find the average pulse input for time = 0 seconds between them, the average for time = 0.000100 seconds, and so on over the 2500 sample points I take for each pulse.  Is there a way to get LabView to reset the time index at each sync pulse the way I currently have this set up, or do I need to find a different way to trigger the measurement to be taken?

0 Kudos
Message 1 of 2
    I found a solution to my problem.  It turns out that if I add a timer Express VI to the program and set it to automatically reset after 0.250 seconds, then wire its "Time Has Elapsed" output to the "Reset" terminal on the Write to File VI, then the time index will be reset for the next signal acquisition.  It only took 6 hours of messing around with alternative triggering and timing mechanisms for me to find this, but thankfully it's an elegant way of solving the problem.
0 Kudos
Message 2 of 2