Skip to main content
Skip table of contents - Line-to-Line Measurement (Mode 14) [U6 Datasheet]

This timer mode requires firmware 1.16 or later.


The Line-to-Line timer mode uses two timers to measure the time between specified edges on two different lines. For instance, you can measure the time between a rising edge on Timer0 and a falling edge on Timer1. When the LabJack sees the specified edge on Timer0 it starts counting until it sees the specified edge on Timer1. High resolution up to 20.8ns can be achieved with this mode.

Line-to-Line mode is also available on timers 2 and 3.


To configure a LabJack for Line-to-Line mode set an even timer and the next (odd) timer to mode 14. The timer values determine the edge that the timer will respond to, 1 being rising, 0 being falling. So, if Timer0's value is 0 and Timer1's is 1 then the LabJack will measure the time between a falling edge on Timer0 to a rising edge on Timer1.


Once configured the timer will return zero until both specified edges have been detected. The time difference in TimerClock periods is then returned by both timers until they are reset.  Both timers will return the same reading, so it is only necessary to read one or the other. To convert to time, divide the value returned by the timer clock. This mode returns 16-bit values, so care should be taken to be sure that the specified condition does not exceed the maximum time.  The maximum time can be calculated by 65535/TimerClock, and resolution is 1/TimerClock, so some examples are:

TimerClock,  MaxTime,  Resolution
     48 MHz,       1.3ms,      20.8ns
       1 MHz,        65ms,          1µs
     3906 Hz,       16.7s,       256µs


Once a measurement has been acquired the even timer needs to be reset before the LabJack will measure again. Values specified when resetting have no effect. Once reset the even timer will return zero until a new measurement has been completed. Resetting the odd timer is optional, if not reset it will continue to return the last measurement until a new one has been completed.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.