LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

High-speed aquisition time stamp

I am using traditional NI-DAQ with a 6071E board and acquiring data at very high rates using AquireWaveforms.VI I want to save this data in a text file with either a column of time first or even a column of time before each channel (anywhere from 1-64 channels). Because I am acquiring at such high rates, I suppose I want to be able to extract timing data from the Hardware since I'm not looping and any software timing wouldn't be accurate. Also, if at all possible I want to be able to have the time for each measurement from each channel so I can include the phase shift that comes with multiplexing. Is any of this possible? I really need resolution much better than 1 second. at least to the millisecond, but I am looking for even bette
r than this.
Thanks so much,
Rick
0 Kudos
Message 1 of 4
(2,934 Views)
If you are using the hardware clocks, then you should know the relative timing. After all, the clocks are accurate to within a few nanoseconds (somewhere in the specs). There's nothing you could do to improve on that, short of a dedicated system. Any software you try to use that reads a timer, will have its own non-deterministic properties.
Be aware that you may not get exactly the sample rate you ask for. The sample clock is derived from a timebase via an INTEGER divider, so you may get a number that is different from that. But the VI should be able to tell you the actual rate used.
The channel-to-channel- delay time is also controlled by accurate clocks. In some cases it is controlled by the program - I'm not sure whether your particular board is ca
pable of that or not.

But you should be able to manufacture the time axis from the actual sample rate and the sample number. Each frame time is (Sample Number) * delta Time + Start Time. The next channel is sampled at that time plus the inter-channel time.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 4
(2,934 Views)
Thanks, that makes sense. I figured I'd just end up doing it manually, I was just hoping the card would report the times on its own.

Do you know how to get the VI to tell me the actual rate if i'm outputing an array instead of a waveform? Or is there a way to extract the dt from a waveform output and then convert it into an array to write to a file?

Also, does anyone know what the inter-channel time would be for this board? I've looked over the spec sheet but did not see anything useful. Did I overlook something?

Thanks again.

Rick
0 Kudos
Message 3 of 4
(2,934 Views)
The waveform carries a DT (delta Time) component.
Use the GET WAVEFORM COMPONENTS function to extract the DT. That should be the actual dT used, not necessarily the rate you asked for.

If you have a DT number, you create the array with a FOR loop:

For I = 0 to NSamples-1
Time[i] = i * DT

As far as the inter-channel time, the minimum value is a property of the card, but it's also controlled by software: LV can extend it.

I don't know about the express VIs: I never use them. But the original AI CLOCK CONFIG, has an input where you can specify it.

If that doesn't work, and you have access to some test equipment, you can find it out for yourself:
Set up a ramp generator for 0.0 - 1.0 V at 1000 Hz.
This means the voltage is
changing 1 volt per mSec.
This means the voltage is changing 1 mV per uSec.
Wire the ramp generator to channels 0, and 10.
Perform a DAQ operation, with all channels 0-10 active.
Pick out a portion of the waveform, where the voltage is increasing on all channels (exclude the drop at cycle's end). Ignore channels 1-9.
Subtract the channel 10 array from the channel 0 array.
Average the result array and divide the average by 10.

The average value, in mV, is the channel delay time, in uSec.

By comparing channels 0 and 10, you're measuring 10 intervals, not one, so you're more accurate.
Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 4
(2,934 Views)