How to open COMTRADE files (.cfg, .dat, .cff)
Open a COMTRADE fault record from a relay, fault recorder or power-quality meter in a browser: which files you need, what each one holds, and what to do when a record will not open.
Protection relays, digital fault recorders and power-quality meters save what they saw during a disturbance as a COMTRADE record, the file format defined by IEEE C37.111 (also published as IEC 60255-24). A record is normally two files with the same name: a .cfg that describes the channels and a .dat that holds the samples. Newer recorders can write both into a single .cff file instead.
What you need
- The .cfg and the .dat together. The
.datis only numbers; without its.cfgnothing can say which column is which phase, what the scaling is or how fast it was sampled. The.cfgon its own has no waveform at all. - Or one .cff file (COMTRADE 2013), which carries the configuration, the data and the optional header and information sections in one file.
- Optional: .hdr and .inf. A
.hdris free text from the recorder (settings, notes); an.infholds vendor-specific extra information. A record opens without them.
Opening a record in SagSwell
- Go to sagswell.com. There is nothing to install and no account is needed to look at a record.
- Drag the
.cfgand.datonto the page together, or choose them with Upload files. A.cffor a.zipof several records works the same way; SagSwell pairs the files by name. - The record opens on the waveform: every analog and status channel on one time axis, with the value of each trace at the cursor. The tabs above it hold the RMS trend with the sags and swells found in it, the ITIC curve, harmonics and phasors.
The file is read and analysed in your browser. If you are not signed in, nothing is kept: close or refresh the page and it is gone. If you are signed in, the files you add are kept in your account, in folders, so they open on any computer until you delete them.
When a record will not open
These are the problems seen most often in real records, roughly in order of how often they occur:
| What you see | Usual cause | What to do |
|---|---|---|
| The .dat is ignored, or only the .cfg is listed | The two files have different base names (one was renamed), or one was left behind when copying | Give both the same base name and add them together; upper and lower case do not matter |
| “The .dat holds fewer samples than the .cfg declares” | The recorder was still writing when the file was copied, or a transfer cut it short | Download the record from the recorder again; the part that is there still opens |
| Values are wildly wrong (kV where you expect V, or 1000× too large) | Primary and secondary scaling: the .cfg gives both ratios and a flag saying which one the samples use | Check the channel’s primary/secondary ratio and the P/S flag in the .cfg |
| The date is in the wrong month | The standard uses dd/mm/yyyy since 1999, but some recorders write mm/dd/yyyy | SagSwell reads the unambiguous cases and notes when it swapped them |
| Garbage values from a binary record | The .cfg declares a different data type (BINARY, BINARY32, FLOAT32, ASCII) from the one the .dat was written in | Check the file-type line near the end of the .cfg |
Every record SagSwell opens gets a file check that lists what it found and what it had to assume. If a record will not open at all, the reader offers to send the file to us so the reader can be fixed; nothing is sent unless you choose to.
To see those findings without opening the viewer, run the record through the COMTRADE file checker. To get the numbers into Excel, Python or MATLAB, use the COMTRADE to CSV converter; both run in the browser and upload nothing.
Other ways to open COMTRADE
Most relay and recorder vendors ship a desktop viewer with their configuration software, and there are general-purpose desktop viewers and programming libraries for COMTRADE as well. A browser viewer is useful when the vendor software is not installed on the computer in front of you, when the record comes from a different vendor’s device, or when a colleague without the software needs to look at it.
For the structure of the files themselves, see the COMTRADE file format explained and the .cfg file, line by line.
References
- IEEE Std C37.111-2013 / IEC 60255-24:2013, Measuring relays and protection equipment – Part 24: Common format for transient data exchange (COMTRADE) for power systems
- IEEE Std C37.111-1999, IEEE Standard Common Format for Transient Data Exchange (COMTRADE) for Power Systems
Free tools
More guides
- The COMTRADE file format explained (IEEE C37.111)
- The COMTRADE .cfg file, line by line (with an annotated example)
- Voltage sags, swells and interruptions: the IEEE 1159 categories
- The ITIC (CBEMA) curve and SEMI F47, point by point
- Harmonics and THD from a fault record: what IEEE 519 does and does not tell you