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 #69 background imageLoading...
Page #69 background image
The following constant is passed in the Channel parameter with the get stream data IOType to
he following are special channels, used with the get/put config IOTypes, to write or read
size in samples.
256=100%.
samples.
llowing constants are passed in the value
ely return requested amount, or none.
e backlog special channels return information about how much data is left in the stream
uffer on the U3 or in the UD driver. These parameters are updated whenever a stream packet
state of the buffers, but can
e useful to detect problems.
transfers it to a buffer on
waiting to be transferred to
M_BACKLOG_COMM special channel specifies how much data is left in the
3), wher 0 means 0% full and 256 would
er retrieves stream data from the U3 in the background, but if the
son, the driver might not be able to
ad the data as fast as the U3 is acquiring it, and thus there will be data left over in the U3
uffer.
feature called auto-recovery is used. If the buffer
verflows, the U3 will continue streaming but discard data until the buffer is emptied, and then
data will be stored in the buffer again. The U3 keeps track of how many packets are discarded
ased on the number of packets discarded, the UD driver adds the
by the hardware clock
The LabJackUD driver automatically reads
and stores it in a PC RAM buffer until requested. The general
ig ration aram
list.
Start the stream.
Periodically retrieve stream data in a loop.
Stop the stream.
specify a read returning all scanned channels, rather than retrieving each scanned channel
separately:
LJ_chALL_CHANNELS
T
various stream values:
LJ_chSTREAM_SCAN_FREQUENCY
LJ_chSTREAM_BUFFER_SIZE //PC stream buffer
_chSTREAM_WAIT_MODE
LJ
LJ_chSTREAM_DISABLE_AUTORECOVERY
LJ_chSTREAM_BACKLOG_COMM //Read-only. 0=0% and
LJ_chSTREAM_BACKLOG_UD //Read-only. Number of
LJ_chSTREAM_SAMPLES_PER_PACKET
With the wait mode special channel above, the fo
parameter to select the behavior when reading data:
ly return available data. LJ_swNONE //No wait. Immediate
LJ_swALL_OR_NONE //No wait. Immediat
_swPUMP //Advance message pump wait mode.
LJ
LJ_swSLEEP //Wait until requested amount available.
Th
b
is read by the driver, and thus might not exactly reflect the current
b
When streaming, the processor acquires data at precise intervals, and
the U3 itself. The U3 has a small buffer (512-984 samples) for data
the host. The
LJ_chSTREA
U3 buffer (
COMM or CONTROL are the same thing on the U
mean 100% full. The UD driv
computer or communication link is too slow for some rea
re
b
Since the data buffer on the U3 is very small a
o
and reports that value. B
proper number of dummy samples (-9999.0) such that the correct timing is maintained. Auto-
recovery will generally occur when the U3 buffer is 90-95% full.
In stream mode the LabJack acquires inputs at a fixed interval, controlled
n the device itself, and stores the data in a buffer.
o
data from the hardware buffer
procedure for streaming is:
Update conf u p eters.
Build the scan
69

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