
5.2.5.17 - Counter#: IOType=54,55
Counter#, 2 Command Bytes:
0
IOType = 54, 55
1
Bit 0: Reset
4 Response Bytes:
0
Counter LSB
1
Counter
2
Counter
3
Counter MSB
This IOType reads a hardware counter, and optionally can do a reset.
Reset
: Setting this bit resets the counter to 0 after reading.
Counter
: Returns the current count from the counter if enabled. This is the value before reset (if reset was done).
LabJackPython example session
Automatically extracted from u3.py. Debugging turned on to show the bytes sent and received.
5.2.5.18 - Buzzer: IOType=63
Buzzer, 6 Command Bytes:
0
IOType = 63
1
Bit 0: Continuous
2
Period LSB
3
Period MSB
4
Toggles LSB
5
Toggles MSB
0 Response Bytes:
This IOType is used to make the buzzer buzz. The buzzer is only available on hardware revisions 1.20 and 1.21, not on 1.30.
Continuous
: If this bit is set, the buzzer will toggle continuously.
Period
: This value determines how many main firmware loops the processor will execute before toggling the buzzer voltage.
Toggles
: If Continuous is false, this value specifies how many times the buzzer will toggle.
5.2.6 - ReadMem (ReadCal)
Reads 1 block (32 bytes) from the non-volatile user or calibration memory. The available memory is different for different versions
of the U3.
Hardware version 1.30 & 1.21:
Command number 0x2A accesses the user memory area which consists of 512 bytes (block numbers 0-15). Command number
0x2D accesses the calibration memory area consisting of 512 bytes (block numbers 0-15). Do not call this function while
streaming.
Hardware version 1.1:
Command number 0x2A accesses the user memory area which consists of 256 bytes (block numbers 0-7). Command number
0x2D accesses the calibration memory area consisting of 256 bytes (block numbers 0-7). Do not call this function while streaming.
Command:
Byte
0
Checksum8
1
0xF8
2
0x01
3
0x2A (0x2D)
4
Checksum16 (LSB)
5
Checksum16 (MSB)
6
0x00
7
BlockNum
Response:
Byte
0
Checksum8
1
0xF8
2
0x11
3
0x2A (0x2D)
4
Checksum16 (LSB)
5
Checksum16 (MSB)
6
Errorcode
7
0x00
8-39
32 Bytes of Data
5.2.7 - WriteMem (WriteCal)
Writes 1 block (32 bytes) to the non-volatile user or calibration memory. Command number 0x28 accesses the user memory area
which consists of 256 bytes (block numbers 0-7). Command number 0x2B accesses the calibration memory area consisting of
512 bytes (block numbers 0-15), of which the last 8 blocks are not used. Memory must be erased before writing. Do not call this
function while streaming.
The U3 flash has a rated endurance of at least 20000 writes, which is plenty for reasonable operation, but if this function is called
in a high-speed loop the flash could eventually be damaged. In the case of these functions, that means 20000 writes per 32-byte
block.
51