- PortDirWrite: IOType=29 [U3 Datasheet] | LabJack
« Close

Datasheets and User Guides

App Notes

Software & Driver - PortDirWrite: IOType=29 [U3 Datasheet]

Table PortDirWrite Command Response

PortStateWrite, 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 input, Direction=d0. For all 20 standard digital I/O as output, Direction=d1048575. To configure FIO0-FIO2 as output, EIO0-EIO2 as output, CIO0 as output, and all other I/O as input (b000000010000011100000111), Direction=d67335.

u3 - portdirwrite code example

LabJackPython example session

Automatically extracted from u3.py. Debugging turned on to show the bytes sent and received.