Labjack Driver Support | LabJack
 

Labjack Driver Support

4 posts / 0 new
Last post
B_McCall
B_McCall's picture
Labjack Driver Support
Hello, I am having some difficulty integrating the U3-LV with my application software for a production test environment. What I have come to realize is that I need to install the same driver on the target PC that I have in my development environment. This means that I have to package the installer with my application and I want to know if there is a way around this. I tried to do the following: 1) Install version 3.45 drivers on my PC. 2) Copy the LJUDDotNet.dll from "C:\Program Files (x86)\LabJack\Drivers" to a local folder called "DLL" in my project directory. 3) Add a reference in C# to the LJUDDotNet.dll located within the "DLL" folder on my machine. 4) Compile and verify that I can control the U3-LV via C#. Deploying on target machine. 1) Install version 3.45 Labjack driver on PC. 2) Download and run my application software. 3) Verify that I can use the U3-LV in my application. 4) Upgrade to latest drivers available from Labjack website. 5) Restart my application and an exception is thrown when trying to communicate with the labjack. The application states something about not being able to find firmware version 3.45 components or one of it's dependencies. I can pull the exact details of the exception shortly. However my thought was that if I pulled the DLL of the drivers that I integrated to and referenced, then the user would be able to install any version of your drivers as you update, but always use my referenced and packaged DLL. Can you please offer some assistance with this?
LabJack Support
LabJack Support's picture
The current UD .NET assembly

The current UD .NET assembly version is 3.46. With that "find firmware version 3.45 components" ("firmware version" is probably ".NET assembly version") error, I'm guessing you built your application with the 3.45 UD .NET assembly with the "Specific Version" property set to True which will make your application require version 3.45.

In your application's project, go to the Solutions window. In References click on LJUDDotNET and in the properties set "Specific Version" to False. rebuild your application and try it on your target machine and see if that helps with the error.

LabJack Support
LabJack Support's picture
As for using a specific

As for using a specific packaged driver version, that may work if you package the dlls and reference them in the same directory as your application, otherwise your application will probably look for the system installed drivers. You can check what version of the UD driver the .Net assembly is using with the LJUD.GetDriverVersion() call.

B_McCall
B_McCall's picture
Thank you for your help.
Thank you for your help. I was able to to verify you suggestion worked for me by changing between driver version 3.45 and 3.46. I set my reference to the DLL from version 3.45 stored locally in my DLL folder. At the beginning of my program I did the following: U3 myU3; double driverVersion = 0; try { myU3 = new U3(LJUD.CONNECTION.USB, "320058196", false); // Connection through USB myU3.u3Config(); LJUD.ePut(myU3.ljhandle, U3.IO.PIN_CONFIGURATION_RESET, 0, 0, 0); //set to factory default driverVersion = LJUD.GetDriverVersion(); } catch (Exception ex) { MyMessageBox.Show(ex.ToString()); } I was able to successfully get through the initialize statement above with either version 3.45 or version 3.46 installed on my system.