Difference between revisions of "File format:Tektronix WFM"

From sigrok
Jump to navigation Jump to search
m (Uwe Hermann moved page File format:Tek WFM to File format:Tektronix WFM without leaving a redirect)
(add resources, link to Tektronix manual and github repos)
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{DISPLAYTITLE:File format:Tek WFM}}
{{DISPLAYTITLE:File format:Tek WFM}}
The '''Tektronix WFM''' format is a special format used by the Tektronix TDS series scopes. It uses less space than the CSV/Matlab export functions provided.


The Tek WFM format is a special format used by TDS Series scopes. It uses less space than the CSV/Matlab export functions provided.
== Header ==


== Header ==
TODO The table may need an update, Tektronix documents at least three file format versions, with some fields added and others changing data types in more recent versions.


{| border="0" class="alternategrey sigroktable sortable"
{| border="0" class="alternategrey sigroktable sortable"
Line 11: Line 12:
|-
|-
| 0 - 1
| 0 - 1
| Magic Bytes
| Magic bytes
|-
|-
| 2 - 5
| 2 - 5
| Format Code
| Format code
|-
|-
| 6
| 6
| Length of Data, Unsigned integer (so far always 4)
| Length of data, unsigned integer (so far always 4)
|-
|-
| 7 - 11
| 7 - 11
Line 23: Line 24:
|-
|-
| 12 - 15
| 12 - 15
| Another Magic
| Another magic
|-
|-
| 16-20
| 16-20
| Length of Header + Data (big endian, signed integer)
| Length of header + data (big endian, signed integer)
|-
|-
| 21 - 28
| 21 - 28
| Vertical Position (Double)
| Vertical position (double)
|-
|-
| 29 - 36
| 29 - 36
| Horizontal Position (Double)
| Horizontal position (double)
|-
|-
| 37 - 43
| 37 - 43
| Vertical Zoom (Double)
| Vertical zoom (double)
|-
|-
| 44 - 51
| 44 - 51
| Horizontal Zoom (Double)
| Horizontal zoom (double)
|-
|-
| 52 - 53
| 52 - 53
| Acquisition Mode (signed integer, currently unknown)
| Acquisition mode (signed integer, currently unknown)
|-
|-
| 54 - 55
| 54 - 55
| Min Max (unknown)
| Min max (unknown)
|-
|-
| 56 - 63
| 56 - 63
Line 50: Line 51:
|-
|-
| 63 - 64
| 63 - 64
| Vertical Coupling (signed integer)
| Vertical coupling (signed integer)
|-
|-
| 65 - 66
| 65 - 66
| Horizontal Unit (signed integer)
| Horizontal unit (signed integer)
|-
|-
| 67 - 74
| 67 - 74
Line 59: Line 60:
|-
|-
| 75 - 76
| 75 - 76
| Vertical Unit (signed integer)
| Vertical unit (signed integer)
|-
|-
| 77 - 84
| 77 - 84
| Vertical Offset (double)
| Vertical offset (double)
|-
|-
| 85 - 92
| 85 - 92
| Vertical Position (double)
| Vertical position (double)
|-
|-
| 93 - 100
| 93 - 100
| Vertical Gain (double)
| Vertical gain (double)
|-
|-
| 101 - 105
| 101 - 105
Line 74: Line 75:
|-
|-
| 106 - 107
| 106 - 107
| Trigger Position (signed integer), possibly in points
| Trigger position (signed integer), possibly in points
|-
|-
| 108 - 109
| 108 - 109
| Header Version (signed integer)
| Header version (signed integer)
|-
|-
| 110 - 111
| 110 - 111
| Sampling Density (??) (signed integer)
| Sampling density (??) (signed integer)
|-
|-
| 112 - 113
| 112 - 113
| Burst Segment Length (signed integer)
| Burst segment length (signed integer)
|-
|-
| 114 - 115
| 114 - 115
| Waveform Source (signed integer)
| Waveform source (signed integer)
|-
|-
| 116 - 121
| 116 - 121
Line 103: Line 104:
== Data ==
== Data ==


Waveform data. Length of this segment is stored in Record length.
Waveform data. Length of this segment is stored in '''Record length'''.


To reconstruct the waveform use the following:
To reconstruct the waveform use the following:


<code> y = data[i] * vertgain / 25 / 256 + vertoffset - vertposition * vertgain </code> <br>
y = data[i] * vertgain / 25 / 256 + vertoffset - vertposition * vertgain
<code> x = (i - (reclength*trigpos/100)) * horizscaleperpoint </code>
x = (i - (reclength*trigpos/100)) * horizscaleperpoint
 
== Resources ==
 
* [https://download.tek.com/manual/Waveform-File-Format-Manual-077022011.pdf Tektronix instructions] on the WFM file format
* [https://github.com/MorganAskins/tektronix_wfmreader github Morgan Askins wfm reader]
* [https://github.com/vongostev/tekwfm2 github Pavel Gostev wfm2 reader]


[[Category:File format]]
[[Category:File format]]

Latest revision as of 19:38, 2 June 2022

The Tektronix WFM format is a special format used by the Tektronix TDS series scopes. It uses less space than the CSV/Matlab export functions provided.

Header

TODO The table may need an update, Tektronix documents at least three file format versions, with some fields added and others changing data types in more recent versions.

Bytes Field
0 - 1 Magic bytes
2 - 5 Format code
6 Length of data, unsigned integer (so far always 4)
7 - 11 Number of bytes following
12 - 15 Another magic
16-20 Length of header + data (big endian, signed integer)
21 - 28 Vertical position (double)
29 - 36 Horizontal position (double)
37 - 43 Vertical zoom (double)
44 - 51 Horizontal zoom (double)
52 - 53 Acquisition mode (signed integer, currently unknown)
54 - 55 Min max (unknown)
56 - 63 Duration in seconds (double)
63 - 64 Vertical coupling (signed integer)
65 - 66 Horizontal unit (signed integer)
67 - 74 Horizontal time per point (double)
75 - 76 Vertical unit (signed integer)
77 - 84 Vertical offset (double)
85 - 92 Vertical position (double)
93 - 100 Vertical gain (double)
101 - 105 Record length (unsigned integer)
106 - 107 Trigger position (signed integer), possibly in points
108 - 109 Header version (signed integer)
110 - 111 Sampling density (??) (signed integer)
112 - 113 Burst segment length (signed integer)
114 - 115 Waveform source (signed integer)
116 - 121 3x Video 1 (signed integer)
122 - 129 Video 2 (double)
130 - 131 Video 3 (signed integer)
131 - 163 Preamble (???)

Data

Waveform data. Length of this segment is stored in Record length.

To reconstruct the waveform use the following:

y = data[i] * vertgain / 25 / 256 + vertoffset - vertposition * vertgain
x = (i - (reclength*trigpos/100)) * horizscaleperpoint

Resources