Professional Structured Text (IEC 61131-3) development environment for PLC programming in Visual Studio Code.
- Function Block IntelliSense: Auto-complete for FB outputs (
myTimer.Q,upCounter.CV) - Rich Syntax Highlighting: Complete IEC 61131-3 language support
- Smart Code Completion: Context-aware suggestions for keywords, types, and variables
- Code Validation: Built-in syntax validation and error detection
- Code Snippets: Pre-built templates for common PLC patterns
Rich syntax highlighting for all IEC 61131-3 constructs
- Open Visual Studio Code
- Go to Extensions (
Ctrl+Shift+X) - Search for "ControlForge Structured Text"
- Click Install
- ControlForge Structured Text: Validate Syntax - Checks the current file for syntax errors
- ControlForge Structured Text: Check LSP Status - Verifies if the Language Server Protocol is running correctly
- ControlForge Structured Text: Show Index Statistics - Displays information about indexed workspace symbols
- Create a new file with
.stor.iecstextension - Start typing - syntax highlighting activates automatically
- Use
Ctrl+Spacefor IntelliSense completion - Type function block instances followed by
.for member completion
PROGRAM MyProgram
VAR
startTimer : TON; // Timer On-Delay
partCounter : CTU; // Counter Up
emergencyStop : R_TRIG; // Rising Edge Trigger
END_VAR
// IntelliSense in action:
startTimer. // Shows: Q (BOOL), ET (TIME)
partCounter. // Shows: Q (BOOL), CV (INT)
emergencyStop. // Shows: Q (BOOL)
END_PROGRAM- Function Block Members: Auto-complete for all standard IEC 61131-3 function blocks
- Timers:
TON,TOF,TP→Q,ET - Counters:
CTU,CTD,CTUD→Q,CV,QU,QD - Edge Detectors:
R_TRIG,F_TRIG→Q - Bistables:
RS,SR→Q1
- Timers:
- Keyword Completion: All IEC 61131-3 keywords and constructs
- Data Type Suggestions:
BOOL,INT,REAL,TIME,STRING, etc. - Variable Detection: Automatically detects declared variables
- Code Snippets: Templates for common patterns (IF-THEN, FOR loops, etc.)
- Keywords:
IF,THEN,ELSE,FOR,WHILE,CASE,VAR,END_VAR - Data Types:
BOOL,INT,REAL,TIME,STRING,ARRAY,STRUCT - Operators:
AND,OR,NOT,XOR,:=,+,-,*,/ - Comments:
//single-line and(* *)multi-line - Literals: String, numeric (decimal, hex, binary), time literals
- Function Blocks: Standard IEC 61131-3 function blocks
- Auto-closing: Brackets, quotes, and parentheses
- Comment Toggle:
Ctrl+/for quick commenting - Word Matching: Intelligent word selection and highlighting
- File Association: Automatic recognition of
.stand.iecstfiles
.st- Standard Structured Text files.iecst- IEC 61131-3 Structured Text files
- Visual Studio Code 1.100.0 or higher
- Operating System: Windows, macOS, or Linux
Access these commands via the Command Palette (Ctrl+Shift+P):
- "Structured Text: Validate Syntax" - Check code for syntax errors
- Fixed LSP Initialization Issues: Resolved critical bug with vscode-languageclient module
- Enhanced Error Handling: Added robust error handling for language server activation
- LSP Status Command: Added command to verify Language Server Protocol is running
- Go to Definition & Find References: Navigate through Structured Text code
- Member Access Navigation: Navigate from instance members to their definitions
- Language Server Protocol (LSP): Full integration for advanced IDE features
- Cross-file Navigation: Navigate between files with symbol references
- IEC 61131-3 Definition Files: Standard function block definitions included for hover, navigation and completion
- Function Block Member Completion: Auto-complete for function block outputs
- Enhanced Parser: Better variable and FB instance detection
- Comprehensive Testing: Automated tests ensure reliability
- Improved Documentation: Better examples and guides
- Website: controlforge.dev
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Rate & Review: VS Code Marketplace
Licensed under the Business Source License 1.1 (BUSL-1.1).
For details, see License Terms.
Made for the PLC programming community