---
title: "Hand off to a test set"
---

# Hand off to a test set

Export a COMTRADE record cut and resampled for replay, and an IED's GOOSE and Sampled Values configuration as a CSV and a trimmed SCD, for relay test sets.

**State:** modelled. The COMTRADE writer is checked against python-comtrade: it read 42 records the module wrote with configuration, times and every value agreeing. RiseClipse 1.3.0 found nothing new in 100 trimmed test set SCDs of the public files. **No test set has imported a file written here** (OMICRON Test Universe and Advanced TransPlay, Doble or Megger software). Before a test, import the files into the test set's software and check them.

## A COMTRADE record for replay

1. Open the record in the COMTRADE record editor (see [COMTRADE records](https://neuralinverse.com/docs/modules/energy/comtrade/)).
2. Click the plot for cursor A and Shift+click for cursor B to choose the time to keep; without cursors, the window shown is kept.
3. Untick the channels to leave out.
4. Run **Export Record...** and choose:
   - the revision and form: **2013, single file (.cff)**, or 2013 or 1999 configuration and data (`.cfg` and `.dat`);
   - the format: ASCII, BINARY, and in 2013 also BINARY32 and FLOAT32;
   - the rate: keep the recorded samples, a common replay rate (such as 4800 per second) or another rate;
   - primary, secondary or recorded values.
5. Pick where to save. The command never replaces a file without asking (for `.cfg` and `.dat` it names both), and opens what it wrote.

What the writer does:

- spreads each channel's multiplier and offset over the whole integer range for the integer formats, and writes each format's missing-sample marker;
- moves the first-sample time to the first sample written and keeps the trigger instant;
- keeps several sampling rates across a cut, and time-stamped records with their stamps;
- resamples by linear interpolation of analog values and hold of digital states, with no anti-aliasing filter;
- carries the 2013 time code and time quality over. A 1999 record written as 2013 states time quality F (unreliable), with a warning pointing to the Energy log, rather than claim a locked clock.

## An IED's GOOSE and Sampled Values configuration

1. Run **Export Test Set Configuration...** and pick the SCD and the IED.
2. Pick where to save the trimmed SCD; the CSV is written next to it and opens.

The **CSV** lists what the IED publishes and subscribes to: MAC, APPID, VLAN, priority, gocbRef or MSVCB reference, goID or smvID, data set reference, confRev, subscribers, every member with its FC and basic type from the type templates (structures spelled out), and the inputs of the IED that take it. It starts with a UTF-8 byte order mark for Excel.

The **trimmed SCD** holds the IED, the IEDs it subscribes to, its own and the subscribed addresses and the types they use, as the SCD's own text. Which part of an SCD a test set reads is not documented publicly, so the trimmed SCD keeps every element a GOOSE or Sampled Values subscriber or simulator could need, and the CSV carries the same facts for entry by hand.

**Try it:** for IED P1 of a three-bay station, the CSV lists P1's GOOSE `gcbTrip` (MAC 01-0C-CD-01-00-01, APPID 0001, its subscriber and two BOOLEAN members) and the three streams P1 subscribes to, with the inputs that take them. The trimmed SCD holds P1 and the IEDs it subscribes to, and no Substation section.

## Limits

- Resampling has no anti-aliasing filter.
- Text other than ASCII is written as UTF-8.
- The FLOAT32 missing-sample marker is from a secondary source; python-comtrade does not recognise it.

## Not verified

- Any test set importing these files, and which part of an SCD OMICRON's GOOSE Configuration reads.
- The 2013 time quality codes against the standard's text.
- Windows.
