BitDirWrite, 2 Command Bytes:
0
IOType = 13
1
Bits 0-4: IO Number
Bit 7: Direction
0 Response Bytes:
This IOType writes the direction of a single bit of digital I/O.
IO Number
: 0-7=FIO, 8-15=EIO, or 16-19=CIO.
Direction
: 1=Output, 0=Input.
LabJackPython example session
Automatically extracted from u3.py. Debugging turned on to show the bytes sent and received.
5.2.5.9 - PortStateRead: IOType=26
PortStateRead, 1 Command Byte:
0
IOType = 26
3 Response Bytes:
0-2
State
This IOType reads the state of all digital I/O, where 0-7=FIO, 8-15=EIO, and 16-19=CIO. Only lines configured as digital (not
analog) return valid readings.
State
: Each bit of this value corresponds to the specified bit of I/O such that 1=High and 0=Low. If all are low, State=d0. If all
20 standard digital I/O are high, State=d1048575. If FIO0-FIO2 are high, EIO0-EIO2 are high, CIO0 are high, and all other I/O
are low (b000000010000011100000111), State=d67335.
LabJackPython example session
Automatically extracted from u3.py. Debugging turned on to show the bytes sent and received.
5.2.5.10 - PortStateWrite: IOType=27
PortStateWrite, 7 Command Bytes:
0
IOType = 27
1-3
WriteMask
4-6
State
0 Response Bytes:
This IOType writes the state of all digital I/O, where 0-7=FIO, 8-15=EIO, and 16-19=CIO. The direction of the selected lines is
forced to output.
The firmware does the actual updates in the following order: FIO4-5, FIO6-7, FIO0-3, EIO0-5, EIO6-7, CIO0, CIO1, CIO2, CIO3.
These all happen within 1 microsecond or so, but EIO0-EIO5, for example, are all updated at the exact same time.
WriteMask
: Each bit specifies whether to update the corresponding bit of I/O.
State
: Each bit of this value corresponds to the specified bit of I/O such that 1=High and 0=Low. To set all low, State=d0. To
set all 20 standard digital I/O high, State=d1048575. To set FIO0-FIO2 high, EIO0-EIO2 high, CIO0 high, and all other I/O low
(b000000010000011100000111), State=d67335.
LabJackPython example session
Automatically extracted from u3.py. Debugging turned on to show the bytes sent and received.
5.2.5.11 - PortDirRead: IOType=28
PortDirRead, 1 Command Byte:
0
IOType = 28
3 Response Bytes:
0-2
Direction
This IOType reads the directions of all digital I/O, where 0-7=FIO, 8-15=EIO, and 16-19=CIO. These are the digital directions only,
and do not provide any information as to whether the lines are configured as digital or analog.
Direction
: Each bit of this value corresponds to the specified bit of I/O such that 1=Output and 0=Input. If all are input,
Direction=d0. If all 20 standard digital I/O are output, Direction=d1048575. If FIO0-FIO2 are output, EIO0-EIO2 are output,
CIO0 are output, and all other I/O are input (b000000010000011100000111), Direction=d67335.
LabJackPython example session
Automatically extracted from u3.py. Debugging turned on to show the bytes sent and received.
5.2.5.12 - PortDirWrite: IOType=29
PortDirWrite, 7 Command Bytes:
0
IOType = 29
1-3
WriteMask
4-6
Direction
0 Response Bytes:
This IOType writes the direction of all digital I/O, where 0-7=FIO, 8-15=EIO, and 16-19=CIO. Note that the desired lines must be
configured as digital (not analog).
WriteMask
: Each bit specifies whether to update the corresponding bit of I/O.
Direction
: Each bit of this value corresponds to the specified bit of I/O such that 1=Output and 0=Input. To configure all as
49