« Close

Datasheets and User Guides

App Notes

Software & Driver

 

5.2.5.9 - PortStateRead: IOType=26

Table 5.2.5.9-1.
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.

u3 - portstateread code example

LabJackPython example session

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