WinCC OA Script Actions
Disclaimer: This is one of the first releases of the WinCC OA Script Actions 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+P → Reload Window to refresh.
🎬 See It In Action

✨ Features
🚀 Quick Script Execution
- Right-click execution: Context menu on
.ctl files in Explorer or editor
- Command Palette: Execute scripts via
Ctrl+Shift+P
- With Arguments: Execute scripts with custom arguments
- Event Connection Control: Run with or without event manager connection
- Cross-platform support (Windows/Linux)
- Fast Execution: Scripts run with
-n flag by default (no event connection)
- Event Connection Mode: Execute scripts that need event manager connectivity
- Configurable execution modes for different use cases
🔧 Flexible Configuration
- Auto-Detection: Automatic project detection via WinCC OA Control extension
- Manual Configuration: Static paths for WinCC OA installation and project
- Integration with WinCC OA Control extension for seamless project management
⚙️ Configuration
Essential Settings
| Setting |
Default |
Description |
winccoa.scriptActions.pathSource |
automatic |
Path detection: static (manual) or automatic (via Control extension) |
winccoa.scriptActions.installPath |
- |
WinCC OA installation path (e.g., C:/Siemens/Automation/WinCC_OA/3.20) |
winccoa.scriptActions.projectName |
- |
Your WinCC OA project name |
Logging (for debugging)
| Setting |
Default |
Description |
winccoa.scriptActions.logLevel |
INFO |
Log verbosity: ERROR, WARN, INFO, DEBUG, TRACE |
💡 Tip: Set log level to DEBUG when reporting bugs for detailed diagnostics.
🐛 Known Issues
Current Limitations
Automatic Path Detection:
- Requires WinCC OA Control extension installed
- Falls back to manual configuration if Control extension not available
Output Capture:
- Script output not captured in VS Code terminal
- Scripts run in background WinCC OA process
- Use
DebugN() for debugging output (visible in WinCC OA logs)
Parameter Passing:
- Arguments passed as plain strings
- Complex data structures not supported
Reporting Bugs
Found an issue? Please report it with:
- WinCC OA version
- Extension version (
1.0.0)
- Script example that reproduces the issue
- Enable
DEBUG logging and attach log output
Report Issue on GitHub
📝 Commands
Access via Ctrl+Shift+P:
| Command |
Description |
WinCC OA: Execute Script |
Run current .ctl file without event connection (fast) |
WinCC OA: Execute Script with Arguments |
Run script with custom arguments |
WinCC OA: Execute Script with Event Connection |
Run script WITH event manager connection |
WinCC OA: Execute Script with Arguments and Event Connection |
Run script with arguments AND events |
Right-Click Menu:
- Right-click on
.ctl file → "Start Script" (fast mode, no events)
🛠️ Requirements
- VS Code: 1.107.1 or higher
- WinCC OA: 3.19+ with
WCCOActrl executable
- WinCC OA Control: Extension (optional, for auto-detection)
- Valid WinCC OA project
📚 Usage Example
# Windows (no event connection, fast)
C:/Siemens/Automation/WinCC_OA/3.20/bin/WCCOActrl.exe script.ctl -proj ProjectName -n
# Linux (with event connection)
/opt/WinCC_OA/3.20/bin/WCCOActrl script.ctl -proj ProjectName
# With arguments
WCCOActrl script.ctl -proj ProjectName -n testCaseId
Script Example
// File: scripts/utils/Example.ctl
main(string arg1, int arg2) {
DebugN("Argument 1: " + arg1);
DebugN("Argument 2: " + arg2);
}
� Troubleshooting
Windows Performance:
The extension may run slower on Windows with longer loading times. Linux performs significantly better.
Large Projects:
Very large projects may experience slower script execution startup times.
General
Extension Not Responding:
If the extension doesn't work as expected (script execution fails, project detection issues), reload VS Code:
- Press
Ctrl+Shift+P
- Type and select
Reload Window
- This refreshes the extension
📄 License
This project is licensed under the MIT License.
📜 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.