Skip to Navigation

3.2 - Stream Mode

The highest input data rates are obtained in stream mode, which is supported with U3 hardware version 1.21 or higher. Hardware version 1.21 started shipping in late August of 2006. Contact LabJack for information about upgrading older U3s. Stream is a continuous hardware timed input mode where a list of channels is scanned at a specified scan rate. The scan rate specifies the interval between the beginning of each scan. The samples within each scan are acquired as fast as possible.

As samples are collected, they are placed in a small FIFO buffer on the U3, until retrieved by the host. The buffer typically holds 984 samples, but the size ranges from 512 to 984 depending on the number of samples per packet. Each data packet has various measures to ensure the integrity and completeness of the data received by the host.

Since the data buffer on the U3 is very small it uses a feature called auto-recovery. If the buffer overflows, 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 and reports that value. Based on the number of packets discarded, the UD driver adds the proper number of dummy samples (-9999.0) such that the correct timing is maintained.

The table below shows various stream performance parameters. Some systems might require a USB high-high configuration to obtain the maximum speed in the last row of the table. A “USB high-high” configuration means the U3 is connected to a high-speed USB2 hub which is then connected to a high-speed USB2 host. Even though the U3 is not a high-speed USB device, such a configuration does often provide improved performance.

Stream data rates over USB can also be limited by other factors such as speed of the PC and program design. One general technique for robust continuous streaming would be increasing the priority of the stream process.

The max sample rate of the U3 is 50 ksamples/second. The max scan rate depends on how many channels you are sampling per scan:

Sample => A reading from one channel.
Scan => One reading from all channels in the scan list.
SampleRate = NumChannels * ScanRate

For example, if streaming 5 channels at ResolutionIndex=0 and all at Range=+/-10V, the max scan rate is 10 kscans/second (calculated from 50 ksamples/second divided by 5).

Full resolution streaming is limited to 2500 samples/s, but higher speeds are possible at the expense of reduced effective resolution (increased noise). The first column above is the index passed in the Resolution parameter to the low-level StreamConfig function, while the second column is the corresponding index for the Resolution parameter in the UD driver. In the UD driver, the default Resolution index is 0, which corresponds to automatic selection. In this case, the driver will use the highest resolution for the specified sample rate.

ENOB stands for effective number of bits. The first ENOB column is the commonly used “effective” resolution, and can be thought of as the resolution obtained by most readings. This data is calculated by collecting 128 samples and evaluating the standard deviation (RMS noise). The second ENOB column is the noise-free resolution, and is the resolution obtained by all readings. This data is calculated by collecting 128 samples and evaluating the maximum value minus the minimum value (peak-to-peak noise). Similarly, the Noise Counts column is the peak-to-peak noise based on counts from a 12-bit reading.

Interchannel delay is the time between successive channels within a stream scan.

tags:

Comments

#1

I am trying to understand the T7 data acquisitionn rate, if a script contains a scansperread at 500 and a scanrate of 10,000 does that mean that the T7 is acquiring 50k data reads/second?

#2

This is the U3 User's Guide, and the U3 uses the UD library on Windows.  The T7 uses the LJM library on all platforms.

UD or LJM:  SampleRate = NumChannels * ScanRate.  So if you have ScanRate = 10 kscans/second and NumChannels = 5 (NumAddresses on the T7), you are sampling at 50 ksamples/second and that is the number you use when looking at data rate limits.

LJM:  ScansPerRead is not directly related to ScanRate or SampleRate.  ScansPerRead controls how many scans you read per call to the read function.  A typical value in this example would be 5k, so that the read call would wait and return 5k scans per call (which is a 1/2 second of data).

UD:  The number of scans you retrieve per read is controlled by the value parameter in the request with ioType LJ_ioGET_STREAM_DATA (i.e. the stream read call).  See Section 4.3.7 of the U3 User's Guide.

This section has been updated with clarification on sample versus scan, as have T7/LJM sections:

http://labjack.com/support/datasheets/t7/communication/stream-mode

http://labjack.com/support/datasheets/t7/appendix-a-1

http://labjack.com/support/ljm/users-guide/function-reference/ljmestream...

 

#3

Hello. I need to measure the time it takes to perform the conversion when I put my analog signal in one of the AIN inputs using Labview. how can i do it?

#4

I'm not clear.  You want to know or measure the time between what event and what event?

#5

For a fluorimeter operated via LabVIEW which would be the best DAC to use and why?

#6

Sounds like you have some sort of device that provides some signal that you want to acquire.  We will need details about the signal.  I suggest you post on our forum, and provide a link to details about the output signal from your flourometer.

#7

 with LabJack U3-HV I can capture a 20KHz signal?

#8

The U3 can scan 1 channel at 50 kscans/second, so if you do that with a 20 kHz signal you will get just 2 or 3 samples per cycle.  So the answer depends on what information you want from the signal.  If you want to display a nice looking waveform, you need many more points per cycle.