Skip to main content
Skip table of contents

3.2.2 Special Stream Modes [T-Series Datasheet]

Useful sub-modes for stream operation.

Burst Stream

Burst stream is when stream collects a pre-determined number of scans, then stops. To set the stream burst size, write to STREAM_NUM_SCANS:

The LJM library collects burst stream data with the StreamBurst function.

It may be beneficial to set STREAM_BUFFER_SIZE_BYTES to a large value for fast burst stream.

T7-Pro only: Burst stream is well-suited for WiFi connections, because WiFi has a lower throughput than other connection types.

Externally Clocked Stream - T7/T8

Externally-clocked stream allows T-series devices to stream from external pulses. It also allows for variable stream scan rates.

Clock Source

The scan rate is generated from the internal crystal oscillator. Alternatively, the scan rate can be a division of an external clock provided on CIO3.

To subdivide the external clock pulses for a slower scan rate, use STREAM_EXTERNAL_CLOCK_DIVISOR.

To use externally clocked stream with LJM, see the externally clocked stream section of the LJM User's Guide.

Using a DIO_EF as a Clock Source

One option to generate a stream clock is to use the PWM DIO_EF. The clock signal from a single PWM output could be shared between multiple devices. For example, configure a 50 kHz output with 50% duty cycle on the FIO0 terminal of one LabJack. Jumper FIO0 to CIO3 for use with externally clocked stream. The following pseudocode demonstrates the configuration that is required:

STREAM_CLOCK_SOURCE = 2 # Configure externally clocked stream on CIO3

DIO_EF_CLOCK0_DIVISOR = 1 # No divisor, the base clock is 80 MHz on the T7
DIO_EF_CLOCK0_ROLL_VALUE = 1600 # 80 MHz / 1600 = 50 kHz output

DIO0_EF_INDEX = 0 # PWM output on FIO0/DIO0

DIO0_EF_OPTIONS = 0 # Use DIO_EF_CLOCK0 (50kHz output configured above)
DIO0_EF_CONFIG_A = 800 # 800 / 1600 = 50% duty cycle

Triggered Stream - T7/T8

T7 minimum firmware: 1.0186

T8 minimum firmware: 1.021

Stream can be configured to start scanning when a trigger is detected. Trigger sources are DIO_EF modes:

Frequency In and Conditional Reset allow you to select rising or falling edges and Pulse Width In will trigger from either edge.

See Appendix A for hysteresis voltage information.

Configuring stream to use a trigger requires setting up a DIO_EF and adding the STREAM_TRIGGER_INDEX register to normal stream configuration. Note that it is not necessary to set any DIO_EF_CONFIG registers; it is only necessary to change the index and enable the feature.

STREAM_TRIGGER_INDEX (address 4024):

  • 0 = No trigger. Stream will start when Enabled.

  • 2000 = DIO_EF0 will start stream.

  • 2001 = DIO_EF1 will start stream.

  • 2002 = DIO_EF2 will start stream.

  • 2003 = DIO_EF3 will start stream.

  • 2006 = DIO_EF6 will start stream.

  • 2007 = DIO_EF7 will start stream.

The delay between the trigger and the first collected sample is one scan period.

To use triggered stream with LJM, see the triggered stream section of the LJM User's Guide.

A more complicated stream trigger can be implemented with a Lua script. For example, a Lua script could check for an arbitrary stream trigger condition in conjunction with triggered stream being started as normal. Once the Lua script detects that the stream condition is fulfilled, it writes a pulse to a digital out (such as DIO3) which is then detected by the normal trigger (as specified by STREAM_TRIGGER_INDEX).

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.