LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Labjack U3-HV

Hi

We have an issue that we can't get the handle for the individual U3's.

We have downloaded the windows install from Labjack and installed, the LJ Control Panel works , this sees both units and allows read and write. It reports UD Driver as 3.52 which is the latest.

 

We then downloaded the Labview example programs

LJUD_GetDriverVersion.Vi reports version 3.52

LJUD_ListAll.Vi reports the 2 Labjack units and serial numbers ok

LJUD_OpenLabJack.VI This is were it all falls apart! if i enable first found a handle is returned but this is not recommended with multiple units.  if i disable first found and add the ID or serial number into the address box we just get an error LabJack not found.

 

The versions from LabJack are 2021, could this be a compatibility issue with LabView 2023 Q1? or even Windows 11?

 

Thanks

Col

 

 

 

0 Kudos
Message 1 of 4
(361 Views)

We would suspect that the issue is some misconfiguration with one of the input parameters to LJUD_OpenLabJack.vi. I added some elaboration as to why I do not suspect that it is a Windows or LabVIEW issue below. If you do not see any obvious issues with your VI setup, I would recommend starting fresh. Close out of LabVIEW, grab our latest LabVIEW example package and replace your old package with it, power cycle your computer, then load up LabVIEW and try modifying one of our simple U3 examples such as U3 Read Serial Number.vi. Specify a known U3 serial number as the Address parameter and set FirstFound to false for the LJUD_OpenLabJack.vi call:

https://labjack.com/pages/support?doc=/software-driver/example-codewrappers/labview-for-ud-windows/#...

 

Our LabVIEW interface and LJControlPanel both make calls to the UD library DLL. The most likely Windows issues would be some incompatibility with the UD library DLL or our USB driver. We have tested on Windows 11 so neither of these should be the case. LJControlPanel and some of our other VIs working as expected on your computer also indicates that the issue should not be related to Windows.

 

Unfortunately, we do not currently have access to LabVIEW 2023, the latest version we have tested in is LabVIEW 2020, but we would not expect that the issue is due to the LabVIEW version. All UD library VIs such as LJUD_OpenLabJack.vi make calls to the UD library DLL using call library function nodes. There is not much fluff in the DLL function VIs other than that, just some simple error handling. An issue with our VIs and the LabVIEW version would likely indicate some compatibility issue with the call library function nodes. It does not appear that there have been any major changes to the call library function nodes, and ListAll working means our VIs and their use of call library function nodes are still working to some extent. One area of concern could be the Address parameter for LJUD_OpenLabJack.vi. The Address is a string and the call library function node needs to interpret the LabVIEW string as a C string pointer for it to work correctly. It appears that this should still be supported and working in LabVIEW 2023, assuming the NI documentation is up to date for LabVIEW 2023:

https://www.ni.com/docs/en-US/bundle/labview/page/using-arrays-and-strings-in-the-call-library-funct...

 

0 Kudos
Message 2 of 4
(310 Views)

I would like to add some extra info that I discovered when facing this exact same problem.

 

You would think that simply coping the SN from the text indicator into the Address bar would work, but it does not. That is what is messing everyone up. It sure caught me off guard.

 

Frozen_0-1712698015646.png

 

However, if you run the "\LabJack\LabJackUD DLL Functions\LJUD_Close.vi" function in between, then it works.

Frozen_1-1712698146177.png

 

So, to recap.

1) Run the "discovery" vi to find the LabJACK info

2) Run the close utility

3) Use the "real" address of the device

 

---------------------------------------------
Certified LabVIEW Developer (CLD)
There are two ways to tell somebody thanks: Kudos and Marked Solutions
0 Kudos
Message 3 of 4
(109 Views)

I'm not sure who from LabJack posted the reply in November, but I believe it is not applicable and instead you are running into a simple problem.

 

Once a device is opened, subsequent OpenLabJack() calls must use the same type of open: FirstFound, Local ID or Serial Number. For example, if you open a device using FirstFound=True, and then call OpenLabJack() again with FirstFound=False, you will get an error. Or if you open a device using FirstFound=False and Address=SerialNumber, and then call OpenLabJack() again with FirstFound=False and Address=LocalID, you will get an error.

 

This is definitely what is shown in Frozen's post from last week, and I suspect this is the same thing happening to ColK in their original post.

 

https://support.labjack.com/docs/openlabjack-ud-library

 

So with multiple LabJacks it is fine to call ListAll and then open any of the returned devices using serial number or local ID (if you have assigned each a unique local ID), but don't do a FirstFound open before doing the specific open.

 

0 Kudos
Message 4 of 4
(54 Views)