Data Streaming (DSTREAM)

The DSTREAM subsystem allows the SCPI user to configure and control fast data streaming via a TCP network protocol. This documentation describes the SCPI commands to control the subsystem. Details about the TCP transfer and examples can be found in a separate documentation.

The following SCPI commands can be used to configure and control one or more streaming groups (distinguished via a GRP number). Each group has its own list of channels and a TCP port where data is provided. Each group can be configured and started individually. Some commands provide an ALL option to start/stop all configured groups.

Each streaming group has its own internal state. It can be queried using the STATe? query. The following list describes the allowed operations in each state:

INVALID: An invalid state means the streaming group does not exist, it will be automatically created when calling configuration commands such as ITEMs and PORT

CONFIG: In the configuration state, ITEMs and PORT commands can be used to configure the group. The INIT command will initialize the subsystem.

INITIALIZED: The streaming group is initialized (e.g. has an open TCP port) and is waiting for connections and the STARt command. If a configuration command such as ITEMs or PORT is executed, the state is set back to CONFIG.

RUNNING: The streaming group is actively sending data. Call STOP to enter the INITIALIZED state again.

ERROR: If one of the channels to register is unused, the whole dataset will be discarded and the DSTREAM system will be in an error state. Use :DSTream:STATe? to get more details. It can be reset using the RESet command.

:DSTream:ITEMs[<GRP>] <channel>[,<channel>[,…]]

Syntax

:DSTream:ITEMs[<GRP>] <channel>[,<channel> [,…]]

Description

Defines the ordered list of requested channels for one stream group GRP

Parameter

Name

Type

Range

Default

<GRP>

NR1

Group number >= 1

1

<channel>

ASCII String

Oxygen Channel Name

None

Explanation

The user can specify a list of multiple channels.

If one channel does not exist, is invalid or disabled, no channel is set for the streaming group (see system error log for more details). In addition, the following channel types are not supported: Digital channels, video channels and Rosette group channels. |

Example

Set two channels for stream group 2: AI 1/1 and AI 1/2

-> :DST:ITEMs2 "AI 1/1", "AI 1/2"

:DSTream:ITEMs[<GRP>]?

Syntax

:DSTream:ITEMs[<GRP>]?

Description

Returns the current list of requested channels for one channel group GRP

Parameter

Name

Type

Range

Default

<GRP>

NR1

Group number >= 1

1

Explanation

Returns NONE if no items are set

Return Format

<ASCCI String>[, <ASCII String>[, …]] | NONE

Example

Query the items of stream group 2:

-> :DST:ITEMs2?
<- "AI 1/1", "AI 1/2"

:DSTream:PORT[<GRP>] <PORT>

Syntax

:DSTream:PORT[<GRP>] <PORT>

Description

Configures the port number of the TCP server for a streaming group GRP

Parameter

Name

Type

Range

Default

<GRP>

NR1

Group number >= 1

1

<PORT>

NR1

1 .. 65536

10003

Explanation

The port must be a valid TCP port. It must not be used by any other TCP server on the local system but can be shared by multiple streaming groups of the Oxygen instance.

Example

Set the TCP port for stream group 2 to 10005:

-> :DST:PORT2 10005

:DSTream:PORT[<GRP>]?

Syntax

:DSTream:PORT[<GRP>]?

Description

Queries the currently configured TCP port

Parameter

Name

Type

Range

Default

<GRP>

NR1

Group number >= 1

1

Explanation

Returns the NR1 numeric value of the configured TCP port

Return Format

<Nr1>

Example

-> :DST:PORT2?
<- 10005

:DSTream:INIT [<GRP> | ALL]

Syntax

:DSTream:INIT [<GRP> | ALL]

Description

Initializes one or all data streaming groups and opens the TCP port

Parameter

Name

Type

Range

Default

<GRP>

NR1

Group number >= 1

1

ALL

Literal

None

Explanation

The server will listen for new connection on the configured port

Example

Initializes the streaming group 1:

-> :DST:INIT 1

:DSTream:STARt [<GRP> | ALL]

Syntax

:DSTream:STARt [<GRP> | ALL]

Description

Starts streaming of one or all data streaming groups

Parameter

Name

Type

Range

Default

<GRP>

NR1

Group number >= 1

1

ALL

Literal

None

Explanation

Only possible after calling INIT for the specified group(s).

Example

Start streaming for all configured streaming groups:

-> :DST:STARt ALL

:DSTream:STOP [<GRP> | ALL]

Syntax

:DSTream:STOP [<GRP> | ALL]

Description

Stops streaming of one or all data streaming groups

Parameter

Name

Type

Range

Default

<GRP>

NR1

Group number >= 1

