DAQFactory for UD - Windows | LabJack
« Close

Datasheets and User Guides

App Notes

Software & Driver


DAQFactory for UD - Windows

DAQFactory examples for 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.

DAQFactory is measurement and automation software from Azeotech.  For general information go to www.azeotech.com, and for information specific to DAQFactory Express go to www.daqexpress.com.

The first item of the File Attachments is an archive containing all examples referenced in the DAQFactory - LabJack Application Guide. The other items are miscellaneous additional examples.

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:


Getting Help

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


UD Examples Overview (Referencable)

UD Library Overview

First read the general overview of the UD library:


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


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.


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.


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


Simple PeriodIn32 Example.ctl  works very nicely as an intro to using timers.

In the UE9 Ain configuration file (4th down from top) it has the line to set the LJ resolution, 18 in the example, and I will change mine to 20 for the UE9 Pro, but in real world practice, remember I am NEW with DaqFactory, how do I make the script run at start-up to initialize the LJ to my desired settings?

Also, is it critical that this is included in the script?

include("c:\program files\labjack\drivers\labjackud.h")

I currently have a very successful little vacuum leak test running that doesn't do any initialization, thus I don't know the default resolution, and the need to set it with:

global ID = 0

// set device resolution to index 18

Do I need to setup an error handler?

TIA for any help and comments.


18 is the correct value to use the high-res converter on the UE9-Pro.  If you pass 20 it is probably interpreted as 18, but might as well just pass 18.


To make a script run automatically when DAQFactory first loads a particular CTL, select "AutoStart" in that script:


Yes, you need the include line:


You don't have to handle errors, but it is always a good idea to at least know an error has occured.  I recommend you make a sequence called ErrorHandler (copy it from the example) and call it after every Go, GoOne, ePut, or eGet.


How to see .ctl file??

You open these CTL files in DAQFactory.  Go to daqexpress.com to download the free version DAQFactory Express.

I have my channels set to record thermocouples. I have used the offset correction with the internal temperature to accurately see and graph the temps on my page. But now I want to log the temp data...how do I record temperatures and not just the channel voltage? If I have to correct in Excel, what is the correct expression? Thanks.