-
Notifications
You must be signed in to change notification settings - Fork 0
License
labjack/DotNet_LJUD_Examples
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
.NET Examples for LabJackUD 03/12/2025 This package contains C# and Visual Basic .NET examples for the LabJackUD .NET assembly, which is the .NET interface to the Windows LabJackUD driver. LabJackUD supports the LabJack UE9, U3 and U6 devices. The LabJackUD .NET assembly and LabJack UD driver are both installed with the Windows installer: https://labjack.com/support/software/installers/ud The LabJackUD .NET assembly is LJUDDotNet.dll, which is in your LabJack installation's LabJack\Drivers folder. To use the LJUDDotNet.dll assembly, in your C# or VB.NET project, add a reference to it. It will have component name "LabJackUD .NET". LJUDDotNet.dll uses the original LabJackUD.dll which must be available during runtime. Each of the supported LabJackUD functions has a static wrapper method inside the LJUD object, which is in the LabJack.LabJackUD namespace. In C#, the "using" directive for the namespace will look like: using LabJack.LabJackUD; The static wrapper methods in the LJUD object have the same functionality as the LabJackUD driver functions of the same name. They have the same parameters but can differ in data types (for example an enum instead of an int). On error, instead of returning a non-zero error value, a LabJackUDException is thrown. Here is an example of a function call to OpenLabJack using C#: int ljhandle = 0; LJUD.OpenLabJack(LJUD.DEVICE.U3, LJUD.CONNECTION.USB, "0", true, ref ljhandle); To see a list of classes, enums, fields, methods, etc. in LJUDDotNet.dll, in Visual Studios use the Object Browser with the referenced LJUDDotNet. Refer to the USAGE.txt file for more details about LJUDDotNet and its interface. Package Contents: Usage.txt - Documentation about the LJUDDotNet.dll assembly's interface. Examples\U3\C# - LabJack U3 examples for C#. Examples\U3\VB - LabJack U3 examples for VB.NET. Examples\U6\C# - LabJack U6 examples for C#. Examples\U6\VB - LabJack U6 examples for VB.NET. Examples\UE9_deprecated_see_readme\C# - LabJack UE9 Examples for C#. Examples\UE9_deprecated_see_readme\VB - LabJack UE9 examples for VB.NET. Device Documentation: U3 Datasheet - https://labjack.com/support/datasheets/u3 U6 Datasheet - https://labjack.com/support/datasheets/u6 UE9 Datasheet - https://labjack.com/support/datasheets/ue9 Section 4 of the datasheets have general LabJackUD driver documentation, including function references and helpful pseudocode. UE9 Examples Status: The UE9 has reached its end of life, and its examples are no longer maintained. UE9 examples are still provided in the "Examples\UE9_deprecated_see_readme" folder. Note that examples that use AddRequest/eGet/ePut to pass arrays to the x1 parameter are not 64-bit safe, and may crash 64-bit applications. Instead, replace those calls with the 64-bit safe AddRequestPtr and eGetPtr. .NET Version Related Build Errors: If you encounter an error similar to "The reference assemblies for .NETFramework,Version=v4.0 were not found.", go to the project properties and change the "Target Framework" to a .NET version supported in your development environment. If you have any suggestions, questions or comments please email us at support@labjack.com and let us know.
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published