LabWindows/CVI for UD - Windows | LabJack
 
« Close

Datasheets and User Guides

App Notes

Software & Driver

 

LabWindows/CVI for UD - Windows

Basic example for LabWindows/CVI and the Windows UD library. The Windows UD library is the high-level Windows library/driver for the LabJack U3, U6 and UE9. For other LabJack devices, go to the Software page.

The attached archive has 1 simple example, but what is most important about this example is it shows how to use any of the many examples from our VC6_LJUD archive in CVI.

 

UD Examples Overview (Referencable)

Getting Started

To get started using DAQFactory with the LabJack UD library (U3, U6, UE9), go through the Quick Tutorial and refer to the DAQFactory LabJack Application Guide:

https://labjack.com/support/software/3rd-party-applications/daqfactory

Getting Help

LabJack support can sometimes help with DAQFactory questions, but often the AzeoTech forum is the best resource:

https://support.azeotech.com/

UD Library Overview

First read the general overview of the UD library:

https://labjack.com/support/software/api/ud/overview

The UD driver has a handful of functions, many with the same 4 to 6 parameters.

Functions

The main functions are used to build a list of requests (Add), execute the list (Go), and read the result of each request (Get).  Some functions (e.g. eGet) combine a single add/go/get into one function call.

Parameters

The parameters are described at the bottom of the Overview page.  The meaning of each parameter should be apparent (e.g. Channel is the channel number you are operating on), but when it is not the pseudocode section of the device's datasheet has the extra information needed.

  • Handle:  Always the handle.
  • IOType:  Always the IOType.
  • Channel:  If something besides a channel number the pseudocode section will tell you.
  • Value:  Always the value.
  • X1:  Usually not used, but if used the pseudocode section will tell you.
  • UserData:  Usually not used, but if used the pseudocode section will tell you.

Pseudocode

Device specific pseudocode can be found in datasheet section 4.3:

U3: https://labjack.com/support/datasheets/u3/high-level-driver/example-pseudocode
U6: https://labjack.com/support/datasheets/u6/high-level-driver/example-pseudocode
UE9: https://labjack.com/support/datasheets/ue9/high-level-driver/example-pseudocode

File Attachment: 

1 comments

Hi Tech Support

I try to call "c:\windows\system32\labjackud.dll" explicitly with LoadLibrary() from an evaluation version of CVI 2012 and I encountered an error:

"

 

int _InitializeLabjackDll (const char *dllPath)

{

int status=0;

gLabjackU6 = NULL;

if (!status) gLabjackU6 = LoadLibrary(dllPath); 

if (gLabjackU6==NULL) status = GetLastError(); //Ok here

else

{

if (!status) Close = (CLOSE) GetProcAddress(gLabjackU6, "Close"); 

if (Close==NULL) status = GetLastError(); //Ok here

if (!status) ListAll = (LISTALL) GetProcAddress(gLabjackU6, "ListAll"); 

if (ListAll==NULL) status = GetLastError(); // Ok here

if (!status) ListAlls = (LISTALLS) GetProcAddress(gLabjackU6, "ListAlls"); //GetProcAddress can not find "ListAlls" and return NULL

if (ListAlls==NULL) status = GetLastError(); // status = 127

...

"

Could you let me know what could go wrong?

 

Thanks in advance