LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

accurate time stamp PCI-MIO-16E-1

Hello,

 

I need measure analogue signal which is acquired after rising edge on TRIG1 is detected. It works well, but time stamp of the waveform's beginning is not very accurate. So I want to ask you about possibilities to increase time precision, because I need repeat this measurement with cca 600Hz frequency.

 

I have interest about resolution which can be obtained. I use LabView 7.1.

 

Thank you for soon answer.

Martin Stefik Smiley Wink

Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 1 of 20
(3,421 Views)

Hello Stefo,

The time stamp is taken from the System Clock when your computer reads the samples from the buffer of the card.  The formula it uses is Current time - (number of Samples Acquired)*(Scan Rate).  This is accurate enough for continuous acquisition because the acquisition is still taking place when the read is called.  However, if you do a finite acquisition and do not call a read function for an hour, your timestamp will be wrong by one hour.  This knowledge base further explains how the time stamp is acquired.

http://digital.ni.com/public.nsf/websearch/5D42CCB17A70A06686256DBA007C5EEA?OpenDocument

If you notice that the timestamp is off by a certain amount, you can add a small offset to correct the error.

0 Kudos
Message 2 of 20
(3,404 Views)

Thanks, but I know that acquisition is controlled by internal clock. However, I need take N samples for acquisition, and I need to know accurate start time for each acquisition because is controlled by external trigger. Should I use external clock? it can be solution, but, I don't know if it is necessary.


Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 3 of 20
(3,402 Views)

Hi Stefo,

      Forgive me for jumping-in,

Is this right: there may be ~600 triggers per second (each trigger will start an N-sample scan) and you're looking to time-stamp each trigger?

If so, you might begin a continuous DAQ and acquire the trigger as one of the analog IN's.  Then exmine the acquired data for trigger-conditions.  That way you'd know the position of the triggers (relative to each other) with very high precision.

Was your plan to have LabVIEW setup each triggered-acquisition, in a loop, at ~600Hz?

Cheers

Message Edited by Dynamik on 04-08-2006 12:11 AM

When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 4 of 20
(3,399 Views)

Yes, you understand correctly. Each trigger need own precise time information (hh/mm/ss/ms) or better.

 

But, I'm not sure that I can acquire both triggered input (let's say AI0) and continuous input (say AI2) on one PCI-MIO-16E-1 card. If it is possible, can you write example for me? This idea is good. I tried to do something similar. But, I'm new in with labview so it stayed without success Smiley Indifferent

 

Thanks

Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 5 of 20
(3,377 Views)

Hi Stefo,

The duration of your trigger signal will determine whether this approach is feasible, but it's really simple - no fancy configuration.

Just include A0, and A1 in a channel list, aquire for some period, then post-process the array of channel-data.  If A1 is the "trigger" channel, then examine A1, scan by scan until it changes - indicating a trigger.  If you acquire at, say 250KHz, then you ought to be able to see "triggers" - as long as they're at least 4uS in duration.  Once you have the scan-index of the "trigger" then use the next N samples from A0.

I don't know whether this can work for you, but if you want to try it, the attached VI may give you an idea of how to find the indicies of the "triggers" - post acquisition.

Q. Is it possible for two "triggers" to occur before N samples elapse at DAQ rate. Smiley Surprised

Cheers.

 

 

   

When they give imbeciles handicap-parking, I won't have so far to walk!
0 Kudos
Message 6 of 20
(3,375 Views)
Smiley Very Happy Ok, I see. My fault Smiley Wink
 
It can be solution, but maybe not the best Smiley Indifferent, because i think that is possible to save execution time, and thereby increase so valuable speed.
 
Thanks Smiley Wink

Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 7 of 20
(3,365 Views)

Hi, it's me again. I was trying to made solution as you recommend me, but I find out another problem. I need have sampling rate 50 000samples per second. And this is not possible 😞 for continuous sampling. I found that sampling rate should be up to 8000 samples per second fo MAC OS, so I suppose that for windows it will bee even less.

So if somebody has an advice, I will be rather than glad if you help me.

Thanks

Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 8 of 20
(3,363 Views)
Your PCI-MIO-16E-1 has the capability of performaing up to 1.25M Samples / second.  You should have no problems reading in both channels (the trigger and the data) at 50 000 Samples / second.  Are you getting some type of error that prevents you from sampling faster?  You may just need to acquire more samples per channel.  I found that no errors happen when acquiring 5 000 samples per channel at a rate of 50 000 Samples / second.
 
Steven T
0 Kudos
Message 9 of 20
(3,342 Views)
You right. If I need to acquire N samples (AI read - for example 5000samples at 1.25MS/s). But in this way you use buffered input. However, if you need to acquire data in continuous mode, there are different limitation, lie system.

Certified-LabVIEW-Developer_rgb.jpg

0 Kudos
Message 10 of 20
(3,337 Views)