Mux Settings – 0b0000 = 0-1 (Differential), 0b0001 = 2-3 (Differential), 0b0010 = 4-5 (Differential), 0b0011 = 6-7
(Differential). Single-Ended readings = 0b1000 + AI Number.
5.7 - Pulseout
This command creates pulses on any to all of D0-D7. The desired D lines must be set to output with some other function. For best
accuracy, when using the BC*20us approximation, keep C as small as possible. B and C must be >= 1, and must do at least 1
pulse ( LSB >= 1 ).
Bits for D7 through D0 ( 1 = Pulse the D line )
Bits 6-0: MSB Number of Pulses
Echo of byte 0 of Command
Echo of byte 1 of Command
Echo of byte 2 of Command
Echo of byte 3 of Command
Bits of direction errors for D7 through D0
011XX100 (Echo of byte 5)
Echo of byte 6 of Command
Echo of byte 7 of Command
B1/C1 – Period of first half cycle is ~100+5C+121BC or about BC*20µs
B2/C2 – Period of second half cycle is ~70+5C+121BC or about BC*20µs
LabJackPython Example
Connect a jumper wire from D0 to CNT.
>>> 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(D7toD0Directions = 0, UpdateDigital = True)
>>> d.rawCounter(ResetCounter = True)
>>> d.rawPulseout(ClearFirst = True)
>>> print d.rawCounter()
{
'IO3toIO0States': ... ,
'Counter': 5,
'D7toD0States': ... ,
'D15toD8States': ...
}
5.8 - Reset
Sits in an infinite loop until micro watchdog timeout after about 2 seconds.
52