Skip to main content
Skip table of contents

Troubleshooting a Digital I/O (App Note)

We recommend trying to identify possible sources of your issue then isolate, test, and eliminate each possibility. Try tests to isolate LabJack hardware failure, software configuration issues, issues with your external device, etc. To get started:

  1. Remove all external connections to the LabJack and verify basic digital I/O operation using LabJack software.

  2. Analyze possible wiring and hardware compatibility issues with your real setup.

  3. Test the desired LabJack functionality with a dedicated test signal or monitor using LabJack software.

LabJack Testing and Configuration Software

To help eliminate software issues, we recommend troubleshooting using LabJack software:

Basic Digital I/O Operation

A good first step is to verify that the digital I/O are operating correctly. See our Test a Digital I/O App Note.

Wiring and Hardware Compatibility

LabJack hardware can be interfaced with most common digital I/O signals, however some hardware interfaces require more thought and/or conditioning to get working as desired. Note that LabJack digital inputs are typically only TTL (5V) compatible on the inputs, and output 0 V (low) or 3.3 V (high) on the outputs. Also pay mind to the logic transition points and output impedance specifications for your device digital I/O. Detailed digital I/O specifications can be found in the respective device datasheets:

Proper Electrical Connections

Always ensure that you have a good electrical connection from your signal to the LabJack.Touching a conductor to the top of the screw head of an un-clamped screw terminal is rarely a valid electrical connection. The screw head is usually a valid connection point when the terminal is clamped, but the only guaranteed valid connection is to securely clamp a conductor/ signal wire inside the LabJack screw terminal.

Also note that you must have a return path for signal current to or from the LabJack in order to complete the control circuit. This usually means having the device common referred to LabJack GND. Care should be taken when connecting external grounds to LabJack GND. See our Externally Powered Signals App Note for related information.

Test with a Single Signal

We would recommend testing with a single sensor connected to the LabJack to start, with no other external connections to the LabJack. This can help rule out issues due to the influence of external devices or wiring.

DMM or Oscilloscope Test

Use a DMM or oscilloscope to confirm that you have valid voltages on the DIO line in question. Ensure that you have good electrical connections to the DMM or oscilloscope as suggested in the subsection above.

NPN and PNP Signals

If you have an NPN or PNP signal, see the configuration information in our Open Collector App Note.

Mechanical Switch Signal

If you have some sort of mechanical switch signal, see the configuration information in our Dry Contact Signal App Note.

Relay Control

If you are trying to control a relay with a LabJack, see the information in our Relay Control App Note.

Quadrature Counting

One major quadrature counting limitation is that LabJack devices handle quadrature signals in firmware using interrupts rather than with dedicated quadrature counting hardware. As such, some encoders with higher edge-rates cannot be properly monitored with LabJack Hardware alone. Find additional information in the datasheet for your device:

Serial Protocols

  • Ensure that you have pullup or pulldown resistors wherever necessary.

  • Make sure that your sensor can interface with the LabJack input and output logic levels.

  • Commonly, the sensor logic levels are determined by the sensor power supply voltage; powering the sensor with 3.3 V (when compatible per the sensor specification) can help in some situations. One way to provide 3.3 V power is a DAC output set to 3.3 V.

  • If you have a large capacitance on your bus, it may cause communication issues at higher clock rates. Try testing with lower clock rates and use short wire runs to test when possible.

Test Signal or Monitor

After verifying basic digital I/O operation, we suggest setting up a more specific test on the device functionality. This should help check whether there is an issue with your digital I/O feature configuration in software.

Frequency Input and Counter Measurement Testing

Wire Test

A basic test for frequency input measurement or counter features would be to connect the respective frequency measurement digital I/O to a wire. Tapping the free end of the wire to the inside back of any LabJack GND terminal should briefly hold the line low. Since most newer LabJack devices have weak pullup resistors to 3.3 V on the digital inputs, tapping the wire to GND will cause edge transitions on the input. This should result in some arbitrary count or frequency return value if the feature is properly configured and read.

PWM Test

LabJack devices can generate pulse outputs using our PWM output features. These may help when testing frequency or counter inputs or vise-versa.

  • If you have a U3/U6/UE9 see the Advanced Testing section of our LJControlPanel timer/counter configuration guide. Also see our Timer and Counter Configuration Guides for feature setup guidance.

  • If you have a T-series device, writing the value 1 to the register DAC1_FREQUENCY_OUT_ENABLE will put a 10Hz signal on DAC1 that could be used to test a frequency or counter feature setup. Also see our Kipling Register Matrix Tutorials for setup guidance.

One less obvious frequency input configuration issue to watch out for is attempting to monitor a signal that is outside of the configured measurement range. For example, the maximum measurable period for the T-series Frequency Input feature is set according to configurations in software.

Pulse Output Testing

If available, we recommend connecting the pulse output from a LabJack to an oscilloscope to verify proper operation. This should be the fastest way to test. If that is not possible, consider setting up a frequency input or duty cycle input feature to help validate the PWM output operation. See the PWM Test subsection above.

Quadrature Counter Testing

Quadrature is a bit tricky to generate test signals for. It would likely require a custom script to manually toggle digital outputs to simulate quadrature outputs. We would recommend skipping this test signal step and focus on verifying your hardware setup compatibility.

Serial Protocol Testing

The best way to test serial protocol data would be to connect the LabJack hardware to a logic analyzer and ensure that any required write data is being processed correctly. If that is not an option, consider the tests below. Note that serial protocol communications must be handled in custom software, they are unsupported in testing software such as Kipling and LJControlPanel. Also note that we consider serial protocol communications advanced topics.

SPI and Asynchronous Serial (UART)

A good test for SPI and asynchronous serial communications is to connect the TX/MOSI line to the RX/MISO line in a loopback test. If you have all of the functionality set up correctly, you should see the RX read data mirror the TX data. If you do not see this, there is likely some issue with the configuration or order that you are doing your transaction steps.


See the troubleshooting steps relevant for your device:

JavaScript errors detected

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

If this problem persists, please contact our support.