Strange readCurrent behavior | LabJack

Strange readCurrent behavior

3 posts / 0 new
Last post
lcmcninch's picture
Strange readCurrent behavior

I'm working with a U6 using the python library (v2.0.4 from PyPI).

>>> d.configU6()

{'FirmwareVersion': '1.43',
 'BootloaderVersion': '6.15',
 'HardwareVersion': '2.00',
 'ProductID': 6,
 'LocalID': 1,
 'VersionInfo': 4,
 'DeviceName': 'U6'}


I'm trying to read the current configuration using readDefaults(1, ReadCurrent=True). If I run that immediately after creating the U6 instance, I get something that looks like nonsense. If I then run readDefaults(1), I get the expected default settings. Now if I run readDefaults(1, ReadCurrent=True), I get the same response (makes sense since I haven't changed any settings yet). But if I change a setting, like Timer0 mode, and re-run readDefaults(1, ReadCurrent=True), I get the defaults back. Furthermore, if I then run readDefaults(0, ReadCurrent=True), I get the defaults/current for block 1 again, not block 0. If I then run readDefaults(0) I'll get the defaults for block zero and readDefaults(<anything>, ReadCurrent=True) will again return the defaults for block 0.


I hope I explained that well, the bottom line is, getting the default config seems to work fine, but setting ReadCurrent=True seems to always return the response to the last command. I even tried readCal(0) then readDefaults(0, True) and got the cal values back agian.


Am I missing something or is this a bug, either in the firmware or the python library? I've confirmed this is the case both using the UD driver in windows and exodriver in Linux.


On a related note, there's definitely a bug in Device.readCurrent in that it doesn't return a result. Looks like that was an oversite in the readCurrent method.


Any help you can provide would be appreciated!

LabJack Support
LabJack Support's picture
There seems to have been a

There seems to have been a bug in firmware. Please try upgrading to beta firmware v1.49 on the following page:

lcmcninch's picture
Looks like that fixed it. I

Looks like that fixed it. I'll submit an issue/PR to github for the readCurrent problem in the library.