Issue opening LabJack T7s with device name | LabJack
 

Issue opening LabJack T7s with device name

3 posts / 0 new
Last post
andy
atat292's picture
Issue opening LabJack T7s with device name

Hello,

I have an application where I need to use two labjacks via the USB interface.  I am trying to use the following cmd to open the first device:

handle1 = ljm.openS("T7", "USB", "T7_U1")

T7_U1 is the device name that I configed via Kipling but when I run this cmd I get the following error:  

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\andrewt\AppData\Roaming\Python\Python27\site-packages\labjack\ljm\ljm.py", line 342, in openS
    raise LJMError(error)
labjack.ljm.ljm.LJMError: LJM library error code 1227 LJME_DEVICE_NOT_FOUND

When I instead use the serial number the cmd works:

handle1 = ljm.openS("T7", "USB", "470022099")

Am I misunderstanding the ljm code?  In the comments for the openS method in the ljm library it states the following count as an identifier:

identifier: A string identifying the device to be connected or
       "LJM_idANY"/"ANY". This can be a serial number, IP address,
        or device name. Device names may not contain periods.

Please advise.

 

LabJack Support
labjack support's picture
You can specify the device

You can specify the device name as the identifier parameter for the device open call. Your issue suggests the device name is not set up correctly; I do not think Kipling can write the string name properly. I would recommend using our write_device_name_string.py example to set the device name to T7_U1 and try opening again:

https://github.com/labjack/labjack-ljm-python/blob/master/Examples/More/...

andy
atat292's picture
Thanks, that was able to fix

Thanks, that was able to fix it.  As you mentioned seems like Kipling is not setting up the device name correctly although the readout (in Kipling) was the same in both cases.