Jump to content

As of July 17, 2015, the LabJack forums here at forums.labjack.com are shut down. New registrations, topics, and replies are disabled. All forums are in a read-only state for archive purposes.

Please visit our current forums at labjack.com/forums to view and make new posts. To post on the current forums, use your labjack.com login account. Your old LabJack forums login credentials have been retired. There are no longer separate logins for labjack.com and LabJack forums.


Photo

Sub 200 microsecond timing relative to computer clock?

timing u3 stream mode

  • Please log in to reply
3 replies to this topic

#1 gmotron

gmotron
  • Members
  • 2 posts

Posted 09 June 2014 - 10:12 AM

I have an application where I have a square have that I would like to readout with the U3.  I can in single channel stream mode, so I should be able to sample at 50khz, which is more than enough to get the desired sub 200 us timing.  What I'm worried about is aligning the samples from the U3 with the computer clock at that level.  If I do something like setup stream mode, then call time.time() then call whatever grabs data from stream mode, will the result of time.time() tell me when the last sample was taken by the U3 according to the computer clock with accuracy greater than 200 us? I'm worried this won't work because I remember reading that usb calls to the labjack can take many milliseconds to finish.

 

 



#2 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 09 June 2014 - 08:18 PM

Not only does it take ~1m for USB packets, but you only have to consider the various buffering that goes on in stream mode.  Also consider that the clock on the U3 is only 1.5% accurate.  I don't see a way to synch stream data with the computer clock to better than 200 us as you describe.  The only solutions I can imagine would require that you have some sort of synch signal that collect with the other stream channels.



#3 gmotron

gmotron
  • Members
  • 2 posts

Posted 12 June 2014 - 08:27 AM

Thanks, I thought it was worth checking with someone more familiar with the capabilities.



#4 LabJack Support

LabJack Support
  • Admin
  • 8677 posts

Posted 12 June 2014 - 08:32 AM

Some people use GPS based devices that produce a 1 pulse-per-second output signal.  By bringing this signal in with other stream signals you can come up with absolute timestamps for the stream data.





Also tagged with one or more of these keywords: timing, u3, stream mode

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users