BIN (.bin)

The Binary Data is a binary format that contains a header and data in the form of time and voltage pairs. The file header describes the waveform's horizontal (X) and vertical (Y) characteristics and contains other oscilloscope information.

Because the data is in binary format, the size of the file is approximately 5 times smaller than the XY Values formats.

If more than one source is on, you can save all displayed sources to a file. The only exception is functions that are using FFTs or versus operators.

When the oscilloscope is in the Peak Detect acquisition mode, the minimum and maximum value waveform data points are saved to the file. The minimum value data points are saved first, followed by a blank line, and then the maximum value data points are saved.

The size of a BIN (.bin) format file is limited by the 32-bit integer File Size (in bytes) field. The maximum number of points in saved waveforms are correspondingly affected by the file size limit.

Binary Header Format

File Header

There is only one file header in a binary file. The file header consists of the following information.

Cookie

Two byte characters, AG, which indicates that the file is in the Keysight Binary Data file format.

Version

Two bytes that represent the file version.

File Size

An integer that is the number of bytes that are in the file.

Number of Waveforms

An integer that is the number of waveforms stored in the file.

Waveform Header

The waveform header contains information about the type of waveform data that is stored following the waveform data header, which is located after each waveform header. Because it is possible to store more than one waveform in the file, there will be a waveform header and a waveform data header for each waveform.

Header Size

An integer that is the number of bytes in the header.

Waveform Type

An integer that is the type of waveform stored in the file. The following list shows what each value means:

  • 0 = Unknown

  • 1 = Normal

  • 2 = Peak Detect

  • 3 = Average

  • 4 = Horizontal Histogram

  • 5 = Vertical Histogram

  • 6 = Logic

Number of Waveform Buffers

An integer that is the number of waveform buffers required to read the data.

Points

An integer that is the number of points in the waveform.

Count

An integer that is the number of hits at each time bucket in the waveform record when the waveform was created using an acquisition mode like averaging. For example, when averaging, a count of four would mean every waveform data point in the waveform record has been averaged at least four times. Count is ignored when it is read back into the oscilloscope. The default value is 0.

X Display Range

A float that is the number of X display range columns (n) depends on the number of sources being stored. The X display range is the X-axis duration of the waveform that is displayed. For time domain waveforms, it is the duration of time across the display. If the value is zero then no data has been acquired.

X Display Origin

A double that is the number of X display origin columns (n) depends on the number of sources being stored. The X display origin is the X-axis value at the left edge of the display. For time domain waveforms, it is the time at the start of the display. This value is treated as a double precision 64-bit floating point number.  If the value is zero then no data has been acquired.

X Increment

A double that is the number of X increment columns (n) depends on the number of sources being store. The X increment is the duration between data points on the X axis. For time domain waveforms, this is the time between points. If the value is zero then no data has been acquired.

X Origin

A double that is the number of X origin columns (n) depends on the number of sources being store. The X origin is the X-axis value of the first data point in the data record. For time domain waveforms, it is the time of the first point. This value is treated as a double precision 64-bit floating point number.  If the value is zero then no data has been acquired.

X Units

An integer that is the number of X units columns (n) depends on the number of sources being store. The X units is the unit of measure for each time value of the acquired data. X unit definitions are:

  • 0 = Unknown

  • 1 = Volt

  • 2 = Second

  • 3 = Constant

  • 4 = Amp

  • 5 = Decibel

Y Units

An integer that is the number of Y units columns (n) depends on the number of sources being stored. The Y units is the unit of measure of each voltage value of the acquired waveform. Y units definitions are:

  • 0 = Unknown

  • 1 = Volt

  • 2 = Second

  • 3 = Constant

  • 4 = Amp

  • 5 = Decibel

Date

A 16-character array that is the date when the waveform was acquired. The default value is 27 DEC 1996.

Time

A 16-character array that is the time when the waveform was acquired. The default value is 01:00:00:00.

Frame

A 24-character array that is the model number and serial number of the oscilloscope in the format of MODEL#:SERIAL#.

Waveform Label

A 16-character array that contains the label assigned to the waveform.

Time Tags

A double that is the time tag value of the segments being saved.

Segment Index

An unsigned integer that is the segment index of the data that follows the waveform data header.

Waveform Data Header

The waveform data header consists of information about the waveform data points that are stored immediately after the waveform data header.

Waveform Data Header Size

An integer which is the size of the waveform data header.

Buffer Type

A short which is the type of waveform data that is stored in the file. The following shows what each value means.

  • 0 = Unknown data

  • 1 = Normal 32 bit float data

  • 2 = Maximum float data

  • 3 = Minimum float data

  • 4 = Time float data

  • 5 = Counts 32 bit float data

  • 6 = Digital unsigned 8 bit char data

Bytes Per Point

A short that is the number of bytes per data point.

Buffer Size

An integer that is the size of the buffer required to hold the data points.

More Information