mode.
Stream mode 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 automatically by the LabJack, they are placed in a buffer on the LabJack, until retrieved by the host.
Stream mode is generally used at 10 scans/second or faster.
Command/response mode is generally best for minimum-latency applications such as feedback control. By latency here we
mean the time from when a reading is acquired to when it is available in the host software. A reading or group of readings can
be acquired in times on the order of a millisecond.
Stream mode is generally best for maximum-throughput applications where latency is not so important. Data is acquired very fast,
but to sustain the fast rates it must be buffered and moved from the LabJack to the host in large chunks. For example, a typical
stream application might set up the LabJack to acquire a single analog input at 50,000 samples/second. The LabJack moves this
data to the host in chunks of 25 samples each. The Windows UD driver moves data from the USB host memory to the UD driver
memory in chunks of 2000 samples. The user application might read data from the UD driver memory once a second in a chunk
of 50,000 samples. The computer has no problem retrieving, processing, and storing, 50k samples once per second, but it could
not do that with a single sample 50k times per second.
3.1 - Command/Response
Everything besides streaming is done in command/response mode, meaning that all communication is initiated by a command
from the host which is followed by a response from the UE9.
For everything besides timers and counters, the low-level Feedback function is the primary function used, as it writes and reads
virtually all I/O on the UE9. The Windows LabJackUD driver uses the Feedback function under-the-hood to handle most requests.
A single call to the Feedback function writes and reads all 23 digital I/O, updates the analog outputs, and reads up to 16 analog
inputs.
The following tables show typical measured execution times for the Feedback function. The time varies with the number of analog
inputs requested and the resolution of those inputs. These were measured by calling the function 1000 times and dividing the total
time by 1000, and thus include everything (Windows latency, communication time, UE9 processing time, etc.).
A "USB high-high" configuration means the UE9 is connected to a high-speed USB2 hub which is then connected to a high-speed
USB2 host. Even though the UE9 is not a high-speed USB device, such a configuration does provide improved performance.
Typical examples of "USB other" would be a UE9 connected to an old full-speed hub (hard to find) or more likely a UE9 connected
directly to the USB host (even if the host supports high-speed).
Resolution
Ethernet
Index
# AIN
[milliseconds] [milliseconds] [milliseconds]
0
1.7
0-12
4
1.9
0-12
8
2.1
0-12
16
2.7
13
4
2
13
8
2.4
13
16
3.2
14
4
2.7
14
8
3.6
14
16
5.6
15
4
4.9
15
8
8.2
15
16
15
16
4
14
16
8
27
16
16
52
17
4
52
17
8
101
17
16
199
Table 3.1-1. Typical Feedback Function Execution Times
Note that specifying a resolution index of 17, still returns 16-bit data, but is a special minimum noise mode.
As an example with the LabJackUD driver: If requests are added to write/read all 23 bits of digital I/O, update both analog outputs,
and read 16 12-bit analog inputs, the GoOne() function call can be expected to typically take about 2.6 ms to execute via Ethernet.
The AddRequest() and GetResult() calls take relatively no time at all.
A resolution value of 18 is passed to use the auxiliary high-resolution converter (24-bit sigma-delta) on the UE9-Pro. This is done
with the SingleIO low-level function, not the Feedback function. The UD driver will automatically use the SingleIO low-level function
when resolution is set to 18 on the UE9-Pro, and if there are requests for multiple samples the driver will make multiple SingleIO
calls.
USB high-high
USB other
1.5
4
1.7
4
2
4
2.4
4
1.9
4
2.3
4
3
4.9
2.5
4
3.5
5
5.8
6.3
4.9
6
8.1
9
15
15
14
14
27
27
52
52
52
52
101
101
199
199
26
Need help?
Do you have a question about the UE9 and is the answer not in the manual?