Extension for Keba IEC (611131-3)
General
This is an extension for the Keba specific version of the PLC programming standard IEC 611131-3. It features the following characteristics:
- Language Server:
- Currently indexed are pu-, tu-, fu-, su-, sv-, at-, sm-, is-, sc-files
- The Language server can open either one functional unit or one local project.
- Supported LSP features:
- Hover, completion, signature help
- Go-to definition, type definition, implementation
- Find references, document highlight
- Code actions, code lens
- Rename
- Formatting
- Semantic tokens
- File compare/diff between local filesystem and PLC
- File transfer from local workspace to PLC
- Variable monitor for viewing live PLC variable values
- Watchpoint monitor
- Debugging via Debug Adapter
- Webview for editing sequential function charts.
- Compiler execution from context menus (source files, functional units or project) or via Run Tasks command in palette.
Getting Started
Open an empty directory, then run KeStudio Code IEC: Wizard: Create Project from the Command Palette to create a new project.
For a guided overview, open the walkthrough via Help > Open Walkthrough and select KEBA : Get started with KeStudio Code IEC.
Configuration
Additionally a toolchain is required, which is installed after the installation of the extension (user prompt). The language server, debug adapter and compiler are all part of the toolchain.
In order to boost your language server experience the following settings are recommended:
"kestudiocode.iec.lsp.codeLens.onLocalVariables": true,
"kestudiocode.iec.lsp.launch.autoRestart": true,
"kestudiocode.iec.lsp.launch.notifyOnCrash": true,
"kestudiocode.iec.lsp.developer.emitQueryDbBlocked": true
Semantic highlighting is enabled by default (depending on the configured theme). If you are not a fan, you can turn it off with the global setting:
"editor.semanticHighlighting.enabled": false
Set the following if you do not want kils to offer any kind of code snippets, like variable declarations, statements, blocks or type declarations, ...
"kestudiocode.iec.lsp.completion.enableSnippetInsertion": false
Logging
| Setting |
Default |
Description |
kestudiocode.iec.logging.level |
Error |
Extension log verbosity: Off, Error, Warn, Info, Verbose |
kestudiocode.iec.logging.logDirectory |
(empty) |
Path to a directory for extension log file output. Leave empty to disable file logging. |