⚡ Try it online | 📚 Documentation | 🛡️ Detectors reference | 🔧 Sponsor Custom Features
IEC Checker is an open source static analyzer for IEC 61131-3 programs. It catches bugs and enforces PLCOpen coding guidelines before code reaches the PLC.
$ iec_checker program.st
PLCOPEN-CP3: Variable X shall be initialized before being used
--> program.st:4:9
See: https://iec-checker.github.io/docs/detectors/PLCOPEN-CP3
PLCOPEN-CP13: POUs shall not call themselves directly or indirectly
--> program.st:8:30
See: https://iec-checker.github.io/docs/detectors/PLCOPEN-CP13
- 26 PLCOpen Software Construction Guidelines checks
- Declaration analysis, unreachable code detection, unused variable detection
- Structured Text, PLCOpen XML, and SEL XML input formats
- JSON output for CI/CD integration and Python tooling
The ST dialect is compatible with the matiec compiler. If iec-checker chokes on extensions from your PLC vendor, please open an issue.
Download a prebuilt binary for Linux or Windows x86_64 from GitHub releases.
Nightly builds are published to Docker Hub automatically by a weekly GitHub Actions workflow:
docker pull jubnzv1/iec-checker:nightly
docker run --rm -v "$PWD:/src" -w /src jubnzv1/iec-checker:nightly program.stopam install --deps-only .
makeSee the installation guide for Windows instructions and optional Python setup.
iec_checker test/st/*.st # check ST files
iec_checker -i xml schemes/*.xml # check PLCOpen XML
iec_checker --help # all optionsSee the CLI reference for the full option list, output formats, and exit codes.