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:
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?
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.