>>> d = u12.U12()
open called
Writing: [0x0, 0x0, 0x0, 0x0, 0x0, 0x57, 0x0, 0x0]
Received: [0x57, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0]
>>> d.rawAISample()
Writing: [0x8, 0x9, 0xa, 0xb, 0x1, 0xc0, 0x0, 0x0]
Received: [0x80, 0x0, 0x99, 0xb, 0x28, 0x99, 0x2c, 0x5]
{
'IO3toIO0States':
<BitField object: [ IO3 = Low (0), IO2 = Low (0),
IO1 = Low (0), IO0 = Low (0) ] >,
'Channel1': 1.4453125,
'Channel3': 1.2744140625,
'Channel2': 1.46484375,
'PGAOvervoltage': False,
'Channel0': 1.3037109375,
'EchoValue': 0
}
5.2 - DIO
This commands reads the direction and state of all the digital I/O. If Update Digital = 1, this function also sets the directions and
states before reading.
Bits for D15 through D8 Direction ( 0 = Output, 1 = Input)
Bits for D7 through D0 Direction ( 0 = Output, 1 = Input)
Bits for D15 through D8 State ( 0 = Low, 1 = High)
Bits for D7 through D0 State ( 0 = Low, 1 = High)
Bits 7-4: Bits for IO3 through IO0 Direction
Bits 3-0: Bits for IO3 through IO0 State
Bits for D15 through D8 State ( 0 = Low, 1 = High)
Bits for D7 through D0 State ( 0 = Low, 1 = High)
Bits 7-4: Bits for IO3 through IO0 State
Bits for D15 through D8 Direction ( 0 = Output, 1 = Input)
Bits for D7 through D0 Direction ( 0 = Output, 1 = Input)
Bits for D15 through D8 Output Latch States
Bits for D7 through D0 Output Latch States
LabJackPython Example
>>> import u12
>>> d = u12.U12()
open called
Writing: [0x0, 0x0, 0x0, 0x0, 0x0, 0x57, 0x0, 0x0]
Received: [0x57, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0]
>>> d.rawDIO()
Writing: [0x0, 0x0, 0x0, 0x0, 0x0, 0x57, 0x0, 0x0]
Received: [0x57, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0]
{
'D7toD0States':
<BitField object: [ D7 = Low (0), D6 = Low (0),
D5 = Low (0), D4 = Low (0),
D3 = Low (0), D2 = Low (0),
D1 = Low (0), D0 = Low (0) ] >,
'IO3toIO0States':
<BitField object: [ IO3 = Low (0), IO2 = Low (0),
IO1 = Low (0), IO0 = Low (0) ] >,
46