Skip to content

Navigation Menu

Sign in
Sign up

Repository files navigation

StationScout skill

A headless toolkit and Claude skill for generating OMICRON StationScout test cases for IEC 61850 digital substations — built for interlock (CILO) testing and any boolean automation-logic test. It is the scriptable, no-GUI companion to the gen_test_case workflow.

Give it a signal list (merkjalisti), an SCD/SCL file, and the logic under test (a boolean expression, an IEC 61131-3 FBD file, or a pre-filled position matrix), and it produces a StationScout-importable JSON test case — every input permutation, fully assessed and schema-validated (verified with StationScout 3.00).

Why

Converting an interlocking diagram into a StationScout test plan by hand is slow and error-prone: every combination of switch positions is a step, and the expected CILO.EnaCls / EnaOpn must be right for each. This tool enumerates and assesses them automatically, and checks every signal reference against the SCD before import.

Install

pip install -r requirements.txt # openpyxl, jsonschema

Use

From a boolean expression (recommended, fully headless):

python scripts/generate.py \
 --signal-list path/to/merkjalisti.xlsx \
 --scd path/to/station.scd \
 --logic "Input1 and Input2 and (not Input3)" \
 --test-type DPC \
 --name "Interlocking QB1 Close" \
 --out QB1_close.json

From an IEC 61131-3 FBD file (logic derived automatically) — --fbd file.xml. From a pre-filled "Test Steps" sheet (legacy workflow) — --from-test-steps.

A complete worked example lives in examples/. Run it:

python scripts/generate.py \
 --signal-list examples/signal_list_example.xlsx \
 --scd examples/station_example.scd \
 --fbd examples/interlocking_FBD_61131-3.xml \
 --test-type DPC --name "Interlocking QB1 Close" \
 --out examples/QB1_example_output.json --allow-missing

Test types

  • DPC — switchgear OPEN/CLOSED. Control values are POS_ON (closed) / POS_OFF (open); assess values are boolean (the CILO enable).
  • SPC — single point true/false. Control and assess values are true / false.
  • COMMAND (optional) — StationScout sends a real command and assesses the IEC 61850-7-2 response (CAR_POSITION_CHANGED, CAR_BLOCKED_BY_INTERLOCKING, ...). Do not enable command assessment on a live primary system.

Layout

stationscout/
├── SKILL.md # Claude skill entry point (workflow + guidance)
├── scripts/ # the headless library
│ ├── generate.py # one-shot CLI
│ ├── signal_list.py # read the merkjalisti
│ ├── scl.py # parse SCD + IEC 61131-3 FBD
│ ├── logic.py # truth tables / step matrices
│ └── testcase.py # JSON schema, assembly, validation
├── references/ # the spec docs (JSON format, interlock concepts, signal list)
└── examples/ # runnable sample (signal list, SCD, FBD, output)

As a Claude skill

SKILL.md makes this usable inside Claude (Cowork / Claude Code): ask Claude to build a StationScout interlock test from a signal list and SCD and it will follow the workflow here. The references/ files are loaded on demand.

Credits

Builds on the open-source gen_test_case project and the OMICRON Interlock Testing application note (ANPUC_25004). StationScout and OMICRON are trademarks of OMICRON electronics GmbH; this is an independent, unaffiliated tool.

License

MIT — see LICENSE.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

AltStyle によって変換されたページ (->オリジナル) /