Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI
1 ratings:
 2 out of 5     Rate this Document

Can I Use a Clock Signal From My USB Device As The Source For My Timed Loop?

Hardware: PXI/CompactPCI>>Controllers

Problem:
I would like to use a clock signal from my USB device as the source for my timed loop.  I know that there are several timebases that are faster and/or more accurate than my computer's 1kHz clock.  When I specify the device as my source, I get an error saying this is not supported by my device.  It will work for my PXI or PCI form factor of the device.

Solution:
The problem originates from the high-latency nature of the USB architecture.  USB can see latencies wildly varying from 10 ms to over 100 ms, whereas the PCI and PXI bus latencies are less than 1 ms.  This latency is accounted for when doing data transfer, but cannot be accounted for when timing a software operation. 

As a result, you cannot use the on-board clock, counter/timers, or digital triggers on a USB device to control a timed loop.  Depending on your application, you may be able to use the timing VIs (for example our Time Elapsed VI) to help control the timing in software. If your application requires hardware-timed loops at rates above 1 kHz, this will not be possible with the USB form factor.

Related Links:
Developer Zone Tutorial: Determine Which Bus Works Best for Your Data Acquisition Application
Developer Zone Tutorial: Overview: USB For Measurement And Automation
Developer Zone Tutorial: USB Data Acquisition Frequently Asked Questions (FAQ)

Attachments:





Report Date: 03/31/2008
Last Updated: 02/05/2009
Document ID: 4JUG714C

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
  1 2 3 4 5
Please Contact NI for all product and support inquiries.submit