11-27-2023 04:24 AM
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
11-27-2023 04:19 PM - edited 11-27-2023 04:21 PM
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:
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:
04-09-2024 04:31 PM
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.
However, if you run the "\LabJack\LabJackUD DLL Functions\LJUD_Close.vi" function in between, then it works.
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
04-17-2024 09:42 PM
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.