EasyManua.ls Logo

LabJack U12 - Page 50

LabJack U12
61 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Command
Byte #
Description
0
Bit 7: X
Bits 6-4: PGA for 1st Channel
Bits 3-0: MUX command for 1st Channel.
1
Bit 7: X
Bits 6-4: PGA for 2nd Channel
Bits 3-0: MUX command for 2nd Channel.
2
Bit 7: X
Bits 6-4: PGA for 3rd Channel
Bits 3-0: MUX command for 3rd Channel.
3
Bit 7: X
Bits 6-4: PGA for 4th Channel
Bits 3-0: MUX command for 4th Channel.
4
Bits 7-5: Number of scans ( 000 = 1024, 110 = 16)
Bits 4-3: IO to trigger burst on
Bit 2: State to trigger on
Bit 1: Update IO
Bit 0: LED State
5
Bits 7-4: 1010 (Start Burst)
Bits 3-0: Bits for IO3 through IO0 States
6
Bit 7: Feature Reports
Bit 6: Trigger On
Bits 5-0: AIINTMSB (High 6 bits of sample interval)
7
AIINTLSB (733 = min => ~8192 Hz)
Response
Byte #
Description
0
Bit 7-6: 10 (binary)
Bit 5: Buffer Overflow if Backlog = 11111, Checksum Error if Backlog = 0
Bit 4: PGA Overvoltage
Bits 3-0: Bits for IO3 through IO0 State
1
Bits 7-5: Iteration Counter
Bits 4-0: Backlog/256
2
Bits 7-4: Most Significant Bits from 1st Channel
Bits 3-0: Most Significant Bits from 2nd Chanel
3
Least Significant Byte from 1st Channel
4
Least Significant Byte from 2nd Channel
5
Bits 7-4: Most Significant Bits from 3rd Channel
Bits 3-0: Most Significant Bits from 4th Chanel
6
Least Significant Byte from 3rd Channel
7
Least Significant Byte from 4th Channel
PGA Gain Setting(Differential Only) 0b000 = 1, 0b001 = 2, 0b010 = 4, 0b100 = 8, 0b101 = 10, 0b110 = 16, 0b111 = 20
Mux Settings – 0b0000 = 0-1 (Differential), 0b0001 = 2-3 (Differential), 0b0010 = 4-5 (Differential), 0b0011 = 6-7
(Differential). Single-Ended readings = 0b1000 + AI Number.
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.rawAIBurst()
Writing: [0x8, 0x9, 0xa, 0xb, 0xe1, 0xa0, 0xa, 0x98]
Received: [0x80, 0x0, 0x99, 0x8, 0x2a, 0x99, 0x2c, 0x6]
Received: [0x80, 0x20, 0x99, 0xc, 0x2a, 0x99, 0x2c, 0x4]
Received: [0x80, 0x40, 0x99, 0xc, 0x2c, 0x99, 0x2a, 0x6]
Received: [0x80, 0x60, 0x99, 0xc, 0x2a, 0x99, 0x2c, 0x4]
Received: [0x80, 0x80, 0x99, 0xc, 0x2c, 0x99, 0x2c, 0x6]
Received: [0x80, 0xa0, 0x99, 0x0, 0x2a, 0x99, 0x2c, 0x4]
Received: [0x80, 0xc0, 0x99, 0xc, 0x2a, 0x99, 0x2c, 0x6]
Received: [0x80, 0x0, 0x99, 0xc, 0x2a, 0x99, 0x2c, 0x6]
{
'Channel0': [1.2890625, 1.30859375, ..., 1.30859375],
'Channel3': [1.279296875, 1.26953125, ..., 1.279296875],
50

Other manuals for LabJack U12