1

ALL

Literal

None

Explanation

Only possible after calling STARt for the specified group(s). After stopping, the streaming group is in INITIALIZED state.

Example

Stop streaming for all configured streaming groups:

-> :DST:STOP ALL

:DSTream:DELete [<GRP> | ALL]

Syntax

:DSTream:DELete [<GRP> | ALL]

Description

Deletes a configured streaming group

Parameter

Name

Type

Range

Default

<GRP>

NR1

Group number >= 1

1

ALL

Literal

None

Explanation

The streaming group must be in config state. All ITEMs and port settings are deleted.

Example

Delete streaming group 1:

-> :DST:DEL 1

: DSTream:RESet

Syntax

:DSTream:RESet

Description

Resets the data streaming subsystem

Parameter

None

Explanation

Stops the server if started, and resets the configuration to its default settings

Example

-> :DST:RES

: DSTream:STATe[<GRP>]?

Syntax

:DSTream:STATe[<GRP>]?

Description

Queries the internal state of the data streaming subsystem

Parameter

Name

Type

Range

Default

<GRP>

NR1

Group number >= 1

1

Explanation

Possible states are:
  • INVALID: Streaming group does not exist

  • CONFIG: Configuration state (allows settings of ITEMs and PORT)

  • INITIALIZED: The streaming group has already been initialized

  • RUNNING: The server is started and cannot be configured anymore

  • ERROR: An error has occurred; the user needs to call RESet

  • UNLICENSED: A valid license for the data streaming subsystem was not found

Return Format

<ASCCI String>[, <ASCII String>[, …]] | NONE

Example

Query the state of the streaming group 1 (default value):

-> :DST:STATe?
<- CONFIG

: DSTream:TRIG[<GRP>] {ON|OFF}

Syntax

:DSTream:TRIG[<GRP>] {ON|OFF}

Description

Configure a streaming group to send data only when a trigger is active

Parameter

Name

Type

Range

Default

<GRP>

NR1

Group number >= 1

1

{ON|OFF}

Boolean

{ON|OFF}

OFF

Explanation

When this property is enabled for a streaming group, data will only be streamed during a triggered measurement, while any waveform recording trigger is active.

Example

Enable the triggered mode of streaming group 1 (default value):

-> :DST:TRIG ON

: DSTream:TRIG[<GRP>]?

Syntax

:DSTream:TRIG[<GRP>]?

Description

Query the triggered property for a given streaming group

Parameter

Name

Type

Range

Default

<GRP>

NR1

Group number >= 1

1

Explanation

Returns the current state of the triggered property for a stream group, possible values are
  • ON (triggered mode is active)

  • OFF (data is streamed continuously)

Example

Query the triggered mode of streaming group 1 (default value):

-> :DST:TRIG?
<- ON

:DSTream:REPLAY[<GRP>] {LIVE | BULK}

Syntax

:DSTream:REPLAY {LIVE | BULK}

Description

Sets the datasream REPLAY state

Parameter

Name

Type

Range

Default

<GRP>

NR1

Group number >= 1

1

{LIVE | BULK}

Literal

{LIVE|BULK}

BULK

Explanation

Sets the data streaming REPLAY mode. Possible values are LIVE or BULK

Example

-> : DSTream:REPLAY BULK
-> : DSTream:REPLAY?
<- BULK

: DSTream:REPLAY[<GRP>]?

Syntax

:DSTream:REPLAY?

Description

Query the dstream REPLAY state

Parameter

Name

Type

Range

Default

<GRP>

NR1

Group number >= 1

1

Explanation

Returns the current REPLAY state for a stream group, possible values are
  • LIVE (data streaming as in live mode)

  • BULK (streaming continuously as fast as possible)

Example

-> :DST:REPLAY?
<- LIVE

:DSTream:INTERVAL[<GRP>] <INTV>

Syntax

:DSTream:INTERVAL <INTV>

Description

Configure a streaming group to send data blocks with a given time interval

Parameter

Name

Type

Range

Default

<GRP>

NR1

Group number >= 1

1

INTV

NR1

100 .. 1000

100

Explanation

When this property is set for a streaming group, data will be sent in blocks of the given time interval.

Example

-> : DSTream:INTERVAL 200
-> : DSTream:INTERVAL?
<- 200

: DSTream:INTERVAL[<GRP>]?

Syntax

:DSTream:INTERVAL?

Description

Query the interval property for a given streaming group

Parameter

Name

Type

Range

Default

<GRP>

NR1

Group number >= 1

1

Explanation

Returns the current value of the interval property for a stream group, possible values are between 100 and 1000 milliseconds.

Example

-> :DST:INTERVAL?
<- 100