« Close

Datasheets and User Guides

App Notes

Software & Driver


2.3 - IO0-IO3

Connections to 4 of the LabJack’s 20 digital I/O are made at the screw terminals, and are referred to as IO0-IO3. Each pin can individually be set to input, output high, or output low. These 4 channels include a 1.5 kΩ series resistor that provides overvoltage/short-circuit protection. Each channel also has a 1 MΩ resistor connected to ground.

All digital I/O are set to input on power-up or reset.

One common use of a digital input is for measuring the state of a switch as shown in Figure 2.3-1. If the switch is open, IO0 reads FALSE. If the switch is closed, IO0 reads TRUE.

Figure 2.3-1. IO used to detect the state of a switch.

While providing overvoltage/short-circuit protection, the 1.5 kΩ series resistor on each IO pin also limits the output current capability. For instance, with an output current of 1 mA, the series resistor will drop 1.5 volts, resulting in an output voltage of about 3.5 volts.


The easy functions EDigitalIn or EDigitalOut are used to read or set the state of one digital line, and both take up to 20 ms to execute.

The functions AOUpdate and DigitalIO are used to set the direction, set the state, and/or read the state, of each IO pin. Both of these functions take up to 20 ms to execute, providing a maximum update rate of about 50 Hz per pin.

The function AISample can set/read the state of each IO, but setting the state will have no effect unless the IO have been configured as outputs using another function. The function Counter reads the state of each IO.

The functions AIBurst and AIStreamRead, take a reading of the IO states and return it with the analog data. The states of the 4 IO are read simultaneously every 4 samples, providing a data rate of up to 2048 Hz per pin for burst mode, or 300 Hz per pin for stream mode. For 1 or 2 channel scans, duplicate data (4x or 2x) will be added to the read array such that the size is numScans.



Can de Labjack U12 detect digital input (IO0-IO3) voltage of 12V TRUE and 0V FALSE? Or only works with 5V?

Best regards,



You can see in Appendix A that the IO digital inputs are specified to handle up to 15 volts, so yes you can do as you describe.  With 12 volts connected to an IO input you will be dumping about 7/1500 = 5mA into the input.  That is not too bad, but to reduce this you could add a resistor in series.  If you add a 5.6k resistor in series, the current into the input will be more like 1mA.

On the datasheet for EI-1040 it sais: "The gain of the EI-1040 can be programmed by the LabJack by connecting the gain select inputs GSA1, GSA2, GSB1, and GSB2 to the LabJack digital outputs. " (http://labjack.com/support/ei-1040/datasheet)

Are the IO0-3 screw terminals suitable for this purpose?

Yes, the IO lines should work.

Thank you. And further - I cannot find the programme where I set the IO0 to input. Will I have to programme it specifically or does it just happen automatically when connected?


My device is connected to A+ in and A- in on the EI-1040, and the AOut to AI0 on the labjack. 

The EI-1040 is powered by the +5V from the labjack and GND in (EI-1040) is connected to GND on the labjack.

Additionally I have a 1 MOhm resistance from A- in to signal GND on the EI-1040 for higher input impedance. By this the signal is stabilized such that readings are reliable.


For the amplification purpose: Is it enough to have the GSA1 connected to IO0 or do I need to change other connections as well?

The IO lines are not controlled automatically by any software that I know of.  You need to set the lines to output, then control their state High/Low to get the desired gain.

You connections sound fine.  You already have a connection from U12-GND to EI1040-GND, so all you need is the connection from GSA1 to IO0, and also GSA2 to IO1 if desired.