
reset. This is a user-configurable ID that can be used to identify a specific LabJack. The return value of this parameter is the
current value and the power-up default value.
TimerCounterConfig
: If the WriteMask bit 1 is set, the value passed becomes the default value, meaning it is written to
flash and used at reset. The return value of this parameter is a read of the power-up default. See Section 5.2.3.
FIO/EIO/CIO
: If the WriteMask bit 1 is set, the values passed become the default values, meaning they are written to flash
and used at reset. Regardless of the mask bit, this function has no effect on the current settings. The return value of these
parameters are a read of the power-up defaults.
DAC
: If the WriteMask bit 2 is set, the values passed become the default values, meaning they are written to flash and used
at reset. Regardless of the mask bit, this function has no effect on the current settings. The return values of these parameters
are a read of the power-up defaults.
TimerClockConfig & TimerClockDivisor
: If the WriteMask bit 4 is set, the values passed become the default values,
meaning they are written to flash and used at reset. The return values of these parameters are a read of the power-up
defaults. See Section 5.2.4.
CompatibilityOptions
: If the WriteMask bit 5 is set, the value passed becomes the default value, meaning it is written to
flash and used at reset. The return value of this parameter is a read of the power-up default. If bit 0 is set, Timer Counter Pin
Offset errors are ignored. If bit 1 is set, all DAC operations will use 8-bit mode rather than 10-bit mode. Once this value has
been changed the U3 will need to be restarted before the new setting will take affect.
FirmwareVersion
: Fixed parameter specifies the version number of the main firmware. A firmware upgrade will generally
cause this parameter to change. The lower byte is the integer portion of the version and the higher byte is the fractional
portion of the version.
BootloaderVersion
: Fixed parameter specifies the version number of the bootloader. The lower byte is the integer portion
of the version and the higher byte is the fractional portion of the version.
HardwareVersion
: Fixed parameter specifies the version number of the hardware. The lower byte is the integer portion of
the version and the higher byte is the fractional portion of the version.
SerialNumber
: Fixed parameter that is unique for every LabJack.
ProductID
: (3) Fixed parameter identifies this LabJack as a U3.
VersionInfo
: Bit 0 specifies U3B. Bit 1 specifies U3C and if set then bit 4 specifies -HV version.
5.2.3 - ConfigIO
Writes and reads the current IO configuration.
Command:
Byte
0
Checksum8
1
0xF8
2
0x03
3
0x0B
4
Checksum16 (LSB)
5
Checksum16 (MSB)
6
WriteMask
Bit 5: Write UART Related settings
Bit 4: Reserved, Pass 0
Bit 3: EIOAnalog
Bit 2: FIOAnalog
Bit 1: DAC1Enable
Bit 0 : TimerCounterConfig
7
Reserved
8
TimerCounterConfig
Bits 4-7: TimerCounterPinOffset
Bit 3: Enable Counter1
Bit 2: Enable Counter0
Bits 0-1: Number of timers enabled
9
DAC1Enable (ignored on hardware rev 1.30+)
Bit 2: Assign UART Pins (HW 1.30 only)
Bit 1: Reserved, Pass 0
Bit 0: Enable DAC1
10
FIOAnalog
11
EIOAnalog
Response:
Byte
0
Checksum8
1
0xF8
2
0x03
3
0x0B
4
Checksum16 (LSB)
5
Checksum16 (MSB)
6
Errorcode
7
Reserved
8
TimerCounterConfig
9
DAC1Enable
10
FIOAnalog
11
EIOAnalog
WriteMask
: Has bits that determine which, if any, of the parameters will be written.
TimerCounterConfig
: Used to enable/disable timers and counters. Timers/counters will be assigned to IO pins starting with
FIO0 plus TimerCounterPinOffset (4-8 only starting with hardware revision 1.30). Timer0 takes the first IO pin, then Timer1,
Counter0, and Counter1. Whenever this function is called and timers are enabled, the timers are initialized to mode 10, so
the desired timer mode must always be specified after every call to this function. Note that Counter0 is not available when
using a timer clock base that supports a timer clock divisor (TimerClockBase = 3-6).
Assign UART Pins
: On hardware 1.30 setting this bit will assign IO lines to the UART module. This setting will be ignored
unless the UART write bit is set in the WriteMask byte.
DAC1Enable
: On hardware revisions 1.20/1.21 only, bit 0 enables DAC1. When DAC1 is disabled, it outputs a constant
voltage of 1.5 times the internal Vref (~2.44 volts). When DAC1 is enabled, the internal Vref is not available for the analog
inputs and Vreg (~3.3 volts) is used as the AIN reference. Starting with hardware revision 1.30, DAC1 is always enabled.
FIOAnalog
: Each bit determines whether that bit of FIO is analog input (=1) or digital I/O (=0).
EIOAnalog
: Each bit determines whether that bit of EIO is analog input (=1) or digital I/O (=0).
LabJackPython Example
>>> import u3
>>> d = u3.U3()
>>> d.debug = True
'''Assign timer0 to FIO6, set FIO4, FIO5 as analog input, and set EIO1, EIO2 as analog input'''
>>> d.configIO(TimerCounterPinOffset = 6, NumberOfTimersEnabled = 1, FIOAnalog = 0x30, EIOAnalog = 0x03)
Sent: [0xa8, 0xf8, 0x3, 0xb, 0xa1, 0x0, 0xd, 0x0, 0x61, 0x0, 0x30, 0x3]
Result: [0x9b, 0xf8, 0x3, 0xb, 0x94, 0x0, 0x0, 0x0, 0x61, 0x0, 0x30, 0x3]
{'NumberOfTimersEnabled': 1, 'TimerCounterPinOffset': 6, 'DAC1Enable': 0, 'FIOAnalog': 48, 'EIOAnalog': 3, 'TimerCounterConfig': 97, 'EnableCounter1': False, 'EnableCounter0': False}
5.2.4 - ConfigTimerClock
Writes and read the timer clock configuration.
45