Name
IOType (dec)
WriteBytes
ReadBytes
AIN
1
3
2
WaitShort
5
2
0
WaitLong
6
2
0
LED
9
2
0
BitStateRead
10
2
1
BitStateWrite
11
2
0
BitDirRead
12
2
1
BitDirWrite
13
2
0
PortStateRead
26
1
3
PortStateWrite
27
7
0
PortDirRead
28
1
3
PortDirWrite
29
7
0
DAC0 (8-bit)
34
2
0
DAC1 (8-bit)
35
2
0
DAC0 (16-bit)
38
3
0
DAC1 (16-bit)
39
3
0
Timer0
42
4
4
Timer0Config
43
4
0
Timer1
44
4
4
Timer1Config
45
4
0
Counter0
54
2
4
Counter1
55
2
4
Buzzer
63
6
0
5.2.5.1 - AIN: IOType = 1
AIN, 3 Command Bytes:
0
IOType = 1
1
Bits 4-0: Positive Channel
Bit 6: LongSettling
Bit 7: QuickSample
2
Negative Channel
2 Response Bytes:
0
AIN LSB
1
AIN MSB
This IOType returns a single analog input reading.
Note: Do
not
use this IO type while streaming.
Positive Channel
: 0-15 for AIN0-AIN15, 30 for temp sensor, or 31 for Vreg. Note that AIN0-AIN7 appear on FIO0-FIO7, and
AIN8-AIN15 appear on EIO0-EIO7.
LongSettling
: If this bit is set, additional settling time is added between the multiplexer configuration and the analog to
digital conversion.
QuickSample
: If this bit is set, a faster analog input conversion is done, at the expense of increased noise. If bits 6 & 7 are
both set, then the entire byte is a channel number (for digital I/O, timers, and counters).
Negative Channel
: 0-15 for AIN0-AIN15, 30 for Vref, or 31 for single-ended. Note that AIN0-AIN7 appear on FIO0-FIO7,
and AIN8-AIN15 appear on EIO0-EIO7.
AIN LSB & MSB
: Analog input reading is returned justified as a 16-bit value (always unsigned).
LabJackPython example session
Automatically extracted from u3.py. Debugging turned on to show the bytes sent and received.
5.2.5.2 - WaitShort: IOType=5
WaitShort, 2 Command Bytes:
0
IOType = 5
1
Time (*128 us)
0 Response Bytes:
This IOType provides a way to add a delay during execution of the Feedback function. The typical use would be putting this IOType
in between IOTypes that set a digital output line high and low, thus providing a simple way to create a pulse. Note that this IOType
uses the same internal timer as stream mode, so cannot be used while streaming.
Time
: This value (0-255) is multiplied by 128 microseconds to determine the delay (U3C = 128 us, U3B = 64 us, U3A = 128
us).
LabJackPython example session
Automatically extracted from u3.py. Debugging turned on to show the bytes sent and received.
5.2.5.3 - WaitLong: IOType=6
WaitLong, 2 Command Bytes:
0
IOType = 6
1
Time (*16 ms)
0 Response Bytes:
This IOType provides a way to add a delay during execution of the Feedback function. The typical use would be putting this IOType
in between IOTypes that set a digital output line high and low, thus providing a simple way to create a pulse. Note that this IOType
uses the same internal timer as stream mode, so cannot be used while streaming.
Time
: This value (0-255) is multiplied by 16384 microseconds (U3C = 16384 us, U3B = 16384 us, U3A = 32768 us) to
determine the delay.
LabJackPython example session
Automatically extracted from u3.py. Debugging turned on to show the bytes sent and received.
47