External Data Logging (ELOG)

The ELOG subsystem allows the SCPI user to retrieve synchronized access to multiple channels via statistics calculations.

First, the subsystem needs to be configured. Possible parameters are a channel list, aggregation calculations, aggregation duration as well as result formats and timestamp formats.

After configuration, the user can start the computations and fetch all values. By continuously requesting data records, gap-less readout is possible. Data is kept available inside Oxygen for at least 20 seconds before fetching of old samples is no longer possible.

ELOG cannot be configured during recording or armed triggers state.

:ELOG:ITEMs <channel>[,<channel>[,…]]

Syntax

:ELOG:ITEMs <channel> [,<channel> [,…]]

Description

Defines the ordered list of requested channels

Parameter

Name

Type

Range

Default

<channel>

ASCII String

Oxygen Channel Name

None

Explanation

The user can specify a list of multiple scalar channels. The channels need not share the same sample-rate or raw numeric format. If a channel is not compatible, an error is generated, and the channel is not added to the list. If one of the registered channels becomes unused or is changed, the whole dataset will be discarded and the ELOG system will be in an error state. Use :ELOG:STATe? to get more details.

The following channel types are supported: Analog, Counter, Math, Statistics, Filter, Power, AI Async Pad, CAN Signals, GPS-Position/Velocity/Heading/SecondsOfDay/Distance and Acceleration. For proper operation, a minimum sample rate of 5Hz is suggested.

Example

-> :ELOG:ITEMs "U1_tRMS@PowerGroup","AI 1/2"

:ELOG:ITEMs?

Syntax

:ELOG:ITEMs?

Description

Returns the current list of requested channels

Parameter

None

Explanation

Return Format

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

Example

-> :ELOG:ITEMs?
<- "U1_tRMS@PowerGroup","AI 1/2"

:ELOG:PERiod <Duration>

Syntax

:ELOG:PERiod <Duration>

Description

Sets the duration (in seconds) of the data aggregation time of statistics from source channels

Parameter

Name

Type

Range

Default

<duration>

NRf

> 0

0.1 seconds

Explanation

The duration period is the number of seconds where statistics values such as MIN/AVG/… are collected from the source channels (ITEMS). The minimum duration is limited by the frequency of the source channel. Values below the inverse of the source channel frequency will lead to an error state

Example

Set 2.5Hz (0.4) or 1kHz (0.001) minimum source channel frequency

-> :ELOG:PERiod 0.4
...
-> :ELOG:PERiod 0.001

:ELOG:PERiod?

Syntax

:ELOG:PERiod?

Description

Queries the numeric data aggregation time for output (in seconds)

Parameter

None

Explanation

Return Format

<NR2>

Example

-> :ELOG:PER 0.5
-> :ELOG:PER?
<- 0.5

:ELOG:CALCulations {AVG|MIN|MAX|RMS}

Syntax

:ELOG:CALCulations {AVG|MIN|MAX|RMS}[,{AVG|MIN|MAX|RMS}[,…]]

Description

Sets a list of requested statistical calculations for all channels

Parameter

Name

Type

Range

Default

Modes

ASCII literal(s)

  • AVG Average values

  • MIN Minimum values

  • MAX Maximum values

  • RMS root-mean-square values

AVG

Explanation

One or multiple calculations are performed for each ITEMS channel. When fetching data, calculations are returned in the same order as requested in CALC.

Example

-> :ELOG:CALCulations AVG,MAX,RMS

:ELOG:CALCulations?

:ELOG:PERiod?

Syntax

:ELOG:PERiod?

Description

Queries the list of configured calculation modes

Parameter

None

Explanation

Return Format

{AVG|MIN|MAX|RMS}[,{AVG|MIN|MAX|RMS}[,…]]

Example

-> :ELOG:CALC MIN,MAX
-> :ELOG:CALC?
<- MIN,MAX

:ELOG:FORMat {ASCII|BIN_INTEL|BIN_MOTOROLA}

Syntax

:ELOG:FORMat {ASCII|BIN_INTEL|BIN_MOTOROLA}

Description

Sets the requested output format

Parameter

Name

Type

Range

Default

Format

ASCII literal(s)

  • ASCII

  • BIN_INTEL

  • BIN_MOTOROLA

ASCII

Explanation

When format is set to ASCII, all numbers are returned in the NR3 format (timestamps in NR2 format)

When format is set to BIN_INTEL or BIN_MOTOROLA, all values are returned in IEEE 754 float32 formats (in the corresponding byte order). See FETCH for more details about record layouts

Example

-> :ELOG:FORM BIN_INTEL

:ELOG:FORMat?

Syntax

:ELOG:FORMat?

Description

Queries the list of configured calculation modes

Parameter

None

Explanation

Returns the currently configured output format

Return Format

{ASCII|BIN_INTEL|BIN_MOTOROLA}

Example

->  :ELOG:FORM?
->  :ELOG:FORM?
<-  ASCII

:ELOG:TIMestamp {OFF|REL|ABS|ELOG}

