Skip to Navigation

DAQFactory Examples (Windows UD)

Comments

#1

How to see .ctl file??

#2

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

#3

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
ePut(ID, LJ_ioPUT_CONFIG, LJ_chAIN_RESOLUTION, 18, 0)
ErrorHandler(ID)

Do I need to setup an error handler?

TIA for any help and comments.

MK

#4

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.

http://labjack.com/support/ue9/users-guide/3.1

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

http://labjack.com/support/ud/df-lj-app-guide/8.2

Yes, you need the include line:

http://labjack.com/support/ud/df-lj-app-guide/8.1

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.

 

#5

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