Skip to main content
Skip table of contents

5.3 - Counter [U12 Datasheet]

This command controls and reads the 32-bit counter.

Table 5.3-1.

Command

 

Byte #

Description

0

Bits 7-2: XXXXXX

 

Bit 1: Strobe Enabled

 

Bit 0: Reset Counter

1

XXXXXXXX

2

XXXXXXXX

3

XXXXXXXX

4

XXXXXXXX

5

01X1XX10 (Counter)

6

XXXXXXXX

7

XXXXXXXX

 

 

 

 

Response

 

Byte #

Description

0

01X1XX10 (Counter)

1

Bits for D15 though D8 State ( 0 = Low, 1 = High )

2

Bits for D7 though D0 State ( 0 = Low, 1 = High )

3

Bits 7-4 = IO3 through IO0 State

 

Bits 3-0 = XXXX

4

Most Significant Byte of Counter

5

Bits 23-16 of Counter

6

Bits 15-8 of Counter

7

Least Significant Byte of Counter

LabJackPython Example

>>> import u12
>>> d = u12.U12(debug=True)
open called
Writing: [0x0, 0x0, 0x0, 0x0, 0x0, 0x57, 0x0, 0x0]
Received: [0x57, 0x0, 0x0, 0x0, 0xff, 0xff, 0x0, 0x0]
>>> d.rawCounter()
Writing: [0x0, 0x0, 0x0, 0x0, 0x0, 0x52, 0x0, 0x0]
Received: [0x52, 0x0, 0x0, 0x0, 0xbb, 0x10, 0x0, 0xef]
{
'IO3toIO0States':
<BitField object: [ IO3 = Low (0), IO2 = Low (0),
IO1 = Low (0), IO0 = Low (0) ] >,
'Counter': 3138388207,
'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) ] >,
'D15toD8States':
<BitField object: [ D15 = Low (0), D14 = Low (0),
D13 = Low (0), D12 = Low (0),
D11 = Low (0), D10 = Low (0),
D9 = Low (0), D8 = Low (0) ] >}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.