EasyManuals Logo

LabJack U3 User Manual

LabJack U3
120 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #64 background imageLoading...
Page #64 background image
LJ_ioGET_AIN //Single-ended. Negative channel is fixed as 31.
configure
J_chAIN_SETTLING_TIME //LongSettling enabled if TRUE.
J_chAIN_BINARY
s as
.
Put (lngHandle, LJ_ioPUT_ANALOG_ENABLE_PORT, 0, 70, 16);
ddRequest (lngHandle, LJ_ioGET_AIN_DIFF, 1, 0, 6, 0);
e-ended read of AIN1.
andle, LJ_ioGET_AIN_DIFF, 1, 0, 31, 0);
N_DIFF, 1, 0, 32, 0);
requests.
ts were made with the same IOType
1 was different, GetFirst/GetNext
ve the results. The simple
ction does not use the x1 parameter and
no way to specify which result is desired.
/Rather than specifying the IOType and Channel of the
/result to be read, the GetFirst/GetNext functions retrieve
t
/used in a loop, but here they are simply called in succession.
ype,
st.
re just retrieving the results in order
//Get the AIN1-AIN6 voltage.
e, 0, 0, &dblValue, 0, 0);
etNextResult (lngHandle, 0, 0, &dblValue, 0, 0);
LJ_ioGET_AIN_DIFF //Specify negative channel in x1.
The following are special channels, used with the get/put config IOTypes, to
parameters that applies to all analog inputs:
J_chAIN_RESOLUTION //QuickSample enabled if TRUE.
L
L
L
Following is example pseudocode to read analog inputs:
//Execute the pin_configuration_reset IOType so that all
//pin assignments are in the factory default condition.
//The ePut function is used, which combines the add/go/get.
ePut (lngHandle, LJ_ioPIN_CONFIGURATION_RESET, 0, 0, 0);
//Configure FIO1, FIO2, and FIO6 as analog, all other
//digital (see Section 4.3.2).
//The ePut function is used, which combines the add/go/get
e
//Now, an add/go/get block to execute multiple requests.
//Request a single-ended read from AIN2.
ddRequest (lngHandle, LJ_ioGET_AIN, 2, 0, 0, 0);
A
/Request a differential read of AIN1-AIN6.
/
A
//Request a differential read of AIN1-Vref.
ddRequest (lngHandle, LJ_ioGET_AIN_DIFF, 1, 0, 30, 0);
A
//Request a singl
ddRequest (lngH
A
//Request a read of AIN1 using the special 0-3.6 volt range.
AddRequest (lngHandle, LJ_ioGET_AI
//Execute the
GoOne (lngHandle);
//Since multiple reques
//and Channel, and only x
o retrie
//must be used t
//GetResult fun
/thus there is
/
/
/
//the results in order. Normally, GetFirst/GetNext are bes
/
//Retrieve AIN2 voltage. GetFirstResult returns the IOT
Channel, Value, x1, and UserData from the first reque
//
//In this example we a
//and Value is the only parameter we need.
etFirstResult (lngHandle, 0, 0, &dblValue, 0, 0);
G
GetNextResult (lngHandl
//Get the AIN1-Vref voltage.
G
64

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the LabJack U3 and is the answer not in the manual?

LabJack U3 Specifications

General IconGeneral
Analog Outputs2
Analog Output Resolution10 bits
Digital I/O20
Counter/Timers2
InterfaceUSB
Operating Voltage5 V
ManufacturerLabJack Corporation
Analog Inputs16
Analog Input Resolution12-bit
Max Sample Rate50 kHz