The Tektronix wfm file format was designed for the internal save and restore of
waveform data and the associated display. As a consequence, more parameters
are saved than are required to transfer and create an external Time vs. Voltage
value list. The format will handle XY waveform data, XYT data, and pixel maps,
such as the waveform database. FastFrame waveforms, multiple acquisitions with
individual timestamps, can also be represented.
This document applies to the following instrument families: TDS5000/B,
TDS6000/B/C, TDS/CSA7000/B, DPO7000, DPO70000 and DSA70000 Series.
The Tektronix wfm file format is not intended for you to use to create a
waveform for reintroduction into the instrument.
The Tektronix wfm file format is partially based on the SCPI Data Interchange
Format. If you are familiar with that standard, some of the variable names and
usage will be familiar.
Waveforms are described by X or Y dimension data and Curve data. Curve data
for an acquired waveform is in integer format and includes some extra points at
the beginning and ending of the data that are normally not seen on screen. These
extra points are real acquired data points and are used for display interpolation
purposes. There are normally 32 extra points; 16 PreCharge data points and 16
PostCharge data points.
The dimensions can be explicit or implicit. Normal YT (Voltage vs. Time)
waveforms have an implicit dimension for time and an explicit dimension for
Voltage.
For implicit dimensions, the real value, in this case time, is computed by
(Waveform point index * dimensionScale + dimensionOffset).
For the explicit dimension, the real value, in this case voltage, is computed by
(curveBufferPoint * dimensionScale + dimensionOffset).
Note: For Fast Acquisition or Waveform Database waveforms there are two
implicit dimensions and one explicit dimension. Implicit dimension 1 is time and
implicit dimension 2 is Volts. Explicit dimension 1 is number of hits at a specific
Time and Voltage coordinate.
For all other Time-Voltage waveforms implicit dimension 1 is time and explicit
dimension 2 is Voltage.
To download software that will convert the waveform into different formats, go
to: http://www.tek.com/site/sw/search/
CONVERTER” software in the Keyword category.
and search for “WFM TO ASCII
1
Performance Oscilloscope Reference File Format
File Layout Overview
The following provides an overview of the waveform header file layout.
Waveform static file information [78 bytes]
Waveform header
Reference file data [88 bytes]
Explicit Dimension 1 (Usually defines voltage axis)
[Description info] [100 bytes]
[userView data] [56 bytes]
Explicit Dimension 2
[Description info] [100 bytes]
[userView data] [56 bytes]
Implicit Dimension 1 (Usually defines time axis)
[Description info] [76 bytes]
[userView data] [56 bytes]
Implicit Dimension 2
[Description info] [76 bytes]
[userView data] [56 bytes]
TimeBase Info1 [12 bytes]
TimeBase Info2 [12 bytes]
WfmUpdateSpec [24 bytes] (Defines 1
of a waveform set)
WfmCurveObject [30 bytes] (Defines 1
of a waveform set)
FastFrame Frames {0 to N-1 where N = number of frames}
N-1 WfmUpdateSpecs [24 * (N-1) bytes]
N-1 WfmCurveObjects [30 * (N-1) bytes]
CurveBuffer
{Variable length, this contains all curve data in the specified format}
WfmFileCheckSum
{8 bytes}
st
waveform
st
waveform
2
001-1378-03
Internal File Format
Performance Oscilloscope Reference File Format
Listed below is the current (April 2004 - 2006) file format with descriptions.
Offset
Dec [Hex] Size
Waveform static file information
0
[0x000]
2
[0x002]
10
[0x00a]
11
[0x00b]
15
[0x00f]
16
[0x010]
20
[0x014]
24
[0x018]
28
[0x01c]
36
[0x024]
40
[0x028]
72
[0x048]
76
[0x04c]
Waveform
header
78
[0x04e]
82 4 bytes WfmCnt Unsigned long Number of waveforms in the set. FastFrame is a special case in
2 bytes Byte order verification Unsigned short Hex 0xF0F0 (PPC format) or 0x0F0F (Intel). Used to determine
8 bytes
1 byte Num digits in byte
4 bytes Number of bytes to the
1 byte Number of bytes per
4 bytes Byte offset to beginning
4 bytes Horizontal zoom scale
4 bytes Horizontal zoom
8 bytes Vertical zoom scale
4 bytes Vertical zoom position Float Vertical position zoom information.
32 bytes Waveform label Char[32] User defined label for the reference waveform.
4 bytes N (number of
2 bytes Size of the waveform
4 bytes SetType Enum (int) Type of waveform set.
File Field
Versioning number
count
end of file (EOF)
point
2
of curve buffer
factor
position
factor
FastFrames – 1)
header
Field Type Comments/Examples
if bytes read from file need to be swapped before processing
1
Char[8]
Char 0 – 9
Long int Up to 9 digits in length, which allows for a file size of
Char Number of bytes per curve data point. Allows for quick
Long int Allows for positioning of file descriptor for recall of the curve
Long int Horizontal scale zoom information
Float Horizontal position zoom information
Double Vertical scale zoom information.
Unsigned long The number of WfmUpdateSpec and Curve objects that follow.
Unsigned short The size in bytes of the waveform header, which directly follows
The values will correspond to the following characters:
WFM#001
The byte values will be (in hex) 3a 57 46 4d 23 30 30 31
(where 0x303031 == 001).
999,999,999 bytes. The number of bytes from here to the end
of the file.
determination of the size of the actual curve data.
buffer. The number of bytes from the beginning of the file to the
start of the curve buffer.
Not for use.
Not for use.
Not for use.
Not for use.
This number is equal to the number of FastFrames – 1 (for
FastFrame waveform sets)
this field.
0 = Single waveform set
1 = FastFrame set
6
, where 001 is replaced by the actual file version.
001-1378-03
3
Performance Oscilloscope Reference File Format
Offset
Dec [Hex] Size
[0x052] that it describes a waveform set of one waveform with multiple
86
[0x056]
94
[0x05E]
102
[0x066]
106
[0x06a]
110
[0x06e]
114
[0x072]
118
[0x076]
122
[0x07a]
126
[0x07e]
134
[0x086]
8 bytes Acquisition Counter Unsigned long
8 bytes Transaction counter Unsigned long
4 bytes Slot ID Enum (int) An enumeration based upon the number and type of data slots
4 bytes Is static flag Int Used internally to determine if waveform is static (for example,
4 bytes Wfm update
4 bytes Imp dim ref count Unsigned long The number of implicit dimensions for the given waveform.
4 bytes Exp dim ref count Unsigned long The number of explicit dimensions for the waveform set. Vector
4 bytes Data type Enum (int) 0 = WFMDATA_SCALAR_MEAS
8 bytes Gen purpose counter Unsigned long
4 bytes Accumulated waveform
File Field
specification count
count
Field Type Comments/Examples
frames. See the numFrames field described below.
Internal acquisition counter. This is not a time stamp. It is used
long
long
Unsigned long Number of wfm update specifications in the waveform set. The
long
Unsigned long Used by the internal Math system. Represents the number of
to make sure that a set of acquisition waveforms are of the
same acquisition. This counter is the number of acquisitions
since power on. If nil (0), the internal system will match any
waveform with this one.
Not for use.
Internal acquisition translation stamp. This is not a time value. It
is the time of the transaction that this waveform is based upon.
Not for use.
available in a specified product. These values are subject to
change based upon the need of the specified product.
Not for use.
a reference) or live (for examples, a channel or mat).
Not for use.
waveform update spec holds data, which changes on each
acquisition update. FastFrame waveform sets have multiple
update specs (for example, each frame has unique timestamps
and such).
Vector Lists (vector YT and XY) waveform sets have one
implicit dimension; Pixel Maps (YT, XY, and XYZ) waveform
sets have one explicit dimension; and Scalars (measurements
and constants) have zero implicit dimensions.
Lists (vector YT, XY, and XYZ) waveforms have one (YT) or
two (XY) explicit dimension(s); Pixel Maps (YT, XY, and XYZ)
waveform sets have two implicit dimensions; and Scalars
(measurements and constants) have zero explicit dimensions.
Implicit dimension axis values are determined by a value plus
index times increment. Explicit dimension axis values are
explicitly defined for each data point.
The scale of the waveform data for the given dimension. This
value is used to interpret the curve data for the given axis. For
the vertical (explicit) dimension, scale is used to calculate
voltage.
Voltage = (wfmCurveData*Scale)+offset.
The scale is expressed as volts per LSB of the 16 or 32 bit
digitizer values (or 1.0 for the float digitizer values or Math
waveforms).
Note: For the horizontal implicit dimension, scale is used to
specify the sample interval (i.e.: time per point).
The distance in units from the dimensions’ zero value to the
true zero value. This is the ground level offset for the explicit
dimension. For the implicit dimension, offset is the trigger
position.
The size of the explicit dimension in terms of the base storage
value. For the explicit dimension, it is the size of the storage
element (e.g. 252 for 8 bit values and 65532 for 16 bit integers).
Note: For the implicit dimension, size is the record length
(including pre and post charge data) and is expressed in data
points, not bytes of storage.
Precharge points are usually 16 points and postcharge points
are 16. These are used for internal display interpolation.
Note: Record length computations are made using this field
and the curve byte offsets.
A character string, NULL, terminated, which represents the
units for the dimension.
001-1378-03
5
Performance Oscilloscope Reference File Format
Offset
Dec [Hex] Size
[0x0ba]
Ext dim 2
342
[0x156]
Exp dim 1
206
[0x0ce]
Exp dim 2
362
[0x16a]
Exp dim 1
214
[0x0d6]
Exp dim 2
370
[0x172]
Exp dim 1
222
[0x0de]
Exp dim 2
378
[0x17a]
Exp dim 1
230
[0x0e6]
Exp dim 2
386
[0x182]
Exp dim 1
238
[0x0ee]
Exp dim 2
394
[0x18a]
Exp dim 1
242
[0x0f2]
Exp dim 2
398
[0x18e]
Exp dim 1
246
20 bytes Units Char[20]
8 bytes
8 bytes
8 bytes
8 bytes
4 bytes
4 bytes
File Field
Dim extent min
Dim extent max
Dim resolution
Dim ref point
Format
Storage type
Field Type Comments/Examples
Double
Double
Double
Double
Enum (int)
Enum (int)
The minimum attainable data value for the explicit dimension,
adjusted for scale and offset. (Not available for use.)
The maximum attainable data value for the explicit dimension,
adjusted for scale and offset. (Not available for use.)
For the explicit dimension, this value reflects the smallest
resolution (of a voltage) possible given the products digitizer
and acquisition mode, i.e. the value of one digitizing level (DL).
For the explicit dimension, this is the ground-level reference
value.
Note: For the implicit dimension, this is the horizontal reference
point of the time base.
The code type of data values stored in the curve buffer.
EXPLICIT_INT16 = 0,
The value that represents the NULL (unacquired) waveform
value. This is the value that will be in the waveform data when
6
001-1378-03
Performance Oscilloscope Reference File Format
Offset
Dec [Hex] Size
[0x0f6]
Exp dim 2
402
[0x192]
Exp dim 1
250
[0x0fa]
Exp dim 2
406
[0x196]
Exp dim 1
254
[0x0fe]
Exp dim 2
410
[0x19a]
Exp dim 1
258
[0x102]
Exp dim 2
414
[0x19e]
Exp dim 1
262
[0x106]
Exp dim 2
418
[0x1a2]
User view data for explicit dimensions 1
Exp dim 1
266
[0x10a]
Exp dim 2
422
[0x1a6]
4 bytes N Value 4 bytes
4 bytes
4 bytes
4 bytes
4 bytes
8 bytes
File Field
Over range
Under range
High range
Low range
and 2
User scale
Field Type Comments/Examples
4 bytes
4 bytes
4 bytes
4 bytes
Double
there is no valid data available for that data element. This is not
a number (NAN) for floating point values.
The 4 bytes can be interpreted as short, long, or float
depending upon the curve data type.
union rangeValues {
sRange INT16;
lRange INT32;
fRange FP32;
};
Special value that indicates that a point is over-ranged.
Special value that indicates that a point is under-ranged.
The largest signed value that can be present in this data.
(Except for nValue, under/over-range.)
The smallest value that can be present in this data. (Except for
nValue, under/over-range.)
The User View data defines the relationship between the
description of the raw data and the way the user wants to view
and interact with the data. This data defines the meaning of
zoom as well as the transformations that related the data to the
screen. This can include specific user modified scale and units
values.
User view scale expressed in terms of units/divisions and is
used to apply additional scale information for display purposes.
001-1378-03
7
Performance Oscilloscope Reference File Format
Offset
Dec [Hex] Size
Exp dim 1
274
[0x112]
Exp dim 2
430
[0x1ae]
Exp dim 1
294
[0x126]
Exp dim 2
450
[0x1c2]
Exp dim 1
302
[0x12e]
Exp dim 2
458
[0x1ca]
Exp dim 1
306
[0x132]
Exp dim 2
462
[0x1ce]
Exp dim 1
314
[0x13a]
Exp dim 2
470
[0x1d6]
Implicit dimensions 1 and 2 Definitions of variables are the same as for the Explicit
Imp dim 1
478
[0x1de]
Imp dim 2
610
[0x262]
Imp dim 1
486
[0x1e6]
Imp dim 2
618
[0x26a]
20 bytes
8 bytes
4 bytes
8 bytes
8 bytes
8 bytes
8 bytes
File Field
User units
User offset
Point density
HRef
TrigDelay
Dim scale
Dim offset
Field Type Comments/Examples
Char[20]
Double
6
Unsigned long
Double
Double
Double
Double
User display units string, expressed in Units per Division.
Examples are Volts per Div or Time per Div.
User position expressed in terms of divisions for the explicit
dimension, and is used to designate the screen relative position
of the waveform.
Note: For implicit dimension, this value is expressed in terms of
user units (typically time) and is used to designate the value of
the horizontal center pixel column in relationship to the trigger,
in absolute horizontal user units.
The relationship of screen points to waveform data. For explicit
dimensions, this value is 1.
Note: For implicit dimensions, this defines the number of points
that are compressed into a single pixel column. This
compression ratio becomes the definition of a zoom of one.
The horizontal position of the trigger, in units of percentage of a
waveform, in trigger-centric (no delay) mode. This value is 0% 100% of the waveform.
The amount of delay, in seconds, from the trigger to the HRef
location. This value is positive for triggers occurring before the
HRef and negative for values after the HRef.
dimension except where noted.
For the horizontal implicit dimension, scale is used to specify
the sample interval (i.e. time per point).
For the implicit dimension, offset is the trigger position (in a
delay centric mode).
8
001-1378-03
Performance Oscilloscope Reference File Format
Offset
Dec [Hex] Size
Imp dim 1
494
[0x1ee]
Imp dim 2
626
[0x272]
Imp dim 1
498
[0x1f2]
Imp dim 2
630
[0x276]
Imp dim 1
518
[0x206]
Imp dim 2
650
[0x28a]
Imp dim 1
526
[0x20e]
Imp dim 2
658
[0x292]
Imp dim 1
534
[0x216]
Imp dim 2
666
[0x298]
Imp dim 1
542
[0x21e]
Imp dim 2
674
[0x2a2]
Imp dim 1
550
[0x226]
Imp dim 2
682
[0x2aa]
User view data for implicit dimensions
4 bytes
20 bytes
8 bytes
8 bytes
8 bytes
8 bytes
4 bytes
File Field
Dim size
Units
Dim extent min
Dim extent max
Dim resolution
Dim ref point
Spacing
1 and 2
Field Type Comments/Examples
Unsigned long
Char[20]
Double
Double
Double
Double
Unsigned long
Note: For the implicit dimension, size is the record length
(including pre and post charge data) and is expressed in data
points, not bytes of storage. Prechange points are usually 16
points and postcharge points are 16. These are used for
internal display interpolation.
Note: Record length computations are made off of this field and
the curve byte offsets.
Not available for use.
Not available for use.
Note: For the implicit dimension, this is the horizontal reference
point of the time base.
Real time point spacing (1).
001-1378-03
9
Performance Oscilloscope Reference File Format
Offset
Dec [Hex] Size
Imp dim 1
554
[0x22a]
Imp dim 2
686
[0x2ae]
Imp dim 1
562
[0x232]
Imp dim 2
694
[0x2b6]
Imp dim 1
582
[0x246]
Imp dim 2
714
[0x2ca]
Imp dim 1
590
[0x24e]
Imp dim 2
722
[0x2d2]
Imp dim 1
594
[0x252]
Imp dim 2
726
[0x2d6]
Imp dim 1
602
[0x25a]
Imp dim 2
734
[0x2de]
Time Base 1 and 2 information The time base information describes how the waveform
Time Base 1
742
[0x2e6]
Time Base 2
754
[0x2f2]
Time Base 1 Type of acquisition
8 bytes
20 bytes
8 bytes
4 bytes
8 bytes
8 bytes
4 bytes
File Field
User scale
User units
User offset
Point density
HRef
TrigDelay
Real point spacing
6
Field Type Comments/Examples
Double
Char[20]
Double
Unsigned long
Double
Double
Unsigned long
data was acquired and the meaning of the acquired points.
This is an integer count of the difference, in points, between the
acquired points. If a waveform has not been created using
interpolation, then this value is one.
waveform point. This first portion of data from preChargeStart to
dataStart is intended to be used by an interpolation algorithm
and is not guaranteed to be available to the oscilloscope user.
point of the record available to the oscilloscope user.
waveform point. There is still valid waveform data following, but
that data is intended to be used by an interpolator and is not
guaranteed to be accessible to the oscilloscope user.
waveform point in the curve. The buffer may extend beyond this
point (and often will), as described above.
Unsigned long This value is used only for Roll mode acquisitions and is not
meant for oscilloscope users. It designates a specific number of
bytes that are to be allocated for the curve buffer, but not
available for curve data except as defined by Roll mode. When
roll is not enabled, this offset is the same as
postChargeStopOffset.
Variable This is for FastFrame waveform sets and defines trigger time
stamp data. N = number of frames – 1.
Variable This is for FastFrame waveform sets, and defines curve data
offsets for individual frames. N = number of frames – 1.
Variable Contains curve data (inclusive of pre/post charge) for all
waveforms in set in a contiguous block (see notes below).
Unsigned long
long
Checksum for the waveform file. The checksum is calculated by
summing all data values from the Waveform header through the
Curve data as unsigned chars.
12
001-1378-03
Performance Oscilloscope Reference File Format
1
Versioning number:
This string identifies this file as a saved waveform in the instrument format. The format of this string was chosen
to make it easier for future variations of the waveform reference file format to be versioned. As noted in the table
above, the first 4 bytes of the versioning number are to remain constant through all instrument file formats, and
could potentially be used as a byte-order verification.
2
Byte offset to beginning of curve buffer:
This offset denotes where, from the start of the reference file, the curve buffer begins. The start of the curve buffer
generally contains the pre-charge data, although this is better defined by the offsets contained within the reference
header.
3
Enums:
Enums may be expanded in the future by adding additional members to the end of the enum, (for example, adding
8 bit data types to the end.) This can be done without changing the overall structure of the file, thus the file
version number would not need to change even though the enum was expanded.
4
Per frame information:
(Wfm Update Spec and Wfm Curve Information)
The following two groups, Update Specification and Curve Information, define a single frame. When the
waveform defines a set of frames, there will be a set for each frame but a single curve buffer.
5
Length of curve buffer in bytes:
The format of the values within the buffer is variable (INT16, INT64 and/or FP32). The size of the curve buffer
will be the number of data points within the buffer (preCharge + postCharge + recordLength) times the number of
bytes in the given data format (2 for INT16, 4 for FP32, etc.). It is also important to note that the creator of the
original waveform has the ability to assign a byte offset at the beginning and/or end of the file. These offsets will
increase the size of the buffer beyond the standard preCharge + recordLength + postCharge size. As mentioned
earlier, the waveform set curve buffer is saved as one contiguous block of data. Individual curves are defined by
virtue of the local curve byte offset values.
6
Version Number:
TDS5000B Series instruments have a new waveform file format, with the following changes:
Versioning Number (at Offset 0x002) is WFM#002.
At Offset 0x9a, after the number of acquired fast frames, an unsigned short value has been added representing
the summary frame type, if any. Offsets shown in the table assume that this unsigned short value is not present.
This short can take on three values:
0 = SUMMARY_FRAME_OFF,
1 = SUMMARY_FRAME_AVERAGE, or
2 = SUMMARY_FRAME_ENVELOPE.
The file format then continues on with the pixmap display format.
001-1378-03
13
Performance Oscilloscope Reference File Format
DPO7000, DPO70000 and DSA70000 Series instruments have a new waveform file format, with the following
changes:
Versioning Number (at Offset 0x002) is WFM#003.
All TDS5000B changes except for the Versioning Number.
Point density (at Offset 0x12e and 0x24e) is a double. Offsets shown in the table assume that this value is an
unsigned long.
Pixmaps are 1000x252x64 bits in size.
The data-size enum (Exp dim 1 & 2, offset 0x0ee and 0x18a) has two more options: