WinCC OA CTRL Language Support

May 9, 2026 · View on GitHub

VS Marketplace License VS Code

Language support for WinCC OA CTRL and CTRL++ in Visual Studio Code

FeaturesInstallationKnown Issues


Disclaimer: This is one of the first releases of the WinCC OA CTRL Language extension. Some edge cases may not be fully covered yet. Please check the Known Issues section for workarounds if you encounter problems.
Tip: If the extension doesn't work as expected, try Ctrl+Shift+PReload Window to refresh.


🎬 See It In Action

WinCC OA CTRL Language Support Demo


✨ Features

🎨 Syntax Highlighting

  • Full support for .ctl and .ctlpp files
  • WinCC OA built-in functions highlighted
  • Classes, structs, enums, and mappings

🧠 IntelliSense & Code Intelligence

  • Hover Information: See function signatures, variable types, and documentation
  • Auto-Completion: WinCC OA built-in functions with parameter hints
  • Go-to-Definition (F12 or Ctrl+Click):
    • Functions and methods
    • Classes and structs
    • Variables (global, local, member)
    • Enums and enum members (Color::RED)
    • #uses imports (cross-file navigation)
  • Member Access Navigation: Chain navigation obj.member.field

🔍 Advanced Language Features

  • Enum Support: Hover and navigation for enum Color { RED, GREEN }
  • Class Inheritance: Navigate to base classes (single-level)
  • Scope-Aware Resolution: Distinguishes local vs. member variables
  • Cross-File Dependencies: Automatic #uses resolution

📚 Documentation Access

  • Quick access to official WinCC OA documentation
  • Ctrl+Shift+PWinCC OA: Open Documentation for CTRL Function

🔧 Code Formatting (Optional)

  • Astyle-based formatting for .ctl and .ctlpp files
  • Format on save support

✅ Syntax Checking (Optional)

  • Native WinCC OA syntax validation via WCCOActrl
  • Inline error highlighting

⚙️ Configuration

Essential Settings

SettingDefaultDescription
winccoa.ctrlLang.pathSourceautomaticProject path detection: workspace (auto-detect) or manual
winccoa.syntaxCheck.enabledfalseEnable WinCC OA syntax validation
winccoa.syntaxCheck.executeOnSavefalseRun syntax check automatically on save
winccoa.astyleFormatter.enabledfalseEnable Astyle code formatting
winccoa.astyleFormatter.runOnSavefalseFormat code on save

Logging (for debugging)

SettingDefaultDescription
winccoa.ctrlLang.logLevelINFOLog verbosity: ERROR, WARN, INFO, DEBUG, TRACE

💡 Tip: Set log level to DEBUG when reporting bugs for detailed diagnostics.


🐛 Known Issues

Current Limitations

  1. Inheritance Chains:

    • Only 1 level of inheritance supported
    • class C : B : Aobj.memberInA not resolved
  2. Interfaces:

    • Interface parsing not yet implemented
    • interface IDrawable syntax not recognized
  3. Static Members:

    • class Utils { public static int counter; }
    • Static member detection not yet supported
    • Utils::method() may be confused with enums
  4. Goto-Definition Precision:

    • Occasional jumps to wrong line numbers
    • Especially in complex member access chains

Reporting Bugs

Found an issue? Please report it with:

  • WinCC OA version
  • Extension version (see VS Code Extensions view)
  • Code example that reproduces the issue
  • Enable DEBUG logging and attach log output

Report Issue on GitHub


Commands

Access via Ctrl+Shift+P:

CommandDescription
WinCC OA: Open Documentation for CTRL FunctionOpens official docs for function under cursor
WinCC OA: Format Document with AstyleFormats current document
WinCC OA: Run WinCC OA Syntax CheckValidates syntax with WCCOActrl

🛠️ Requirements

  • VS Code: 1.110.0 or higher
  • WinCC OA: 3.19+ (optional, required for syntax checking via WCCOActrl)
  • WinCC OA Core Extension: (optional, recommended) Enables automatic project detection and management. With the Core extension installed, you can select your active project from a list—the Language extension will automatically detect all local projects with a config/config file.
  • Project Structure: Your workspace must contain a config/config file (standard WinCC OA project layout) for auto-detection to work.

Automatic Mode: If the WinCC OA Project Admin Extension is installed, project detection is fully automatic.


🐛 Known Issues

Performance

Windows Performance:
The extension may run slower on Windows with longer loading times. Linux performs significantly better.

Large Projects:
Very large projects (1000+ files) may experience performance issues with IntelliSense and navigation.

General

Extension Not Responding:
If the extension doesn't work as expected (IntelliSense not working, goto-definition fails), reload VS Code:

  1. Press Ctrl+Shift+P
  2. Type and select Reload Window
  3. This refreshes the language server

Current Limitations

  • Goto Precision: Sometimes jumps to incorrect lines (minor offset issues)
  • Inheritance: Only single-level inheritance supported (no deep chains)
  • Interfaces: Not yet implemented

📄 License

This project is licensed under the GNU General Public License v3.0.


🙏 Third-Party Code

This extension includes code from:

vscode-ctrlpptools by LukasSchopp
License: GNU GPL v3.0

Modified files:

  • language-configuration.json
  • syntaxes/ctrl.tmLanguage.json
  • syntaxes/ctrlpp.tmLanguage.json

📜 Disclaimer

WinCC OA and Siemens are trademarks of Siemens AG. This project is not affiliated with, endorsed by, or sponsored by Siemens AG. This is a community-driven open source project.


Made with ❤️ for the WinCC OA community

GitHubIssuesWinCC OA Docs