Syntax

:ELOG:TIMestamp {OFF|REL|ABS|ELOG}

Description

Sets the requested timestamp format

Parameter

Name

Type

Range

Default

Mode

ASCII literal(s)

  • OFF No timestamp

  • REL Seconds since acquisition start

  • ABS Absolute timestamp as ISO date/time

  • ELOG Seconds since the current ELOG session was started

ASCII

Explanation

Enables or disables timestamp reporting when requesting data through FETCH.

Relative times (REL) are reported as seconds since acquisition start, ELOG times are seconds since the first sample from the current ELOG session (after calling :ELOG:STARt). Absolute times are only reported in ASCII output format and have the following format: YYYY-MM-DDThh:mm:ss.xxxxxx

Example

-> :ELOG:TIM REL

:ELOG:TIMestamp?

Syntax

:ELOG:TIMestamp?

Description

Queries the currently configured timestamp format

Parameter

None

Explanation

Return Format

{OFF|REL|ABS|ELOG}

Example

-> :ELOG:TIM REL
-> :ELOG:TIM?
<- REL

:ELOG:STARt

Syntax

:ELOG:STARt

Description

Initializes and starts ELOG data gathering. Samples values can be fetched as early as one aggregation period after STARt. After calling STARt, no ELOG configuration is possible.

Parameter

None

Explanation

Example

-> :ELOG:STARt

:ELOG:FETCh? [<NUM>]

Syntax

:ELOG:FETCh [<max_records>]

Description

Fetches MAX_RECORDS records or less from the internal ELOG buffer. If no parameter is given, all available records are returned. FETCh is only possible after STARt.

Parameter

Name

Type

Range

Default

Max_records

NR1

1 .. MAX

MAX

Explanation

Fetch returns values at record level granularity. There is one record for each timestamp. Each record consists of values from all channels (ITEMs) and all calculation modes (CALC). If no data is available, NONE is returned. ERROR indicates an error.

In ASCII mode, the result is a list of NRf values, all values of one record are returned consecutively, possibly prepended by the timestamp value (see example).

In binary mode, for every channel-calculation, a separate Arbitrary Block with up to MAX_RECORDS float32 values is returned. When using timestamps, an Arbitrary Block with float32 timestamp values is returned as the first result.

In the following examples, we assume the following settings, which configure a record of four values:

-> :ELOG:ITEMs "CH0", "CH1"
-> :ELOG:CALC AVG, MIN

Example

Timestamp

CH0.AVG

CH0.MIN

CH1.AVG

CH1.MIN

0.1

1.5

1

10.5

10

0.2

2.5

2

20.5

20

-> :ELOG:FORM ASCII; :ELOG:TIM OFF; :ELOG:STARt
-> :ELOG:FETCh? 2
<- 1.5, 1, 10.5, 10, 2.5, 2, 20.5, 20
-> :ELOG:STOP
...
-> :ELOG:FORM ASCII; :ELOG:TIM REL; :ELOG:STARt
-> :ELOG:FETCh? 2
<- 0.1, 1.5, 1, 10.5, 10, 0.2, 2.5, 2, 20.5, 20
-> :ELOG:STOP
...
-> :ELOG:FORM BIN_INTEL; :ELOG:TIM REL; :ELOG:STARt
-> :ELOG:FETCh? 2
<- {0.1, 0.2}, {1.5, 2.5}, {1, 2}, {10.5, 20.5}, {10, 20}
-> :ELOG:STOP

:ELOG:STOP

Syntax

:ELOG:STOP

Description

Stops buffering data after a previous STARt call, clears the data buffer and disables fetching.

Parameter

None

Explanation

The configuration is not changed; therefore, data acquisition can be restarted by calling STARt again.

Example

-> :ELOG:STOP

:ELOG:RESet

Syntax

:ELOG:RESet

Description

Resets the ELOG configuration and stops fetching if started with STARt. All parameters are set to their default values and the channel list (ITEMs) is cleared.

Parameter

None

Explanation

Same behavior as when calling *RST, but limited to the ELOG subsystem.

Example

-> :ELOG:RESet

:ELOG:STATe?

Syntax

:ELOG:STATe?

Description

Returns the internal state of the ELOG subsystem. This command is not needed for regular operations but is useful for information purposes.

Possible states are: CONFIG, RUNNING and INVALID

Parameter

None

Explanation

The ELOG subsystem uses states internally. Initially, ELOG is in configuration state (CONFIG) which accepts commands like ITEMs, PER, CALC, FORM and TIM. After calling STARt, the subsystem is switched into a data gathering state (RUNNING) which no longer allows to modify the configuration. The configuration state can be entered again by either calling STOP or RESet.

While fetching data from Oxygen through ELOG, the measurement configuration in Oxygen must not be changed. If a change of the configuration is detected, ELOG will stop fetching data and an error is reported when calling FETCh. The state query will return the INVALID state in this case

Return Format

ASCII literal

Example

-> :ELOG:STATe?
<-  RUNNING